r40195 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40194‎ | r40195 | r40196 >
Date:23:18, 28 August 2008
Author:dale
Status:old
Tags:
Comment:
fixes for inline display of transcript data
improvements to native playback
Modified paths:
  • /trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_nativeEmbed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_oggplayEmbed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_vlcEmbed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/example_usage/sample_page.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/example_usage/sample_smil.smil.xml (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/mv_playlist.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/skin/styles.css (modified) (history)

Diff [purge]

Index: trunk/extensions/MetavidWiki/skins/mv_embed/example_usage/sample_page.php
@@ -23,8 +23,7 @@
2424
2525 $sample_embed[0]['tag']='<video id="embed_vid"
2626 thumbnail="http://metavid.ucsc.edu/mvw-exp/index.php?action=ajax&rs=mv_frame_server&stream_id=501&t=0:01:32&amp;size=400x300"
27 -roe="http://metavid.ucsc.edu/mvw-exp/index.php?title=Special:MvExportStream&stream_name=House_proceeding_01-28-08&t=0:01:32/0:03:20"
28 -show_meta_link="false"
 27+roe="http://metavid.ucsc.edu/mvw-exp/index.php?title=Special:MvExportStream&stream_name=House_proceeding_01-28-08&feed_format=roe&t=0:01:32/0:03:20"
2928 style="width:400px;height:300px"
3029 controls="true" embed_link="true" >
3130 <source type="video/ogg" src="http://128.114.20.64/media/house_proceeding_01-28-08.ogg.anx?t=0:01:32/0:03:20"></source>
@@ -41,7 +40,7 @@
4241 //$sample_embed[1]['tag'] = '<video roe="http://192.168.0.104/mvWiki/index.php?title=Special:MvExportStream&feed_format=roe&stream_name=Senate_proceeding_08-01-07&t=0:00:00/0:05:00">';
4342 //$sample_embed[1]['desc'] = 'Demo of json ROE attribute';
4443
45 -$sample_embed[3]['tag'] = '<video style="width:400px;height:300px" roe="http://localhost/mvw-exp/index.php?title=Special:MvExportStream&feed_format=roe&stream_name=Senate_proceeding_08-01-07&t=0:06:00/0:07:00"></video>';
 44+$sample_embed[3]['tag'] = '<video style="width:400px;height:300px;" roe="http://localhost/mvw-exp/index.php?title=Special:MvExportStream&feed_format=roe&stream_name=Senate_proceeding_08-01-07&t=0:11:40/0:12:20" ></video>';
4645 $sample_embed[3]['desc'] = 'Demo2 of json ROE attribute';
4746
4847
@@ -109,7 +108,7 @@
110109 <table border="1" cellpadding="6" width="600">
111110 <? foreach($sample_embed as $key=>$aval){
112111 //$key!=8
113 - if($key!=2)continue;
 112+ if($key!=0 && $key!=3)continue;
114113 ?>
115114 <tr>
116115 <td valign="top"><?=$aval['tag']?></td>
Index: trunk/extensions/MetavidWiki/skins/mv_embed/example_usage/sample_smil.smil.xml
@@ -18,13 +18,13 @@
1919 </head>
2020 <body>
2121 <seq>
22 - <video src="sample_magnolia.ogg"
 22+ <video src="sample_magnolia.ogg?t=0:00:0/0:00:05"
2323 region="video_region"
2424 transIn="fromGreen"
2525 begin="2s"
2626 fill="transition"
2727 type="ogg/video"
28 - poster="sample_magnolia.jpg"/>
 28+ poster="sample_magnolia.jpg?t=0:00:0/0:00:26"/>
2929
3030 <video src="sample_fish.ogg"
3131 region="video_region"
Index: trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_nativeEmbed.js
@@ -2,7 +2,16 @@
33 var nativeEmbed = {
44 instanceOf:'nativeEmbed',
55 canPlayThrough:false,
6 - supports: {'play_head':true, 'play_or_pause':true, 'stop':true, 'fullscreen':true, 'time_display':true, 'volume_control':true},
 6+ supports: {
 7+ 'play_head':true,
 8+ 'play_or_pause':true,
 9+ 'fullscreen':false,
 10+ 'time_display':true,
 11+ 'volume_control':true,
 12+
 13+ 'overlays':true,
 14+ 'playlist_driver':true //if the object supports playlist functions
 15+ },
716 getEmbedHTML : function (){
817 setTimeout('$j(\'#'+this.id+'\').get(0).postEmbedJS()', 150);
918 //set a default duration of 30 seconds: cortao should detect duration.
@@ -15,6 +24,7 @@
1625 return '<video " ' +
1726 'id="'+this.pid + '" ' +
1827 'style="width:'+this.width+'px;height:'+this.height+'px;" ' +
 28+ 'width="'+this.width+'" height="'+this.height+'" '+
1929 'src="'+this.media_element.selected_source.uri+'" ' +
2030 'controls="false" ' +
2131 'oncanplaythrough="$j(\'#'+this.id+'\').get(0).oncanplaythrough();return false;" ' +
@@ -63,8 +73,8 @@
6474 /*
6575 * native callbacks for the video tag:
6676 */
67 - oncanplaythrough : function(){
68 - js_log("f:oncanplaythrough start playback");
 77+ oncanplaythrough : function(){
 78+ js_log("f:oncanplaythrough start playback");
6979 this.play();
7080 },
7181 onloadedmetadata: function(){
@@ -88,10 +98,10 @@
8999 this.getVID();
90100 if(!this.vid || this.thumbnail_disp){
91101 this.parent_play();
92 - }else{
 102+ }else{
93103 this.vid.play();
94104 //re-start the monitor:
95 - this.vid.monitor();
 105+ this.monitor();
96106 }
97107 },
98108 // get the embed vlc object
Index: trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_oggplayEmbed.js
@@ -175,9 +175,6 @@
176176 }
177177 js_log('this.ogg: '+ this.ogg);
178178 },
179 - playlistSupport:function(){
180 - return true;
181 - },
182179 playlistPrev:function(){
183180 if(this.ogg){
184181 this.ogg.playlistPrev();
Index: trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_vlcEmbed.js
@@ -12,6 +12,8 @@
1313 'fullscreen':true,
1414 'time_display':true,
1515 'volume_control':false,
 16+
 17+ 'playlist_driver':true, //if the object supports playlist functions
1618 'overlay':false
1719 },
1820 //init vars:
@@ -197,8 +199,9 @@
198200 ' ='+ ((this.vlc.input.time/1000)-this.start_offset)/this.duration );
199201 */
200202 this.setSliderValue( ((this.vlc.input.time/1000) -this.start_offset) / this.duration);
201 - }
202 - this.setStatus(seconds2ntp(this.currentTime) + ' / ' + seconds2ntp(this.duration+this.start_offset) );
 203+ }
 204+ //js_log('set status: '+ seconds2ntp(this.currentTime) + ' e:'+seconds2ntp(this.duration+this.start_offset));
 205+ this.setStatus(seconds2ntp(this.currentTime) + '/' + seconds2ntp(this.duration+this.start_offset) );
203206 }else{
204207 //update info to seek to:
205208 this.setStatus('seek to: ' + seconds2ntp(Math.round( (this.sliderVal*this.duration)) ));
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js
@@ -679,27 +679,8 @@
680680 //check if this page does have video or playlist
681681 if(document.getElementsByTagName("video").length!=0 ||
682682 document.getElementsByTagName("playlist").length!=0){
683 - js_log('we have vids to process');
684 -
685 - //add loading txt for each video
686 - video_elements = document.getElementsByTagName("video");
687 - for(var i = 0; i < video_elements.length; i++) {
688 - parent_elm = video_elements[i].parentNode;
689 - load_div = document.createElement('div');
690 - load_div.setAttribute("id", 'pre_loading_div_'+i);
691 - load_div.innerHTML=getMsg('loading_txt');
692 - parent_elm.appendChild(load_div);
693 - js_log('load div: '+load_div.innerHTML);
694 - }
695 -
696 - //if safari we have already foce loadded the libs
697 - /*if(embedTypes.safari){
698 - js_log('run init for safari');
699 - mvEmbed.init();
700 - }else{*/
701 - //safari >2.0 now supports loading via DOM insert (no need to force load before dom is ready)
702 - mvEmbed.load_libs();
703 - //}
 683+ js_log('we have vids to process');
 684+ mvEmbed.load_libs();
704685 }else{
705686 js_log('no video or playlist on the page... (done)');
706687 //run any queued functions:
@@ -793,22 +774,24 @@
794775 for(var i = 0; i < video_elements.length; i++) {
795776 debug_global_vid_ref =video_elements[i];
796777 //grab id:
797 - vid_id = video_elements[i].getAttribute("id");
798 -
 778+ vid_id = video_elements[i].getAttribute("id");
799779 //set id if empty:
800780 if(!vid_id || vid_id==''){
801781 video_elements[i].id= 'v'+ global_ogg_list.length;
802782 }
 783+ //append loading div:
 784+
 785+
803786 //create and swap in the video interface:
804787 var videoInterface = new embedVideo(video_elements[i]);
805788 //swap in:
806789 if(swapEmbedVideoElement(video_elements[i], videoInterface)){
807790 //remove pre_loading_div_
808 - $j('#pre_loading_div_'+i).remove();
 791+ $j('#pre_loading_div_'+videoInterface.vid_id).remove();
809792 i--;
810793 }else{
811794 //replace loading with failed
812 - $j('#pre_loading_div_'+i).html(getMsg('error_swap_vid'));
 795+ $j('#pre_loading_div_'+vid_id).html(getMsg('error_swap_vid'));
813796 }
814797 }
815798 }else{
@@ -859,10 +842,19 @@
860843 var pl_id = playlist_elements[i].getAttribute('id');
861844 if(!pl_id || pl_id==''){
862845 playlist_elements[i].id = 'v'+ global_ogg_list.length;
863 - }
 846+ }
 847+ //add loading:
 848+ parent_elm = video_elements[i].parentNode;
 849+ load_div = document.createElement('div');
 850+ load_div.setAttribute("id", 'pre_loading_div_'+pl_id);
 851+ load_div.innerHTML=getMsg('loading_txt');
 852+ parent_elm.appendChild(load_div);
 853+ js_log('load div: '+load_div.innerHTML);
 854+
864855 //create new playlist interface:
865856 var playlistInterface = new mvPlayList( playlist_elements[i] );
866857 if(swapEmbedVideoElement(playlist_elements[i], playlistInterface) ){
 858+ $j('#pre_loading_div_'+pl_id);
867859 i--;
868860 }
869861 }
@@ -905,14 +897,12 @@
906898 $j('#'+embed_video.id).get(0).on_dom_swap();
907899 // now that "embed_video" is stable, do more initialization (if we are ready)
908900 if($j('#'+embed_video.id).get(0).loading_external_data==false &&
909 - $j('#'+embed_video.id).get(0).init_with_sources_loadedDone==false){
910 - js_log("NOT LOADING ext data jump to init with sources");
 901+ $j('#'+embed_video.id).get(0).init_with_sources_loadedDone==false){
 902+ //load and set ready state since source are avaliable:
911903 $j('#'+embed_video.id).get(0).init_with_sources_loaded();
912904 }
913 - //js_log(" isd: "+this.init_with_sources_loadedDone + ' ed:' + )
914 -
 905+ //js_log(" isd: "+this.init_with_sources_loadedDone + ' ed:' + )
915906 //js_log('vid elm:'+ $j(video_element).html() );
916 -
917907 /* var parent_elm = video_element.parentNode;
918908 js_log('remove video elm');
919909 parent_elm.removeChild(video_element);
@@ -925,8 +915,7 @@
926916
927917 //now run the getHTML on the new embedVideo Obj:
928918 embed_video.getHTML();
929 - */
930 -
 919+ */
931920 //js_log('html set:' + document.getElementById(embed_video.id).innerHTML);
932921 //store a reference to the id
933922 //(for single instance plugins that need to keep track of other instances on the page)
@@ -966,18 +955,33 @@
967956 //set the parent embed object:
968957 this.pe=parentEmbed;
969958 //parse roe if not already done:
970 - this.getParseCMML();
971 - //start the autoscroll timer:
972 - this.setAutoScroll(true);
 959+ this.getParseCMML();
973960 },
974961 //@@todo seperate out data loader & data display
975962 getParseCMML:function(){
976 - js_log("load cmml");
 963+ js_log("load cmml from roe: "+ this.pe.roe);
977964 //read the current play head time (if embed object is playing)
978 -
979 - //look at avaliable layers and default layer set
980 -
981 - //@@todo use user-language as key to select transcript layer.
 965+
 966+ //if roe not yet loaded do load it:
 967+ if(this.pe.roe){
 968+ if(!this.pe.media_element.addedROEData){
 969+ js_log("load roe data!");
 970+ var _this = this;
 971+ do_request(this.pe.roe, function(data)
 972+ {
 973+ //continue
 974+ _this.pe.media_element.addROE(data);
 975+ _this.getParseCMML_rowReady();
 976+ });
 977+ }else{
 978+ js_log('row data ready (no roe request)');
 979+ this.getParseCMML_rowReady();
 980+ }
 981+ }else{
 982+ js_log('no roe data to get text transcript from');
 983+ }
 984+ },
 985+ getParseCMML_rowReady: function (){
982986 _this = this;
983987 $j.each(this.pe.media_element.sources, function(inx, n){
984988 if(n.mime_type=='text/cmml'){
@@ -1027,8 +1031,8 @@
10281032 $j('#mv_loading_icon').css('display','none');
10291033 $j.each(data.getElementsByTagName('clip'), function(inx, n){
10301034 var text_clip = {
1031 - start:n.getAttribute('start').replace('ntp:', ''),
1032 - end:n.getAttribute('end').replace('ntp:', ''),
 1035+ start:n.getAttribute('start').replace('npt:', ''),
 1036+ end:n.getAttribute('end').replace('npt:', ''),
10331037 type_id:track_id,
10341038 id:n.getAttribute('id')
10351039 }
@@ -1044,6 +1048,8 @@
10451049 //done loading update availableTracks
10461050 _this.availableTracks[track_id].loaded=true;
10471051 _this.availableTracks[track_id].display=true;
 1052+ //start the autoscroll timer:
 1053+ _this.setAutoScroll(true);
10481054 });
10491055 },
10501056 add_merge_text_clip:function(text_clip){
@@ -1080,8 +1086,10 @@
10811087 /*fade out cc button*/
10821088 $j('#metaButton_'+this.pe.id).fadeOut('fast');
10831089 /*slide in intefrace container*/
1084 - if($j('#metaBox_'+this.pe.id).length==0){
1085 -
 1090+ //dont' know how 'px' creeps in here:
 1091+ this.pe.height = this.pe.height.replace('px', '');
 1092+
 1093+ if($j('#metaBox_'+this.pe.id).length==0){
10861094 //append it to body relative to offset of this.pe
10871095 var loc = $j(this.pe).position();
10881096 //js_log('top ' +loc.top + ' left:'+loc.left );
@@ -1585,12 +1593,14 @@
15861594 embedVideo.prototype = {
15871595 /** The mediaElement object containing all mediaSource objects */
15881596 media_element:null,
1589 - slider:null,
 1597+ slider:null,
 1598+ ready_to_play:false, //should use html5 ready state
15901599 loading_external_data:false,
15911600 thumbnail_updating:false,
 1601+ thumbnail_disp:true,
15921602 init_with_sources_loadedDone:false,
15931603 inDOM:false,
1594 - supports:{},
 1604+ supports:{},
15951605 //utility functions for property values:
15961606 hx : function ( s ) {
15971607 if ( typeof s != 'String' ) {
@@ -1632,6 +1642,7 @@
16331643 //js_log('attr:' + attr + ' val: ' + video_attributes[attr] +" "+ 'elm_val:' + element.getAttribute(attr) + "\n (set by attr)");
16341644 }
16351645 }
 1646+ js_log("ROE SET: "+ this.roe);
16361647 //if style is set override width and height
16371648 var dwh = mv_default_video_size.split('x');
16381649 this.width = element.style.width ? element.style.width : dwh[0];
@@ -1646,10 +1657,11 @@
16471658 this.user_missing_plugin_html=element.innerHTML;
16481659 }
16491660 // load all of the specified sources
1650 - this.media_element = new mediaElement(element);
 1661+ this.media_element = new mediaElement(element);
16511662 },
1652 - on_dom_swap : function(){
 1663+ on_dom_swap: function(){
16531664 js_log('f:on_dom_swap');
 1665+ js_log("ROE SET: "+ this.roe);
16541666 // Process the provided ROE file... if we don't yet have sources
16551667 if(this.roe && this.media_element.sources.length==0 ){
16561668 js_log('loading external data');
@@ -1667,7 +1679,7 @@
16681680 });
16691681 }
16701682 },
1671 - init_with_sources_loaded : function(ready_callback)
 1683+ init_with_sources_loaded : function()
16721684 {
16731685 js_log('f:init_with_sources_loaded');
16741686 //autoseletct the source
@@ -1692,7 +1704,7 @@
16931705 * override all relevant exported functions with the {embed_type} Object
16941706 * place the base functions in parent.{function name}
16951707 */
1696 - this.inheritEmbedObj(ready_callback);
 1708+ this.inheritEmbedObj();
16971709
16981710 //update HTML
16991711 $j('#'+embed_video.id).get(0).getHTML();
@@ -1702,6 +1714,54 @@
17031715 //return this;
17041716 this.init_with_sources_loadedDone=true;
17051717 },
 1718+ inheritEmbedObj:function(ready_callback){
 1719+ js_log("f: inheritEmbedObj");
 1720+ //@@note: tricky cuz direct overwrite is not so ideal.. since the extended object is already tied to the dom
 1721+ //clear out any non-base embedObj stuff:
 1722+ if(this.instanceOf){
 1723+ eval('tmpObj = '+this.instanceOf);
 1724+ for(i in tmpObj){
 1725+ if(this['parent_'+i]){
 1726+ this[i]=this['parent_'+i];
 1727+ }else{
 1728+ this[i]=null;
 1729+ }
 1730+ }
 1731+ }
 1732+ //set up the new embedObj
 1733+ js_log('embedding with ' + this.selected_player.library);
 1734+ var _this = this;
 1735+ this.selected_player.load(function()
 1736+ {
 1737+ js_log('inheriting '+_this.selected_player.library +'Embed to ' + _this.id + ' ' + $j('#'+_this.id).length);
 1738+ //var _this = $j('#'+_this.id).get(0);
 1739+ js_log( 'type of ' + _this.selected_player.library +'Embed + ' +
 1740+ eval('typeof '+_this.selected_player.library +'Embed'));
 1741+ eval('embedObj = ' +_this.selected_player.library +'Embed;');
 1742+ for(method in embedObj){
 1743+ //parent method preservation for local overwritten methods
 1744+ if(_this[method])
 1745+ _this['parent_' + method] = _this[method];
 1746+ _this[method]=embedObj[method];
 1747+ }
 1748+ if(_this.inheritEmbedOverride){
 1749+ _this.inheritEmbedOverride();
 1750+ }
 1751+ //update controls if possible
 1752+ if(!_this.loading_external_data)
 1753+ _this.refreshControlsHTML();
 1754+
 1755+ if(ready_callback)
 1756+ ready_callback();
 1757+ js_log('plugin load callback complete');
 1758+
 1759+ js_log("ROE SET: "+ _this.roe);
 1760+
 1761+ js_log("READY TO PLAY:"+_this.id);
 1762+
 1763+ _this.ready_to_play=true;
 1764+ });
 1765+ },
17061766 selectPlayer:function(player)
17071767 {
17081768 var _this = this;
@@ -1727,7 +1787,7 @@
17281788 },
17291789 /* get the duration in ntp format */
17301790 getDurationNTP:function(){
1731 - return seconds2ntp(this.getDuration()/1000);
 1791+ return seconds2ntp(this.getDuration());
17321792 },
17331793 /*
17341794 * wrapEmebedContainer
@@ -1809,15 +1869,14 @@
18101870 html_code += '<span class="border_left">&nbsp;</span>';
18111871 available_width -= 4;
18121872 html_code += '<span class="border_right">&nbsp;</span>';
1813 - available_width -= 4;
1814 -
 1873+ available_width -= 4;
 1874+
18151875 // fullscreen
18161876 if(this.supports['fullscreen'])
18171877 {
18181878 html_code += '<div class="fullscreen"><a href="javascript:$j(\'#'+this.id+'\').get(0).fullscreen();"></a></div>';
18191879 available_width -= 20;
18201880 }
1821 -
18221881 // options
18231882 html_code += '<div class="options"><a href="javascript:$j(\'#'+this.id+'\').get(0).DoOptionsHTML();"></a></div>';
18241883 available_width -= 26;
@@ -1826,7 +1885,6 @@
18271886 if(options_margin<0) options_margin = 0;
18281887
18291888 $j('#mv_embedded_options_'+this.id).css('margin-left',options_margin+'px');
1830 -
18311889 // play_pause
18321890 if (this.supports['play_or_pause'])
18331891 {
@@ -1835,14 +1893,13 @@
18361894 }
18371895
18381896 // closed captioning
1839 - if(this.media_element.hasStreamOfMIMEType('text/cmml') && this.show_meta_link)
 1897+ if(this.roe && this.show_meta_link)
18401898 {
18411899 //add in cmml inline dispaly if roe description avaliable
18421900 //not to be displayed in stream interface.
18431901 html_code += '<div class="closed_captions"><a href="javascript:$j(\'#'+this.id+'\').get(0).showTextInterface();"></a></div>';
18441902 available_width -= 40;
18451903 }
1846 -
18471904 // volume control
18481905 if(this.supports['volume_control'])
18491906 {
@@ -1854,7 +1911,6 @@
18551912 html_code +='<div class="volume_icon"></div>';
18561913 available_width -= 22;
18571914 }
1858 -
18591915 // time display
18601916 if(this.supports['time_display'] && (available_width > 80))
18611917 {
@@ -1876,57 +1932,14 @@
18771933 ' </div><!--seeker-->';
18781934 }
18791935 return html_code;
1880 - },
1881 - inheritEmbedObj:function(ready_callback){
1882 - js_log("f: inheritEmbedObj");
1883 - //@@note: tricky cuz direct overwrite is not so ideal.. since the extended object is already tied to the dom
1884 - //clear out any non-base embedObj stuff:
1885 - if(this.instanceOf){
1886 - eval('tmpObj = '+this.instanceOf);
1887 - for(i in tmpObj){
1888 - if(this['parent_'+i]){
1889 - this[i]=this['parent_'+i];
1890 - }else{
1891 - this[i]=null;
1892 - }
1893 - }
1894 - }
1895 - if(!this.supports)
1896 - this.supports = {};
1897 -
1898 - //set up the new embedObj
1899 - js_log('embedding with ' + this.selected_player.library);
1900 - var _this = this;
1901 - this.selected_player.load(function()
1902 - {
1903 - js_log('inheriting '+_this.selected_player.library +'Embed to ' + _this.id + ' ' + $j('#'+_this.id).length);
1904 - //var _this = $j('#'+_this.id).get(0);
1905 - js_log( 'type of ' + _this.selected_player.library +'Embed + ' +
1906 - eval('typeof '+_this.selected_player.library +'Embed'));
1907 - eval('embedObj = ' +_this.selected_player.library +'Embed;');
1908 - for(method in embedObj){
1909 - //parent method preservation for local overwritten methods
1910 - if(_this[method])
1911 - _this['parent_' + method] = _this[method];
1912 - _this[method]=embedObj[method];
1913 - }
1914 - if(_this.inheritEmbedOverride){
1915 - _this.inheritEmbedOverride();
1916 - }
1917 - //update controls if possible
1918 - if(!_this.loading_external_data)
1919 - _this.refreshControlsHTML();
1920 -
1921 - if(ready_callback)
1922 - ready_callback();
1923 - js_log('plugin load callback complete');
1924 - });
1925 - },
 1936+ },
19261937 getHTML : function (){
19271938 //@@todo check if we have sources avaliable
1928 - js_log('f:getHTML');
1929 - var html_code = '';
 1939+ js_log('f : getHTML');
19301940
 1941+
 1942+
 1943+ var html_code = '';
19311944 html_code = '<div style="width:'+this.width+'px;" class="videoPlayer">';
19321945 html_code += '<div id="mv_embedded_player_'+this.id+'">' +
19331946 this.getThumbnailHTML() +
@@ -1969,7 +1982,7 @@
19701983 html_code += '</div>';
19711984 js_log('should set: '+this.id);
19721985 $j(this).html(html_code);
1973 - js_log('set this to: ' + $j(this).html() );
 1986+ //js_log('set this to: ' + $j(this).html() );
19741987 //alert('stop');
19751988 //if auto play==true directly embed the plugin
19761989 if(this.autoplay)
@@ -2211,7 +2224,9 @@
22122225 */
22132226 displayHTML:function(html_code)
22142227 {
2215 - this.stop();
 2228+ if(!this.supports['overlays'])
 2229+ this.stop();
 2230+
22162231 //put select list on-top
22172232 //make sure the parent is relatively positioned:
22182233 $j('#'+this.id).css('position', 'relative');
@@ -2228,29 +2243,6 @@
22292244 fade_in = false;
22302245 $j('#blackbg_'+sel_id).remove();
22312246 }
2232 -/* <div id="videoComplete">
2233 - <div id="videoOptionsComplete">
2234 - <a href="#" class="email">Share Clip via Email</a>
2235 - <p>or</p>
2236 - <a href="#">Embed Clip in Blog or Site</a>
2237 - <div class="embed_code">
2238 - <textarea name="embed" id="embed">HTML embed code</textarea>
2239 -
2240 - <button class="copy_to_clipboard">Copy to Clipboard</button>
2241 - </div>
2242 - </div>
2243 - </div>*/
2244 -/*
2245 - var div_code = '<div id="blackbg_'+sel_id+'" ' +
2246 - 'style="overflow:auto;position:absolute;display:none;z-index:2;background:black;top:0px;left:0px;' +
2247 - 'height:'+parseInt(height)+'px;width:'+parseInt(width)+'px;">'+
2248 -// '<span class="displayHTML" id="con_vl_'+this.id+'" style="position:absolute;top:20px;left:20px;color:white;">' +
2249 - '<div style="border:none;position:absolute;top:2px;right:2px;z-index:1"><span>'+
2250 - '<a href="#" style="color:white;" onClick="$j(\'#'+sel_id+'\').get(0).closeDisplayedHTML();">close</a></span></div>'+
2251 - html_code +
2252 -// close_link+'</span>'+
2253 - '</div>';*/
2254 -
22552247 //fade in a black bg div ontop of everything
22562248 var div_code = '<div id="blackbg_'+sel_id+'" class="videoComplete" ' +
22572249 'style="height:'+parseInt(height)+'px;width:'+parseInt(width)+'px;">'+
@@ -2436,7 +2428,6 @@
24372429 pause : function(){
24382430 return null
24392431 },
2440 -
24412432 /*
24422433 * base embed stop (should be overwritten by the plugin)
24432434 */
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skin/styles.css
@@ -135,7 +135,7 @@
136136 .videoPlayer .time {
137137 line-height: 32px;
138138 height: 29px;
139 - overflow: hidden;
 139+ overflow: visible;
140140 font-size: 11px;
141141 width: 80px;
142142 float: right;
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_playlist.js
@@ -58,7 +58,7 @@
5959 loading_external_data:true, //load external data by default
6060 tracks:{},
6161 default_track:null, // the default track to add clips to.
62 - init:function(element){
 62+ init : function(element){
6363 js_log('init');
6464 //add default track & default track pointer:
6565 this.tracks[0]= new trackObj;
@@ -145,8 +145,7 @@
146146 }
147147 }else{
148148 js_log('error: method doParse not found in plObj');
149 - }
150 -
 149+ }
151150 },
152151 doWhenParseDone:function(){
153152 js_log("do when parse done: "+ this.default_track_id + ' len:'+ this.default_track.clips.length);
@@ -289,9 +288,9 @@
290289 $j(this).html('empty playlist');
291290 return ;
292291 }
293 - $j(this).html('<div id="dc_'+this.id+'" style="border:solid thin;width:'+this.width+'px;' +
 292+ $j(this).html('<div id="ptitle_'+this.id+'"></div><div id="dc_'+this.id+'" style="border:solid thin;width:'+this.width+'px;' +
294293 'height:'+this.height+'px;position:relative;"></div>');
295 -
 294+ this.updateTitle();
296295 var plObj=this;
297296 //append all embed details
298297 //@@todo move into trackObj
@@ -347,7 +346,7 @@
348347
349348
350349
351 - this.updateTitle();
 350+
352351 //check if we are in sequence mode (for seq layout don't display clips)
353352 js_log('seq: ' + this.sequencer);
354353 if(this.sequencer=='true'){ //string val
@@ -486,7 +485,7 @@
487486 this.cur_clip.embed.pe_postEmbedJS();
488487 },
489488 //playlist play
490 - play:function(){
 489+ play : function(){
491490 var plObj=this;
492491 js_log('pl play');
493492 //update cur clip based if sequence playhead set:
@@ -494,13 +493,14 @@
495494 this.start_clip = this.cur_clip;
496495 this.start_clip_src= this.cur_clip.src;
497496 //load up the ebmed object with the playlist (if it supports it)
498 - if(this.cur_clip.embed.playlistSupport() ){
 497+ if(this.cur_clip.embed.suports['playlist_driver'] ){
 498+ js_log('clip obj supports playlist driver');
499499 this.cur_clip.embed.playMovieAt(this.cur_clip.order);
500500 }else{
 501+ js_log('basic play');
501502 //play cur_clip
502503 this.cur_clip.embed.play();
503504 }
504 -
505505 },
506506 //wrappers for call to pl object to current embed obj
507507 play_or_pause:function(){
@@ -780,7 +780,8 @@
781781 if(this.type)init_pl_embed['type'] = this.type;
782782
783783 this.embed = new PlMvEmbed(init_pl_embed);
784 - js_log('type of embed:' + typeof(this.embed) + 'seq:' + this.pp.sequencer+' pb:'+ this.embed.play_button);
 784+
 785+ js_log('type of embed:' + typeof(this.embed) + ' seq:' + this.pp.sequencer+' pb:'+ this.embed.play_button);
785786 },
786787 //returns the mvClip representation of the clip ie stream_name?start_time/end_time
787788 getMvClip:function(){
@@ -1048,7 +1049,7 @@
10491050 }
10501051 }
10511052 var videoInterface = new embedVideo(ve);
1052 - //js_log('created Embed Video');
 1053+ js_log('created Embed Video');
10531054 //inherit the videoInterface
10541055 for(method in videoInterface){
10551056 if(method!='style'){
@@ -1453,12 +1454,13 @@
14541455 //@@todo get/parse meta:
14551456 var meta_tags = this.data.getElementsByTagName('meta');
14561457 $j.each(meta_tags, function(i,meta_elm){
 1458+ js_log("ON META TAG: "+meta_elm.getAttribute('name'));
14571459 if(meta_elm.hasAttribute('name') && meta_elm.hasAttribute('content')){
14581460 if(meta_elm.getAttribute('name')=='title' ){
1459 - _this.title = meta_elm.getAttribute('content');
 1461+ _this.title = meta_elm.getAttribute('content');
14601462 }
14611463 }
1462 - });
 1464+ });
14631465 //add transition objects:
14641466 var transition_tags = this.data.getElementsByTagName('transition');
14651467 $j.each(transition_tags, function(i,trans_elm){