-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
88 lines (80 loc) · 3.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>reveal.js with simple Text to Speech</title>
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/black.css">
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<h1>Hello There!</h1>
<p> This is a Reveal.js Based Slide Show With Text-to-Speech Support</p>
<p>Slide 1</p>
<br>
<a href="https://github.com/jamjolu/tts_basics_for_revealjs">Find out about adding text-to-speech to your Reveal slideshow here</a>
<aside class="notes">And, if I may say so, you look great!</aside>
</section>
<section><p>Slide 2</p></section>
<section><p>Slide 3</p></section>
<section>Slide 4 <br>(Don't read this outloud. <br>It is not in an element identified for reading.)</section>
<section>
<h3>Here is a fragmented slide:</h3>
<p class="fragment">One</p>
<p class="fragment">Two</p>
<p class="fragment">Three</p>
<p class="fragment">Four</p>
</section>
<section data-background-image="images/stars.jpg">
<h3>Here is a slide with a hidden note</h3>
<aside class="notes">The stars, they are winking at you! And, if you wink too, there may be someone out there winking back!</aside>
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// More info https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
history: true,
width: 1200,
height: 800,
margin: 0.1,
minScale: .2,
maxScale: 1.5,
// More info https://github.com/hakimel/reveal.js#dependencies
dependencies: [
{ src: 'plugin/markdown/marked.js' },
{ src: 'plugin/markdown/markdown.js' },
{ src: 'plugin/notes/notes.js', async: true },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/tts_min/tts_min_reveal.js', async: false} // Add text to speech for Chrome, FF, Opera using default voice.
]
});
Reveal.addEventListener( 'ready', function( event ) {
// Add this if you want to read the opening slide.
// event.currentSlide, event.indexh, event.indexv
var thisSlide = Reveal.getCurrentSlide();
if (tts.On) {
// Read the innerText for the listed elements of current slide after waiting 1 second to allow transitions to conclude.
setTimeout(function(){tts.ReadVisElmts(thisSlide,"h1","h2","h3","p","li");}, 1000);
// Read the textContent for the listed elements of the current slide, even hidden ones, after 1 second. In this case the notes class.
if (tts.readNotes) setTimeout(function(){tts.ReadAnyElmts(thisSlide,".notes");}, 1000);
}
} );
</script>
</body>
</html>