-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathexample.html
More file actions
175 lines (159 loc) · 5.15 KB
/
example.html
File metadata and controls
175 lines (159 loc) · 5.15 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<!DOCTYPE html>
<html class="split chapter" lang="en-US-x-hixie">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> BubblesJS - Example </title>
<link href="bubbles.css" rel="stylesheet" />
<script type="text/javascript" src="bubbles.js"></script>
</head>
<body>
<div id="wrapper">
<h2>Captions Test</h2>
<video width="680" height="390" id="video-example" controls="">
<source src="http://bubbles.childnodes.com/vid/VfE.mp4" type="video/mp4" />
<source src="http://bubbles.childnodes.com/vid/VfE.webm" type="video/webm" />
<source src="http://bubbles.childnodes.com/vid/VfE.ogv" type="video/ogg" />
</video>
<br />
<h2>Subtitles Test</h2>
<video width="680" height="390" id="video-srt" controls="">
<source src="http://bubbles.childnodes.com/vid/video01.mp4" type="video/mp4" />
<source src="http://bubbles.childnodes.com/vid/video01.webm" type="video/webm" />
</video>
<script type="text/javascript">
//initialization
(function( w ){
var subtitles_test = new Bubbles.video('video-srt');
//first argument - false = built in JS srt parser
// - 1 = bubbles.childnoes php JS parser
// - "your string here", path to a server side php parser
subtitles_test.subtitles( false,
{
"English" : {
language : "English",
file : "subs/english.srt"
},
"Greek" : {
language : "Greek",
file : "subs/greek.srt"
}
}
);
subtitles_test.add(
{
"test05" : {
type : "content",
effect : [ "fade", "fade" ],
className : "bubblesBlack",
content : " Comming Up Soon <br /> Lorem Ipsum Dolec sit amet.",
dimensions : [ '145px', '57px' ], //pixels - top left
position : [ '15%', '73%' ], //percent - %, pixels "px"
config : [ 22, 38 ]
}
}
);
var captionsDemo = new Bubbles.video('video-example',
{
"hiddenLink" : {
type : "link",
effect : "default",
className : "default",
content : "javascript: alert('YOU CLICKED AN INVISIBLE LINK');",
dimensions : [ '30%', '20%' ], //width - height
position : [ '70%', '66%' ], //top - left | percent - %, pixels "px"
config : [ 2 ],
callback : function() { _gaq.push(['_trackPageview', 'Video1 Played']); }
},
"test02" : {
type : "content",
effect : "slide",
className : "bubbles2",
content : "<span> Hello World. And I am a sliding Box </span>",
dimensions : [ '110px', '17%' ],
position : [ '100px', '200px' ],
config : [ 5, 8, 11, 15 ]
},
"test03" : {
type : "content",
effect : "fade",
className : "bubbles2",
content : "<span> Hello World! <br /> I am a Caption Box </span>",
dimensions : [ '150px', '12%' ],
position : [ '200px', '240px' ],
config : [ 2, 8 ]
},
"test04" : {
type : "content",
effect : "fade",
className : "bubbles2",
content : "<span> THE BACKGROUND IS NOW BLACK </span>",
dimensions : [ '110px', '20%' ],
position : [ '190px', '50px' ],
config : [ 5, 10, 40, 50 ],
callback : function() { document.getElementsByTagName('body')[0].style.backgroundColor="#000000"; },
callbackEnd : function() { document.getElementsByTagName('body')[0].style.backgroundColor="#F0EFF5"; }
},
"test06" : {
type : "content",
effect : "fade",
className : "bubblesBlack",
content : "<span> Lorem ipsum dolor sit amet, consectetur adipiscing elit. </span>",
dimensions : [ '130px', '74px' ],
position : [ '100px', '450px' ],
config : [ 0.3, 4, 22, 30 ]
},
"test07" : {
type : "content",
effect : [ "fade", "slide" ],
className : "bubblesPink",
content : "<span> Lorem ipsum dolor sit amet, consectetur adipiscing elit. </span>",
dimensions : [ '160px', '16%' ],
position : [ '170px', '90px' ],
config : [ 6, 9, 16, 24, 35 ]
},
"test08" : {
type : "content",
effect : "slide",
className : "bubbles2",
content : "<span>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem.</span>",
dimensions : [ '210px', '90px' ],
position : [ '10px', '20px' ],
config : [ 2, 5 ]
},
"test09" : {
type : "content",
effect : "fade",
className : "bubblesEmpty",
content : "<img src='http://bubbles.childnodes.com/vid/david.gif' />",
dimensions : [ '62px', '52px' ],
position : [ '40%', '40%' ],
config : [ 0.22, 35 ]
},
"test10" : {
type : "content",
effect : "slide",
className : "bubbles2",
content : "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
dimensions : [ '205px', '52px' ],
position : [ '60px', '350px' ],
config : [ 0.4, 4.1, 7, 11 ]
}
}
);
captionsDemo.add(
{
"test05" : {
type : "content",
effect : [ "fade", "fade" ],
className : "bubbles3",
content : "Lorem ipsum",
dimensions : [ '170px', '20px' ], //pixels - top left
position : [ '10%', '40px' ], //percent - %, pixels "px"
config : [ 13, 19, 26, 34 ]
}
}
);
})(window);
</script>
</body>
</html>