зеркало из https://github.com/mozilla/popcorn-js.git
initial work
This commit is contained in:
Родитель
c047a72684
Коммит
763ba4a3f2
|
@ -22,9 +22,9 @@
|
||||||
var paused = true,
|
var paused = true,
|
||||||
popcorn;
|
popcorn;
|
||||||
|
|
||||||
popcorn = Popcorn( Popcorn.youtube( 'video', 'http://www.youtube.com/watch?v=9oar9glUCL0', { width: 400 } ) );
|
popcorn = Popcorn( Popcorn.youtube( 'video', 'http://www.youtube.com/watch?v=9oar9glUCL0', { width: 400, controls: 0, annotations: 3 } ) );
|
||||||
|
|
||||||
popcorn = popcorn
|
/*popcorn = popcorn
|
||||||
.footnote({
|
.footnote({
|
||||||
start: 5, // seconds
|
start: 5, // seconds
|
||||||
end: 40, // seconds
|
end: 40, // seconds
|
||||||
|
@ -101,8 +101,8 @@
|
||||||
.listen('pause', function() {
|
.listen('pause', function() {
|
||||||
paused = true;
|
paused = true;
|
||||||
element( 'btn-play-pause' ).innerHTML = 'Play';
|
element( 'btn-play-pause' ).innerHTML = 'Play';
|
||||||
})
|
})*/
|
||||||
.mute()
|
popcorn.mute()
|
||||||
.play();
|
.play();
|
||||||
|
|
||||||
// Setup UI after loaded
|
// Setup UI after loaded
|
||||||
|
|
|
@ -133,7 +133,9 @@ var onYouTubePlayerReady;
|
||||||
id: this.playerId
|
id: this.playerId
|
||||||
};
|
};
|
||||||
|
|
||||||
swfobject.embedSWF( "http://www.youtube.com/e/" + this.vidId +"?enablejsapi=1&playerapiid=" + this.playerId + "&version=3",
|
|
||||||
|
console.log ("http://www.youtube.com/e/" + this.vidId +"?enablejsapi=1&playerapiid=" + this.playerId + "&controls=" + this.controls + "&iv_load_policy=" + this.iv_load_policy + "&version=3");
|
||||||
|
swfobject.embedSWF( "http://www.youtube.com/e/" + this.vidId +"?enablejsapi=1&playerapiid=" + this.playerId + "&controls=" + this.controls + "&iv_load_policy=" + this.iv_load_policy + "&version=3",
|
||||||
this.playerId, this.width, this.height, "8", null, flashvars, params, attributes );
|
this.playerId, this.width, this.height, "8", null, flashvars, params, attributes );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,6 +182,12 @@ var onYouTubePlayerReady;
|
||||||
options.width = options.width && (+options.width)+"px";
|
options.width = options.width && (+options.width)+"px";
|
||||||
options.height = options.height && (+options.height)+"px";
|
options.height = options.height && (+options.height)+"px";
|
||||||
|
|
||||||
|
// show controls on video. Integer value - 1 is for show, 0 is for hide
|
||||||
|
this.controls = +options.controls === 1 || +options.controls === 2 ? options.controls : 1;
|
||||||
|
|
||||||
|
// show video annotations, 1 is show, 3 is hide
|
||||||
|
this.iv_load_policy = +options.annotations === 1 || +options.annotations === 3 ? options.annotations : 1;
|
||||||
|
|
||||||
this._target = document.getElementById( elementId );
|
this._target = document.getElementById( elementId );
|
||||||
this._container = document.createElement( "div" );
|
this._container = document.createElement( "div" );
|
||||||
this._container.id = this.playerId;
|
this._container.id = this.playerId;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче