Index: branches/MwEmbedStandAlone/modules/SwarmTransport/mw.SwarmTransport.js |
— | — | @@ -23,7 +23,7 @@ |
24 | 24 | if( typeof window['swarmTransport'] != 'undefined' ){ |
25 | 25 | |
26 | 26 | // Add the swarm source |
27 | | - mw.log(" SwarmTransport :: checkPlayerSourcesEvent "); |
| 27 | + mw.log(" SwarmTransport :: checkPlayerSourcesEvent " + swapedPlayerId); |
28 | 28 | _this.addSwarmSource( embedPlayer, callback ); |
29 | 29 | |
30 | 30 | } else { |
— | — | @@ -79,7 +79,7 @@ |
80 | 80 | var absoluteSource = mw.absoluteUrl( source.getSrc() ); |
81 | 81 | var swarmSrc = httpseed2tstream( absoluteSource ); |
82 | 82 | |
83 | | - mw.log('addSwarmSource for: ' + source.getSrc() + "\n\nGot:" + swarmSrc ); |
| 83 | + //mw.log('addSwarmSource for: ' + source.getSrc() + "\n\nGot:" + swarmSrc ); |
84 | 84 | |
85 | 85 | embedPlayer.mediaElement.tryAddSource( |
86 | 86 | $j('<source />') |
Index: branches/MwEmbedStandAlone/mwEmbed.js |
— | — | @@ -2283,8 +2283,13 @@ |
2284 | 2284 | if( ! $j( targetObject ).data( 'events' )[ triggerName ] ) { |
2285 | 2285 | callback(); |
2286 | 2286 | } |
| 2287 | + |
2287 | 2288 | var callbackCount = $j( targetObject ).data( 'events' )[ triggerName ].length; |
2288 | | - |
| 2289 | + if( !callbackCount ){ |
| 2290 | + // No events run the callback directly |
| 2291 | + callback(); |
| 2292 | + return ; |
| 2293 | + } |
2289 | 2294 | mw.log(" runTriggersCallback:: " + callbackCount ); |
2290 | 2295 | var callInx = 0; |
2291 | 2296 | $j( targetObject ).trigger( 'checkPlayerSourcesEvent', function() { |