#github #audio #github-pages #slideshow #reveal.js
Вопрос:
У меня есть reveal.js слайд-шоу, в котором есть звук, однако я не могу воспроизвести звук, когда размещаю слайд-шоу на своей странице gh. Аудио отлично работает локально, но в конечном итоге мне нужно будет поделиться слайд-шоу. Я пробовал использовать полный путь, путь rawgit и т. Д… Я совершенно новичок в html и git. Я знаю, что это много кода, но я не был уверен, сколько вам понадобится.
Заранее спасибо!
!doctype htmlgt; lt;html lang="en"gt; lt;headgt; lt;meta charset="utf-8"gt; lt;titlegt;reveal.js – Class Name lt;/titlegt; lt;meta name="description" content="A framework for easily creating beautiful presentations using HTML"gt; lt;meta name="author" content="Hakim El Hattab"gt; lt;meta name="apple-mobile-web-app-capable" content="yes"gt; lt;meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"gt; lt;meta name="viewport" content="width=device-width, initial-scale=1.0"gt; lt;link rel="stylesheet" href="dist/reset.css"gt; lt;link rel="stylesheet" href="dist/reveal.css"gt; lt;link rel="stylesheet" href="dist/theme/moon.css" id="theme"gt; lt;script src="../reveal.js/dist/reveal.js"gt;lt;/scriptgt; lt;script src="../reveal.js/plugin/markdown/markdown.js"gt;lt;/scriptgt; lt;script src="../reveal.js/plugin/highlight/highlight.js"gt;lt;/scriptgt; lt;script src="../reveal.js-plugins/menu/menu.js"gt;lt;/scriptgt; lt;script src="../reveal.js-plugins/audio-slideshow/plugin.js"gt;lt;/scriptgt; lt;script src="../reveal.js-plugins/audio-slideshow/RecordRTC.js"gt;lt;/scriptgt; lt;script src="../reveal.js-plugins/audio-slideshow/recorder.js"gt;lt;/scriptgt; lt;scriptgt; Reveal.initialize({ // ... audio: { prefix: 'audio/', // audio files are stored in the "audio" folder suffix: '.ogg', // audio files have the ".ogg" ending textToSpeechURL: null, // the URL to the text to speech converter defaultNotes: false, // use slide notes as default for the text to speech converter defaultText: false, // use slide text as default for the text to speech converter advance: 0, // advance to next slide after given time in milliseconds after audio has played, use negative value to not advance autoplay: false, // automatically start slideshow defaultDuration: 5, // default duration in seconds if no audio is available defaultAudios: true, // try to play audios with names such as audio/1.2.ogg playerOpacity: 0.05, // opacity value of audio player if unfocused playerStyle: 'position: fixed; bottom: 4px; left: 25%; width: 50%; height:75px; z-index: 33;', // style used for container of audio controls startAtFragment: false, // when moving to a slide, start at the current fragment or at the start of the slide }, // ... }); lt;/scriptgt; lt;!-- Theme used for syntax highlighting of code --gt; lt;link rel="stylesheet" href="plugin/highlight/monokai.css"gt; lt;/headgt; lt;bodygt; lt;div class="reveal"gt; lt;!-- Any section element inside of this container is displayed as a slide --gt; lt;div class="slides"gt; lt;section data-transition="zoom-in fade-out"gt; lt;h3gt; class lt;/h3gt; lt;pgt; lt;smallgt; name lt;/smallgt; lt;/pgt; lt;a href="mailto:email"lt;buttongt;lt;smallgt; email lt;/smallgt; lt;/agt; lt;pgt; lt;iframe width="560" height="315" src="https://www.youtube.com/embed/ZwMVMbmQBug" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreengt;lt;/iframegt; lt;pgt; lt;audio src="assets/audio/test.ogg" controlsgt;lt;/audiogt; lt;/pgt; lt;/divgt; lt;/divgt; lt;script src="dist/reveal.js"gt;lt;/scriptgt; lt;script src="plugin/zoom/zoom.js"gt;lt;/scriptgt; lt;script src="plugin/notes/notes.js"gt;lt;/scriptgt; lt;script src="plugin/search/search.js"gt;lt;/scriptgt; lt;script src="plugin/markdown/markdown.js"gt;lt;/scriptgt; lt;script src="plugin/highlight/highlight.js"gt;lt;/scriptgt; lt;scriptgt; // Also available as an ES module, see: // https://revealjs.com/initialization/ Reveal.initialize({ controls: true, progress: true, center: true, hash: true, // Learn about plugins: https://revealjs.com/plugins/ plugins: [ RevealZoom, RevealNotes, RevealSearch, RevealMarkdown, RevealHighlight ] }); lt;/scriptgt; lt;/bodygt; lt;/htmlgt;