Bug 20489 Configure illegal file characters https://bugzilla.wikimedia.org/show_bug...
[mediawiki.git] / js2 / mwEmbed / libEmbedVideo / omtkEmbed.js
blob6e2b13d036a55f424ad19a25c0046b99b31d8a44
1 var omtkEmbed={
2         instanceOf:'omtkEmbed',
3         supports: {
4                 'pause':true,   
5                         'time_display':true
6         },
7         getEmbedHTML : function (){             
8                 var embed_code =  this.getEmbedObj();
9                 //need omtk to fire an onReady event.
10                 setTimeout('$j(\'#' + this.id + '\').get(0).postEmbedJS()', 2000);
11                 return this.wrapEmebedContainer( embed_code);                   
12         },
13         getEmbedObj:function(){
14                 var player_path = mv_embed_path + 'binPlayers/omtk-fx/omtkp.swf';       
15                 //player_path = 'omtkp.swf';
16                 js_log("player path: " + player_path);
17                 return  '<object id="'+this.pid+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="1" height="1">' +                                
18                                         '<param name="movie" value="' + player_path +'" />'+"\n"+                                       
19                                         '<!--[if !IE]>-->'+"\n"+
20                                                 '<object id="'+this.pid+'_ie" type="application/x-shockwave-flash" data="'+player_path+'" width="1" height="1">'+"\n"+
21                                         '<!--<![endif]-->'+"\n"+
22                                                   '<p>Error with Display of Flash Plugin</p>'+"\n"+
23                                         '<!--[if !IE]>-->'+"\n"+
24                                                 '</object>'+"\n"+
25                                         '<!--<![endif]-->'+"\n"+
26                                   '</object>';                  
27         },
28         postEmbedJS:function(){
29                 this.getOMTK();
30                 //play the url: 
31                 js_log("play: pid:"+ this.pid + ' src:' + this.src);
32                                 
33                 this.omtk.play( this.src );
34                 
35                 this.monitor();
36                 //$j('#omtk_player').get(0).play(this.src);
37                 //$j('#'+this.pid).get(0).play( this.src );
38         },
39         pause:function(){
40                 this.stop();
41         },
42         monitor:function(){
43                 if(this.omtk.getPosition)               
44                         this.currentTime = this.omtk.getPosition() / 1000;
45                 
46                 this.parent_monitor();  
47         },
48         getOMTK : function (){
49                 this.omtk = $j('#'+this.pid).get(0);            
50                 if(!this.omtk.play)
51                         this.omtk = $j('#'+this.pid+'_ie').get(0); 
52                 
53                 if(this.omtk.play){
54                         //js_log('omtk obj is missing .play (probably not omtk obj)');
55                 }
56         },  
59 function OMTK_P_complete(){
60         js_log('OMTK_P_complete');                      
63 function OMTK_P_metadataUpdate(){
64         js_log('OMTK_P_metadataUpdate');