Index: trunk/extensions/MetavidWiki/skins/mv_stream.js |
— | — | @@ -108,40 +108,10 @@ |
109 | 109 | //current range or search parameter |
110 | 110 | stream_current_context =$j('#mv_stream_time').html(); |
111 | 111 | js_log('set org_vid_time_req: ' + org_vid_time_req ); |
112 | | - |
113 | | - ebvid = $j('#embed_vid').get(0); |
114 | | - ebvid['inheritEmbedOverride']=function(){ |
115 | | - js_log('inheritEmbedOverride'); |
116 | | - //overide play button action to interface control: |
117 | | - $j('#big_play_link_embed_vid').attr('href', 'javascript:mv_do_play();'); |
118 | | - //extend stop button on mv_embed: |
119 | | - //js_log("pre stop: " +ebvid['stop'].toString() ); |
120 | | - /*if(ebvid['stop'].toString()!='function(){mv_do_stop();}'){ |
121 | | - ebvid['org_eb_stop'] = ebvid['stop']; |
122 | | - ebvid['stop'] = function(){mv_do_stop();} |
123 | | - }*/ |
124 | | - /*if(ebvid['pause'].toString()!='function(){mv_pause();}'){ |
125 | | - if(!ebvid['org_eb_pause']) |
126 | | - ebvid['org_eb_pause'] = ebvid['pause']; |
127 | | - ebvid['pause'] = function(){mv_pause();} |
128 | | - }*/ |
129 | | - //use mvd images for time updates (avoids lots of arbitrary time hits to server) |
130 | | - if(ebvid['updateThumbPerc'].toString()!='function(){return true;}'){ |
131 | | - ebvid['updateThumbPerc']=function(){return true;} |
132 | | - } |
133 | | - |
134 | | - /*if(ebvid['showVideoDownload'].toString!='function(){mv_doShowVideoDownload();}'){ |
135 | | - ebvid['org_showVideoDownload'] = ebvid['showVideoDownload']; |
136 | | - ebvid['showVideoDownload'] = function(){mv_doShowVideoDownload();} |
137 | | - }*/ |
138 | | - //setup text scroll monitor: |
139 | | - mv_doTextScrollMonitor(); |
140 | | - //js_log("post stop: " +ebvid['stop'].toString()); |
141 | | - } |
142 | | - //call stop override |
143 | | - ebvid.inheritEmbedOverride(); |
144 | | - //js_log('stop: '+ ebvid['stop'].toString() ); |
145 | | - //js_log('org_eb_stop: '+ ebvid['org_eb_stop'].toString() ); |
| 112 | + ebvid = $j('#embed_vid').get(0); |
| 113 | + //setup text scroll monitor: |
| 114 | + mv_doTextScrollMonitor(); |
| 115 | + |
146 | 116 | //add all the hover hooks: |
147 | 117 | this.addHoverHooks(); |
148 | 118 | |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js |
— | — | @@ -132,10 +132,10 @@ |
133 | 133 | return '[' + key + ']'; |
134 | 134 | } |
135 | 135 | } |
136 | | - |
137 | | -function mv_get_loading_img( style , class ){ |
| 136 | +//gets the loading image: |
| 137 | +function mv_get_loading_img( style , class_attr ){ |
138 | 138 | var style_txt = (style)?style:''; |
139 | | - var class_attr = (class)?'class="'+class+'"':'class="mv_loading_img"'; |
| 139 | + var class_attr = (class_attr)?'class="'+class_attr+'"':'class="mv_loading_img"'; |
140 | 140 | return '<div '+class_attr+' style="' + style +'"></div>'; |
141 | 141 | } |
142 | 142 | |
— | — | @@ -2653,8 +2653,7 @@ |
2654 | 2654 | }else{ |
2655 | 2655 | //the plugin is already being displayed |
2656 | 2656 | this.paused=false; //make sure we are not "paused" |
2657 | | - } |
2658 | | - js_log("should update play controL"); |
| 2657 | + } |
2659 | 2658 | $j("#mv_play_pause_button_"+this.id).attr({ |
2660 | 2659 | 'class':'pause_button' |
2661 | 2660 | }).unbind( "click" ).click(function(){ |
— | — | @@ -2682,9 +2681,14 @@ |
2683 | 2682 | * base embed stop (can be overwritten by the plugin) |
2684 | 2683 | */ |
2685 | 2684 | stop: function(){ |
| 2685 | + var _this = this; |
2686 | 2686 | js_log('mvEmbed:stop:'+this.id); |
2687 | | - //first issue pause to update interface |
2688 | | - this.pause(); |
| 2687 | + //first issue pause to update interface (only call the parent) |
| 2688 | + if(this['parent_pause']){ |
| 2689 | + this.parent_pause(); |
| 2690 | + }else{ |
| 2691 | + this.pause(); |
| 2692 | + } |
2689 | 2693 | //check if thumbnail is being displayed in which case do nothing |
2690 | 2694 | if(this.thumbnail_disp){ |
2691 | 2695 | //already in stooped state |
— | — | @@ -2696,6 +2700,11 @@ |
2697 | 2701 | this.setSliderValue(0); |
2698 | 2702 | this.setStatus( this.getTimeReq() ); |
2699 | 2703 | } |
| 2704 | + //make sure the big playbutton is has click action: |
| 2705 | + $j('#big_play_link_' + _this.id).unbind('click').click(function(){ |
| 2706 | + $j('#' +_this.id).get(0).play(); |
| 2707 | + }); |
| 2708 | + |
2700 | 2709 | if(this.update_interval) |
2701 | 2710 | { |
2702 | 2711 | clearInterval(this.update_interval); |
— | — | @@ -2845,17 +2854,18 @@ |
2846 | 2855 | $j('#mv_time_'+id).html(value); |
2847 | 2856 | } |
2848 | 2857 | } |
2849 | | - |
2850 | 2858 | /* |
2851 | 2859 | * utility functions: |
2852 | 2860 | */ |
2853 | 2861 | //simple url re-writer for standard temporal and size request urls: |
2854 | 2862 | function getUpdateTimeURL(url, new_time, size){ |
2855 | | - var pSrc = parseUri(url); |
2856 | | - //debugger; |
2857 | | - var new_url = pSrc.protocol +'://'+ pSrc.authority + pSrc.path +'?'; |
| 2863 | + var pSrc = parseUri(url); |
| 2864 | + if(pSrc.protocol != '' ){ |
| 2865 | + var new_url = pSrc.protocol +'://'+ pSrc.authority + pSrc.path +'?'; |
| 2866 | + }else{ |
| 2867 | + var new_url = pSrc.path +'?'; |
| 2868 | + } |
2858 | 2869 | var amp = ''; |
2859 | | - |
2860 | 2870 | if(new_time && pSrc.queryKey['t']) |
2861 | 2871 | pSrc.queryKey['t'] = new_time; |
2862 | 2872 | |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedObj/mv_flashEmbed.js |
— | — | @@ -621,7 +621,8 @@ |
622 | 622 | if (clip !== undefined) { |
623 | 623 | self._api().fp_play(clip); |
624 | 624 | } else { |
625 | | - self._api().fp_play(); |
| 625 | + if(typeof self._api().fp_play == 'function') |
| 626 | + self._api().fp_play(); |
626 | 627 | } |
627 | 628 | } |
628 | 629 | |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedObj/mv_vlcEmbed.js |
— | — | @@ -278,9 +278,12 @@ |
279 | 279 | if( this.vlc ){ |
280 | 280 | //plugin is already being present send play call: |
281 | 281 | // clear the message log and enable error logging |
282 | | - this.vlc.log.verbosity = 1; |
283 | | - this.vlc.log.messages.clear(); |
284 | | - this.vlc.playlist.play(); |
| 282 | + if( this.vlc.log ){ |
| 283 | + this.vlc.log.verbosity = 1; |
| 284 | + this.vlc.log.messages.clear(); |
| 285 | + } |
| 286 | + if(this.vlc.playlist) |
| 287 | + this.vlc.playlist.play(); |
285 | 288 | this.monitor(); |
286 | 289 | this.paused=false; |
287 | 290 | } |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/cortado_iframe.php |
— | — | @@ -68,7 +68,7 @@ |
69 | 69 | /** |
70 | 70 | * JS escape function copied from MediaWiki's Xml::escapeJsString() |
71 | 71 | */ |
72 | | -function Xml::escapeJsString( $string ) { |
| 72 | +function escapeJsString( $string ) { |
73 | 73 | // See ECMA 262 section 7.8.4 for string literal format |
74 | 74 | $pairs = array( |
75 | 75 | "\\" => "\\\\", |
— | — | @@ -106,11 +106,11 @@ |
107 | 107 | <head> |
108 | 108 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> |
109 | 109 | <title>cortado_embed</title> |
110 | | - <?if( !empty( $parent_domain ) ){?> |
| 110 | + <?php if( !empty( $parent_domain ) ){?> |
111 | 111 | <script type="text/javascript"> |
112 | | - window.DOMAIN = '<?= Xml::escapeJsString( $parent_domain ); ?>'; |
| 112 | + window.DOMAIN = '<?php echo escapeJsString( $parent_domain ); ?>'; |
113 | 113 | </script> |
114 | | - <?}?> |
| 114 | + <?php }?> |
115 | 115 | <style type="text/css"> |
116 | 116 | <!-- |
117 | 117 | body { |
— | — | @@ -122,28 +122,28 @@ |
123 | 123 | --> |
124 | 124 | </style></head> |
125 | 125 | <body> |
126 | | - <?if (empty($error)){ ?> |
127 | | - <applet id="<?= htmlspecialchars( $id ) ?>" |
| 126 | + <?php if (empty($error)){ ?> |
| 127 | + <applet id="<?php echo htmlspecialchars( $id ) ?>" |
128 | 128 | code="com.fluendo.player.Cortado.class" |
129 | 129 | archive="cortado-ovt-stripped_r34336.jar" |
130 | | - width="<?= htmlspecialchars( $width )?>" |
131 | | - height="<?=htmlspecialchars( $height )?>" |
| 130 | + width="<?php echo htmlspecialchars( $width )?>" |
| 131 | + height="<?php echo htmlspecialchars( $height )?>" |
132 | 132 | > |
133 | | - <param name="url" value="<?= htmlspecialchars( $media_url )?>" /> |
| 133 | + <param name="url" value="<?php echo htmlspecialchars( $media_url )?>" /> |
134 | 134 | <param name="local" value="false"/> |
135 | 135 | <param name="keepaspect" value="true" /> |
136 | | - <param name="video" value="<?= htmlspecialchars( $video )?>" /> |
137 | | - <param name="audio" value="<?= htmlspecialchars( $audio )?>" /> |
| 136 | + <param name="video" value="<?php echo htmlspecialchars( $video )?>" /> |
| 137 | + <param name="audio" value="<?php echo htmlspecialchars( $audio )?>" /> |
138 | 138 | <param name="seekable" value="true" /> |
139 | 139 | <? if($duration!=0){ |
140 | 140 | ?> |
141 | | - <param name="duration" value="<?= htmlspecialchars( $duration )?>" /> |
| 141 | + <param name="duration" value="<?php echo htmlspecialchars( $duration )?>" /> |
142 | 142 | <? |
143 | 143 | } ?> |
144 | 144 | <param name="bufferSize" value="200" /> |
145 | 145 | </applet> |
146 | 146 | <? }else{ ?> |
147 | | - <b>Error:</b> <?= htmlspecialchars( $error )?> |
| 147 | + <b>Error:</b> <?php echo htmlspecialchars( $error )?> |
148 | 148 | <? |
149 | 149 | } |
150 | 150 | ?> |