Index: trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_flashEmbed.js |
— | — | @@ -1,3 +1,4 @@ |
| 2 | +js_log('**** flashEmbed processing'); |
2 | 3 | /** |
3 | 4 | * flashembed 0.25. Adobe Flash embedding script |
4 | 5 | * |
— | — | @@ -369,6 +370,8 @@ |
370 | 371 | monitor : function() |
371 | 372 | { |
372 | 373 | this.getFLA(); |
| 374 | + if(!this.fla['getTime']) |
| 375 | + return; |
373 | 376 | var time = this.fla.getTime(); |
374 | 377 | //flash is giving bogus duration get from this |
375 | 378 | var end_ntp = (this.media_element.selected_source.end_ntp)? |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_vlcEmbed.js |
— | — | @@ -1,3 +1,4 @@ |
| 2 | +js_log('**** vlcEmbed processing'); |
2 | 3 | /* |
3 | 4 | * vlc embed based on: http://people.videolan.org/~damienf/plugin-0.8.6.html |
4 | 5 | * javascript api: http://www.videolan.org/doc/play-howto/en/ch04.html |
— | — | @@ -276,6 +277,6 @@ |
277 | 278 | // get the embed vlc object |
278 | 279 | getVLC : function getVLC(){ |
279 | 280 | this.vlc = this.getPluginEmbed(); |
280 | | - }, |
| 281 | + } |
281 | 282 | } |
282 | 283 | |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js |
— | — | @@ -157,7 +157,8 @@ |
158 | 158 | lib_plugins:{ |
159 | 159 | '$j.fn.offsetParent':'jquery/plugins/jquery.dimensions.js', |
160 | 160 | '$j.ui.mouseInteraction':'jquery/plugins/ui.mouse.js', |
161 | | - '$j.ui.slider':'jquery/plugins/ui.slider.js' |
| 161 | + '$j.ui.slider':'jquery/plugins/ui.slider.js', |
| 162 | + '$j.timer.global':'jquery/plugins/jquery.timers.js' |
162 | 163 | }, |
163 | 164 | pc:null, //used to store pointer to parent clip (when in playlist mode) |
164 | 165 | load_libs:function(callback){ |
— | — | @@ -262,8 +263,8 @@ |
263 | 264 | { |
264 | 265 | if(this.loaded) |
265 | 266 | { |
266 | | - js_log('plugin loaded, processing immediately'); |
267 | | - callback(); |
| 267 | + js_log('plugin loaded, scheduling immediate processing'); |
| 268 | + $j(document).oneTime(1, callback); |
268 | 269 | } |
269 | 270 | else |
270 | 271 | { |
— | — | @@ -279,14 +280,14 @@ |
280 | 281 | |
281 | 282 | //I am getting vlEmebed is not defined like 1/5 or 1/20th the time |
282 | 283 | //the load order should be more defined and ordered via callbacks |
283 | | - /*$j.getScript(plugin_path, function(){ |
| 284 | + $j.getScript(plugin_path, function(){ |
284 | 285 | js_log(_this.id + ' plugin loaded'); |
285 | 286 | _this.loaded = true; |
286 | 287 | for(var i in _this.loading_callbacks) |
287 | 288 | _this.loading_callbacks[i](); |
288 | 289 | _this.loading_callbacks = null; |
289 | | - }); */ |
290 | | - eval('var lib = {"'+this.library+'Embed":\'embedLibs/mv_'+this.library+'Embed.js\'}'); |
| 290 | + }); |
| 291 | +/* eval('var lib = {"'+this.library+'Embed":\'embedLibs/mv_'+this.library+'Embed.js\'}'); |
291 | 292 | mvJsLoader.doLoad(lib,function(){ |
292 | 293 | js_log(_this.id + ' plugin loaded'); |
293 | 294 | _this.loaded = true; |
— | — | @@ -294,7 +295,7 @@ |
295 | 296 | for(var i in _this.loading_callbacks) |
296 | 297 | _this.loading_callbacks[i](); |
297 | 298 | _this.loading_callbacks = null; |
298 | | - }); |
| 299 | + });*/ |
299 | 300 | } |
300 | 301 | } |
301 | 302 | } |
— | — | @@ -877,12 +878,9 @@ |
878 | 879 | $j(video_element).after(embed_video).remove(); |
879 | 880 | js_log('did swap'); |
880 | 881 | $j('#'+embed_video.id).get(0).onDOMswap(); |
881 | | - // now that "embed_video" is stable, do more initialization (if we are ready) |
882 | | - if($j('#'+embed_video.id).get(0).loading_external_data==false){ |
| 882 | + // now that "embed_video" is stable, do more initialization (if we are ready) |
| 883 | + if($j('#'+embed_video.id).get(0).loading_external_data==false) |
883 | 884 | $j('#'+embed_video.id).get(0).more_init(); |
884 | | - //update HTML |
885 | | - $j('#'+embed_video.id).get(0).getHTML(); |
886 | | - } |
887 | 885 | |
888 | 886 | //js_log('vid elm:'+ $j(video_element).html() ); |
889 | 887 | |
— | — | @@ -1615,6 +1613,7 @@ |
1616 | 1614 | js_log('f:onDOMswap'); |
1617 | 1615 | // Process the provided ROE file... if we don't yet have sources |
1618 | 1616 | if(this.roe && this.media_element.sources.length==0 ){ |
| 1617 | + js_log('loading external data'); |
1619 | 1618 | this.loading_external_data=true; |
1620 | 1619 | var _this = this; |
1621 | 1620 | do_request(this.roe, function(data) |
— | — | @@ -1622,10 +1621,7 @@ |
1623 | 1622 | //continue |
1624 | 1623 | _this.media_element.addROE(data); |
1625 | 1624 | js_log('added_roe::' + _this.media_element.sources); |
1626 | | - _this.more_init(function(){ |
1627 | | - js_log('getting html for: '+ _this.id); |
1628 | | - _this.getHTML() |
1629 | | - }); |
| 1625 | + _this.more_init(); |
1630 | 1626 | js_log('done loading ROE '+_this.thumbnail_disp ) |
1631 | 1627 | _this.loading_external_data=false; |
1632 | 1628 | }); |
— | — | @@ -1658,6 +1654,9 @@ |
1659 | 1655 | */ |
1660 | 1656 | this.inheritEmbedObj(ready_callback); |
1661 | 1657 | |
| 1658 | + //update HTML |
| 1659 | + $j('#'+embed_video.id).get(0).getHTML(); |
| 1660 | + |
1662 | 1661 | //js_log('HTML FROM IN OBJECT' + this.getHTML()); |
1663 | 1662 | //return this object: |
1664 | 1663 | //return this; |
— | — | @@ -1712,6 +1711,7 @@ |
1713 | 1712 | getMsg('loading_plugin') + |
1714 | 1713 | '</div>' |
1715 | 1714 | ); |
| 1715 | + // schedule embedding |
1716 | 1716 | this.selected_player.load(function() |
1717 | 1717 | { |
1718 | 1718 | js_log('performing embed for ' + _this.id); |
— | — | @@ -1722,7 +1722,7 @@ |
1723 | 1723 | _this.paused = false; |
1724 | 1724 | _this.thumbnail_disp=false; |
1725 | 1725 | $j("#mv_play_pause_button_"+_this.id).attr('class', 'pause_button'); |
1726 | | - }); |
| 1726 | + }); |
1727 | 1727 | }, |
1728 | 1728 | doThumbnailHTML:function() |
1729 | 1729 | { |
— | — | @@ -1742,8 +1742,12 @@ |
1743 | 1743 | }, |
1744 | 1744 | refreshControlsHTML:function() |
1745 | 1745 | { |
| 1746 | + js_log('refreshing controls HTML'); |
1746 | 1747 | if($j('#mv_embedded_controls_'+this.id).length==0) |
| 1748 | + { |
| 1749 | + js_log('#mv_embedded_controls_'+this.id + ' not present, returning'); |
1747 | 1750 | return; |
| 1751 | + } |
1748 | 1752 | var available_width = this.playerPixelWidth(); |
1749 | 1753 | var html_code=''; |
1750 | 1754 | // borders |
— | — | @@ -1858,6 +1862,7 @@ |
1859 | 1863 | |
1860 | 1864 | if(ready_callback) |
1861 | 1865 | ready_callback(); |
| 1866 | + js_log('plugin load callback complete'); |
1862 | 1867 | }); |
1863 | 1868 | }, |
1864 | 1869 | getHTML : function (){ |
— | — | @@ -2454,6 +2459,7 @@ |
2455 | 2460 | if (document.embeds && document.embeds[this.pid]) |
2456 | 2461 | return document.embeds[this.pid]; |
2457 | 2462 | } |
| 2463 | + return null; |
2458 | 2464 | }, |
2459 | 2465 | activateSlider : function(slider_id){ |
2460 | 2466 | var id = (this.pc)?this.pc.pp.id:this.id; |
— | — | @@ -2793,7 +2799,7 @@ |
2794 | 2800 | /* |
2795 | 2801 | * IE and non-firebug debug: |
2796 | 2802 | */ |
2797 | | - /*var log_elm = document.getElementById('mv_js_log'); |
| 2803 | +/* var log_elm = document.getElementById('mv_js_log'); |
2798 | 2804 | if(!log_elm){ |
2799 | 2805 | document.write('<div style="position:absolute;z-index:500;top:0px;left:0px;right:0px;height:150px;"><textarea id="mv_js_log" cols="80" rows="6"></textarea></div>'); |
2800 | 2806 | var log_elm = document.getElementById('mv_js_log'); |