зеркало из https://github.com/mozilla/popcorn-js.git
Merge branch 't423' of git://github.com/ScottDowne/popcorn-js into t423
This commit is contained in:
Коммит
e98351c019
|
@ -194,7 +194,7 @@ Popcorn.player( "youtube", {
|
|||
media.paused && media.dispatchEvent( 'loadeddata' );
|
||||
};
|
||||
|
||||
options.controls = +options.controls === 0 || +options.controls === 1 ? options.controls : 1;
|
||||
options.controls = +options.controls === 0 || +options.controls === 1 ? options.controls : 1;
|
||||
options.annotations = +options.annotations === 1 || +options.annotations === 3 ? options.annotations : 1;
|
||||
|
||||
flashvars = {
|
||||
|
@ -214,7 +214,7 @@ Popcorn.player( "youtube", {
|
|||
|
||||
src = /^.*[\/=](.{11})/.exec( media.src )[ 1 ];
|
||||
|
||||
swfobject.embedSWF( "http://www.youtube.com/e/" + src + "?enablejsapi=1&playerapiid=" + container.id + "&version=3",
|
||||
swfobject.embedSWF( "http://www.youtube.com/e/" + src + "?enablejsapi=1&playerapiid=" + container.id + "&version=3",
|
||||
container.id, media.offsetWidth, media.offsetHeight, "8", null,
|
||||
flashvars, params, attributes );
|
||||
};
|
||||
|
|
10
popcorn.js
10
popcorn.js
|
@ -1597,11 +1597,11 @@
|
|||
|
||||
events[ evtName ] = [];
|
||||
}
|
||||
|
||||
|
||||
events[ evtName ].push( fn );
|
||||
return fn;
|
||||
};
|
||||
|
||||
|
||||
// Can take event object or simple string
|
||||
basePlayer.dispatchEvent = function( oEvent ) {
|
||||
|
||||
|
@ -1609,20 +1609,20 @@
|
|||
self = this,
|
||||
eventInterface,
|
||||
eventName = oEvent.type;
|
||||
|
||||
|
||||
// A string was passed, create event object
|
||||
if ( !eventName ) {
|
||||
|
||||
eventName = oEvent;
|
||||
eventInterface = Popcorn.events.getInterface( eventName );
|
||||
|
||||
|
||||
if ( eventInterface ) {
|
||||
|
||||
evt = document.createEvent( eventInterface );
|
||||
evt.initEvent( eventName, true, true, window, 1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Popcorn.forEach( events[ eventName ], function( val ) {
|
||||
|
||||
val.call( self, evt, self );
|
||||
|
|
Загрузка…
Ссылка в новой задаче