Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js |
— | — | @@ -274,7 +274,7 @@ |
275 | 275 | setTimeout( 'mvJsLoader.doLoad()', 25 ); |
276 | 276 | } |
277 | 277 | }else{ |
278 | | - js_log('checkLoading passed for: do run callbacks'); |
| 278 | + //js_log('checkLoading passed for: do run callbacks'); |
279 | 279 | //only do callback if we are in the same instance (weird concurency issue) |
280 | 280 | var cb_count=0; |
281 | 281 | for(var i=0; i < this.callbacks.length; i++) |
— | — | @@ -394,9 +394,11 @@ |
395 | 395 | //js_log(_this.id + ' plugin loaded'); |
396 | 396 | _this.loaded = true; |
397 | 397 | //make sure we have not already cleared the callbacks: |
398 | | - if(_this.loading_callbacks != null){ |
399 | | - for(var i=0; i < _this.loading_callbacks.length; i++ ) |
400 | | - _this.loading_callbacks[i](); |
| 398 | + if( _this.loading_callbacks != null){ |
| 399 | + for(var i=0; i < _this.loading_callbacks.length; i++ ){ |
| 400 | + if(_this.loading_callbacks[i]) |
| 401 | + _this.loading_callbacks[i](); |
| 402 | + } |
401 | 403 | } |
402 | 404 | _this.loading_callbacks = null; |
403 | 405 | |
— | — | @@ -419,7 +421,7 @@ |
420 | 422 | var quicktimeMozillaPlayer = new mediaPlayer('quicktime-mozilla',['video/ogg'],'quicktime'); |
421 | 423 | var quicktimeActiveXPlayer = new mediaPlayer('quicktime-activex',['video/ogg'],'quicktime'); |
422 | 424 | |
423 | | -var htmlPlayer = new mediaPlayer('html',['text/html', 'image/jpeg', 'image/png'],'html'); |
| 425 | +var htmlPlayer = new mediaPlayer('html',['text/html', 'image/jpeg', 'image/png', 'image/svg'], 'html'); |
424 | 426 | |
425 | 427 | /** |
426 | 428 | * mediaPlayers is a collection of mediaPlayer objects supported by the client. |
— | — | @@ -440,7 +442,8 @@ |
441 | 443 | { |
442 | 444 | this.players = new Array(); |
443 | 445 | this.loadPreferences(); |
444 | | - //set up default players library mapping |
| 446 | + |
| 447 | + //set up default players order for each library type |
445 | 448 | this.default_players['video/x-flv'] = ['flash','vlc']; |
446 | 449 | this.default_players['video/h264'] = ['flash', 'vlc']; |
447 | 450 | |
— | — | @@ -477,7 +480,7 @@ |
478 | 481 | if(mime_type!=null) |
479 | 482 | player.supported_types.push(mime_type); |
480 | 483 | |
481 | | - this.players.push(player); |
| 484 | + this.players.push( player ); |
482 | 485 | }, |
483 | 486 | getMIMETypePlayers : function(mime_type) |
484 | 487 | { |
— | — | @@ -532,7 +535,7 @@ |
533 | 536 | break; |
534 | 537 | } |
535 | 538 | } |
536 | | - if(selected_player) |
| 539 | + if( selected_player ) |
537 | 540 | { |
538 | 541 | for(var i=0; i < global_player_list.length; i++) |
539 | 542 | { |
— | — | @@ -801,10 +804,11 @@ |
802 | 805 | var src = re.exec( $j('#'+vidId).html() )[2]; |
803 | 806 | //replace the top div with mv_embed based player: |
804 | 807 | var vid_html = '<video id="vid_' + i +'" '+ |
805 | | - 'src="' + src + ' poster="' + poster + '" style="width:' + pwidth + |
| 808 | + 'src="' + src + '" poster="' + poster + '" style="width:' + pwidth + |
806 | 809 | 'px;height:' + pheight + 'px;"></video>'; |
| 810 | + js_log("video html: " + vid_html); |
807 | 811 | if( src && poster) |
808 | | - $j('#'+vidId).replaceWidth( vid_html ); |
| 812 | + $j('#'+vidId).html( vid_html ); |
809 | 813 | //rewrite that video id: |
810 | 814 | rewrite_by_id('vid_' + i); |
811 | 815 | } |