Skip to content

Commit 116df92

Browse files
committed
adjust example html.
1 parent 3d73720 commit 116df92

File tree

1 file changed

+70
-34
lines changed

1 file changed

+70
-34
lines changed

examples/index.html

Lines changed: 70 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,25 @@ <h3>Custom Player</h3>
136136
width: '480px',
137137
height: '300px',
138138
volume: 0.5,
139+
classname_active: 'is-pmb-active',
139140
on: {
140-
Init: function(player){
141-
console.log('Init', player);
141+
PlayerInit: function(player){
142+
console.log('PlayerInit', player);
143+
console.log(player.GetMediaInfo());
144+
console.log(player.GetPoster());
145+
},
146+
PlayerEnded: function(player){
147+
console.log('PlayerEnded', player);
148+
},
149+
PlayerPlay: function(player){
150+
console.log('PlayerPlay', player);
151+
},
152+
PlayerPause: function(player){
153+
console.log('PlayerPause', player);
154+
console.log(player.GetTime());
155+
console.log(player.GetTimeMax());
156+
console.log(player.GetTimeRatio());
157+
console.log(player.GetTimeDown());
142158
},
143159
Play: function(player){
144160
console.log('Play', player);
@@ -157,6 +173,8 @@ <h3>Custom Player</h3>
157173
},
158174
Change: function(player){
159175
console.log('Change', player);
176+
console.log(player.GetMediaInfo());
177+
console.log(player.GetPoster());
160178
}
161179
}
162180
});
@@ -184,39 +202,57 @@ <h3>Custom Player</h3>
184202
<pre class="prettyprint lang-html mt-2">
185203
<code>
186204
&lt;script&gt;
187-
var PMB = new PLAYER_MODULE_BRIGHTCOVE({
188-
id:&#039;brightcovePlayerCustom&#039;,
189-
ui_controls:true,
190-
ui_default:true,
191-
videoid:&#039;4230322585001&#039;,
192-
account:&#039;20318290001&#039;,
193-
width: &#039;480px&#039;,
194-
height: &#039;300px&#039;,
195-
volume: 0.5,
196-
on: {
197-
Init: function(player){
198-
console.log(&#039;Init&#039;, player);
199-
},
200-
Play: function(player){
201-
console.log(&#039;Play&#039;, player);
202-
},
203-
PlayPrep: function(player){
204-
console.log(&#039;PlayPrep&#039;, player);
205-
},
206-
Pause: function(player){
207-
console.log(&#039;Pause&#039;, player);
208-
},
209-
Stop: function(player){
210-
console.log(&#039;Stop&#039;, player);
211-
},
212-
StopAll: function(player){
213-
console.log(&#039;StopAll&#039;, player);
214-
},
215-
Change: function(player){
216-
console.log(&#039;Change&#039;, player);
205+
var PMB = new PLAYER_MODULE_BRIGHTCOVE({
206+
id:&#039;brightcovePlayerCustom&#039;,
207+
ui_controls:true,
208+
ui_default:true,
209+
videoid:&#039;4230322585001&#039;,
210+
account:&#039;20318290001&#039;,
211+
width: &#039;480px&#039;,
212+
height: &#039;300px&#039;,
213+
volume: 0.5,
214+
classname_active: &#039;is-pmb-active&#039;,
215+
on: {
216+
PlayerInit: function(player){
217+
console.log(&#039;PlayerInit&#039;, player);
218+
console.log(player.GetMediaInfo());
219+
console.log(player.GetPoster());
220+
},
221+
PlayerEnded: function(player){
222+
console.log(&#039;PlayerEnded&#039;, player);
223+
},
224+
PlayerPlay: function(player){
225+
console.log(&#039;PlayerPlay&#039;, player);
226+
},
227+
PlayerPause: function(player){
228+
console.log(&#039;PlayerPause&#039;, player);
229+
console.log(player.GetTime());
230+
console.log(player.GetTimeMax());
231+
console.log(player.GetTimeRatio());
232+
console.log(player.GetTimeDown());
233+
},
234+
Play: function(player){
235+
console.log(&#039;Play&#039;, player);
236+
},
237+
PlayPrep: function(player){
238+
console.log(&#039;PlayPrep&#039;, player);
239+
},
240+
Pause: function(player){
241+
console.log(&#039;Pause&#039;, player);
242+
},
243+
Stop: function(player){
244+
console.log(&#039;Stop&#039;, player);
245+
},
246+
StopAll: function(player){
247+
console.log(&#039;StopAll&#039;, player);
248+
},
249+
Change: function(player){
250+
console.log(&#039;Change&#039;, player);
251+
console.log(player.GetMediaInfo());
252+
console.log(player.GetPoster());
253+
}
217254
}
218-
}
219-
});
255+
});
220256
&lt;/script&gt;
221257

222258
&lt;button class=&quot;btn btn btn-secondary&quot; onclick=&quot;PMB.Stop()&quot;&gt;Media停止(Stop)&lt;/button&gt;

0 commit comments

Comments
 (0)