Index: trunk/extensions/MetavidWiki/skins/mv_embed/example_usage/sample_page.php |
— | — | @@ -23,8 +23,7 @@ |
24 | 24 | |
25 | 25 | $sample_embed[0]['tag']='<video id="embed_vid" |
26 | 26 | thumbnail="http://metavid.ucsc.edu/mvw-exp/index.php?action=ajax&rs=mv_frame_server&stream_id=501&t=0:01:32&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" |
29 | 28 | style="width:400px;height:300px" |
30 | 29 | controls="true" embed_link="true" > |
31 | 30 | <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 @@ |
42 | 41 | //$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">'; |
43 | 42 | //$sample_embed[1]['desc'] = 'Demo of json ROE attribute'; |
44 | 43 | |
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>'; |
46 | 45 | $sample_embed[3]['desc'] = 'Demo2 of json ROE attribute'; |
47 | 46 | |
48 | 47 | |
— | — | @@ -109,7 +108,7 @@ |
110 | 109 | <table border="1" cellpadding="6" width="600"> |
111 | 110 | <? foreach($sample_embed as $key=>$aval){ |
112 | 111 | //$key!=8 |
113 | | - if($key!=2)continue; |
| 112 | + if($key!=0 && $key!=3)continue; |
114 | 113 | ?> |
115 | 114 | <tr> |
116 | 115 | <td valign="top"><?=$aval['tag']?></td> |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/example_usage/sample_smil.smil.xml |
— | — | @@ -18,13 +18,13 @@ |
19 | 19 | </head> |
20 | 20 | <body> |
21 | 21 | <seq> |
22 | | - <video src="sample_magnolia.ogg" |
| 22 | + <video src="sample_magnolia.ogg?t=0:00:0/0:00:05" |
23 | 23 | region="video_region" |
24 | 24 | transIn="fromGreen" |
25 | 25 | begin="2s" |
26 | 26 | fill="transition" |
27 | 27 | type="ogg/video" |
28 | | - poster="sample_magnolia.jpg"/> |
| 28 | + poster="sample_magnolia.jpg?t=0:00:0/0:00:26"/> |
29 | 29 | |
30 | 30 | <video src="sample_fish.ogg" |
31 | 31 | region="video_region" |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_nativeEmbed.js |
— | — | @@ -2,7 +2,16 @@ |
3 | 3 | var nativeEmbed = { |
4 | 4 | instanceOf:'nativeEmbed', |
5 | 5 | 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 | + }, |
7 | 16 | getEmbedHTML : function (){ |
8 | 17 | setTimeout('$j(\'#'+this.id+'\').get(0).postEmbedJS()', 150); |
9 | 18 | //set a default duration of 30 seconds: cortao should detect duration. |
— | — | @@ -15,6 +24,7 @@ |
16 | 25 | return '<video " ' + |
17 | 26 | 'id="'+this.pid + '" ' + |
18 | 27 | 'style="width:'+this.width+'px;height:'+this.height+'px;" ' + |
| 28 | + 'width="'+this.width+'" height="'+this.height+'" '+ |
19 | 29 | 'src="'+this.media_element.selected_source.uri+'" ' + |
20 | 30 | 'controls="false" ' + |
21 | 31 | 'oncanplaythrough="$j(\'#'+this.id+'\').get(0).oncanplaythrough();return false;" ' + |
— | — | @@ -63,8 +73,8 @@ |
64 | 74 | /* |
65 | 75 | * native callbacks for the video tag: |
66 | 76 | */ |
67 | | - oncanplaythrough : function(){ |
68 | | - js_log("f:oncanplaythrough start playback"); |
| 77 | + oncanplaythrough : function(){ |
| 78 | + js_log("f:oncanplaythrough start playback"); |
69 | 79 | this.play(); |
70 | 80 | }, |
71 | 81 | onloadedmetadata: function(){ |
— | — | @@ -88,10 +98,10 @@ |
89 | 99 | this.getVID(); |
90 | 100 | if(!this.vid || this.thumbnail_disp){ |
91 | 101 | this.parent_play(); |
92 | | - }else{ |
| 102 | + }else{ |
93 | 103 | this.vid.play(); |
94 | 104 | //re-start the monitor: |
95 | | - this.vid.monitor(); |
| 105 | + this.monitor(); |
96 | 106 | } |
97 | 107 | }, |
98 | 108 | // get the embed vlc object |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_oggplayEmbed.js |
— | — | @@ -175,9 +175,6 @@ |
176 | 176 | } |
177 | 177 | js_log('this.ogg: '+ this.ogg); |
178 | 178 | }, |
179 | | - playlistSupport:function(){ |
180 | | - return true; |
181 | | - }, |
182 | 179 | playlistPrev:function(){ |
183 | 180 | if(this.ogg){ |
184 | 181 | this.ogg.playlistPrev(); |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_vlcEmbed.js |
— | — | @@ -12,6 +12,8 @@ |
13 | 13 | 'fullscreen':true, |
14 | 14 | 'time_display':true, |
15 | 15 | 'volume_control':false, |
| 16 | + |
| 17 | + 'playlist_driver':true, //if the object supports playlist functions |
16 | 18 | 'overlay':false |
17 | 19 | }, |
18 | 20 | //init vars: |
— | — | @@ -197,8 +199,9 @@ |
198 | 200 | ' ='+ ((this.vlc.input.time/1000)-this.start_offset)/this.duration ); |
199 | 201 | */ |
200 | 202 | 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) ); |
203 | 206 | }else{ |
204 | 207 | //update info to seek to: |
205 | 208 | 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 @@ |
680 | 680 | //check if this page does have video or playlist |
681 | 681 | if(document.getElementsByTagName("video").length!=0 || |
682 | 682 | 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(); |
704 | 685 | }else{ |
705 | 686 | js_log('no video or playlist on the page... (done)'); |
706 | 687 | //run any queued functions: |
— | — | @@ -793,22 +774,24 @@ |
794 | 775 | for(var i = 0; i < video_elements.length; i++) { |
795 | 776 | debug_global_vid_ref =video_elements[i]; |
796 | 777 | //grab id: |
797 | | - vid_id = video_elements[i].getAttribute("id"); |
798 | | - |
| 778 | + vid_id = video_elements[i].getAttribute("id"); |
799 | 779 | //set id if empty: |
800 | 780 | if(!vid_id || vid_id==''){ |
801 | 781 | video_elements[i].id= 'v'+ global_ogg_list.length; |
802 | 782 | } |
| 783 | + //append loading div: |
| 784 | + |
| 785 | + |
803 | 786 | //create and swap in the video interface: |
804 | 787 | var videoInterface = new embedVideo(video_elements[i]); |
805 | 788 | //swap in: |
806 | 789 | if(swapEmbedVideoElement(video_elements[i], videoInterface)){ |
807 | 790 | //remove pre_loading_div_ |
808 | | - $j('#pre_loading_div_'+i).remove(); |
| 791 | + $j('#pre_loading_div_'+videoInterface.vid_id).remove(); |
809 | 792 | i--; |
810 | 793 | }else{ |
811 | 794 | //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')); |
813 | 796 | } |
814 | 797 | } |
815 | 798 | }else{ |
— | — | @@ -859,10 +842,19 @@ |
860 | 843 | var pl_id = playlist_elements[i].getAttribute('id'); |
861 | 844 | if(!pl_id || pl_id==''){ |
862 | 845 | 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 | + |
864 | 855 | //create new playlist interface: |
865 | 856 | var playlistInterface = new mvPlayList( playlist_elements[i] ); |
866 | 857 | if(swapEmbedVideoElement(playlist_elements[i], playlistInterface) ){ |
| 858 | + $j('#pre_loading_div_'+pl_id); |
867 | 859 | i--; |
868 | 860 | } |
869 | 861 | } |
— | — | @@ -905,14 +897,12 @@ |
906 | 898 | $j('#'+embed_video.id).get(0).on_dom_swap(); |
907 | 899 | // now that "embed_video" is stable, do more initialization (if we are ready) |
908 | 900 | 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: |
911 | 903 | $j('#'+embed_video.id).get(0).init_with_sources_loaded(); |
912 | 904 | } |
913 | | - //js_log(" isd: "+this.init_with_sources_loadedDone + ' ed:' + ) |
914 | | - |
| 905 | + //js_log(" isd: "+this.init_with_sources_loadedDone + ' ed:' + ) |
915 | 906 | //js_log('vid elm:'+ $j(video_element).html() ); |
916 | | - |
917 | 907 | /* var parent_elm = video_element.parentNode; |
918 | 908 | js_log('remove video elm'); |
919 | 909 | parent_elm.removeChild(video_element); |
— | — | @@ -925,8 +915,7 @@ |
926 | 916 | |
927 | 917 | //now run the getHTML on the new embedVideo Obj: |
928 | 918 | embed_video.getHTML(); |
929 | | - */ |
930 | | - |
| 919 | + */ |
931 | 920 | //js_log('html set:' + document.getElementById(embed_video.id).innerHTML); |
932 | 921 | //store a reference to the id |
933 | 922 | //(for single instance plugins that need to keep track of other instances on the page) |
— | — | @@ -966,18 +955,33 @@ |
967 | 956 | //set the parent embed object: |
968 | 957 | this.pe=parentEmbed; |
969 | 958 | //parse roe if not already done: |
970 | | - this.getParseCMML(); |
971 | | - //start the autoscroll timer: |
972 | | - this.setAutoScroll(true); |
| 959 | + this.getParseCMML(); |
973 | 960 | }, |
974 | 961 | //@@todo seperate out data loader & data display |
975 | 962 | getParseCMML:function(){ |
976 | | - js_log("load cmml"); |
| 963 | + js_log("load cmml from roe: "+ this.pe.roe); |
977 | 964 | //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 (){ |
982 | 986 | _this = this; |
983 | 987 | $j.each(this.pe.media_element.sources, function(inx, n){ |
984 | 988 | if(n.mime_type=='text/cmml'){ |
— | — | @@ -1027,8 +1031,8 @@ |
1028 | 1032 | $j('#mv_loading_icon').css('display','none'); |
1029 | 1033 | $j.each(data.getElementsByTagName('clip'), function(inx, n){ |
1030 | 1034 | 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:', ''), |
1033 | 1037 | type_id:track_id, |
1034 | 1038 | id:n.getAttribute('id') |
1035 | 1039 | } |
— | — | @@ -1044,6 +1048,8 @@ |
1045 | 1049 | //done loading update availableTracks |
1046 | 1050 | _this.availableTracks[track_id].loaded=true; |
1047 | 1051 | _this.availableTracks[track_id].display=true; |
| 1052 | + //start the autoscroll timer: |
| 1053 | + _this.setAutoScroll(true); |
1048 | 1054 | }); |
1049 | 1055 | }, |
1050 | 1056 | add_merge_text_clip:function(text_clip){ |
— | — | @@ -1080,8 +1086,10 @@ |
1081 | 1087 | /*fade out cc button*/ |
1082 | 1088 | $j('#metaButton_'+this.pe.id).fadeOut('fast'); |
1083 | 1089 | /*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){ |
1086 | 1094 | //append it to body relative to offset of this.pe |
1087 | 1095 | var loc = $j(this.pe).position(); |
1088 | 1096 | //js_log('top ' +loc.top + ' left:'+loc.left ); |
— | — | @@ -1585,12 +1593,14 @@ |
1586 | 1594 | embedVideo.prototype = { |
1587 | 1595 | /** The mediaElement object containing all mediaSource objects */ |
1588 | 1596 | media_element:null, |
1589 | | - slider:null, |
| 1597 | + slider:null, |
| 1598 | + ready_to_play:false, //should use html5 ready state |
1590 | 1599 | loading_external_data:false, |
1591 | 1600 | thumbnail_updating:false, |
| 1601 | + thumbnail_disp:true, |
1592 | 1602 | init_with_sources_loadedDone:false, |
1593 | 1603 | inDOM:false, |
1594 | | - supports:{}, |
| 1604 | + supports:{}, |
1595 | 1605 | //utility functions for property values: |
1596 | 1606 | hx : function ( s ) { |
1597 | 1607 | if ( typeof s != 'String' ) { |
— | — | @@ -1632,6 +1642,7 @@ |
1633 | 1643 | //js_log('attr:' + attr + ' val: ' + video_attributes[attr] +" "+ 'elm_val:' + element.getAttribute(attr) + "\n (set by attr)"); |
1634 | 1644 | } |
1635 | 1645 | } |
| 1646 | + js_log("ROE SET: "+ this.roe); |
1636 | 1647 | //if style is set override width and height |
1637 | 1648 | var dwh = mv_default_video_size.split('x'); |
1638 | 1649 | this.width = element.style.width ? element.style.width : dwh[0]; |
— | — | @@ -1646,10 +1657,11 @@ |
1647 | 1658 | this.user_missing_plugin_html=element.innerHTML; |
1648 | 1659 | } |
1649 | 1660 | // load all of the specified sources |
1650 | | - this.media_element = new mediaElement(element); |
| 1661 | + this.media_element = new mediaElement(element); |
1651 | 1662 | }, |
1652 | | - on_dom_swap : function(){ |
| 1663 | + on_dom_swap: function(){ |
1653 | 1664 | js_log('f:on_dom_swap'); |
| 1665 | + js_log("ROE SET: "+ this.roe); |
1654 | 1666 | // Process the provided ROE file... if we don't yet have sources |
1655 | 1667 | if(this.roe && this.media_element.sources.length==0 ){ |
1656 | 1668 | js_log('loading external data'); |
— | — | @@ -1667,7 +1679,7 @@ |
1668 | 1680 | }); |
1669 | 1681 | } |
1670 | 1682 | }, |
1671 | | - init_with_sources_loaded : function(ready_callback) |
| 1683 | + init_with_sources_loaded : function() |
1672 | 1684 | { |
1673 | 1685 | js_log('f:init_with_sources_loaded'); |
1674 | 1686 | //autoseletct the source |
— | — | @@ -1692,7 +1704,7 @@ |
1693 | 1705 | * override all relevant exported functions with the {embed_type} Object |
1694 | 1706 | * place the base functions in parent.{function name} |
1695 | 1707 | */ |
1696 | | - this.inheritEmbedObj(ready_callback); |
| 1708 | + this.inheritEmbedObj(); |
1697 | 1709 | |
1698 | 1710 | //update HTML |
1699 | 1711 | $j('#'+embed_video.id).get(0).getHTML(); |
— | — | @@ -1702,6 +1714,54 @@ |
1703 | 1715 | //return this; |
1704 | 1716 | this.init_with_sources_loadedDone=true; |
1705 | 1717 | }, |
| 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 | + }, |
1706 | 1766 | selectPlayer:function(player) |
1707 | 1767 | { |
1708 | 1768 | var _this = this; |
— | — | @@ -1727,7 +1787,7 @@ |
1728 | 1788 | }, |
1729 | 1789 | /* get the duration in ntp format */ |
1730 | 1790 | getDurationNTP:function(){ |
1731 | | - return seconds2ntp(this.getDuration()/1000); |
| 1791 | + return seconds2ntp(this.getDuration()); |
1732 | 1792 | }, |
1733 | 1793 | /* |
1734 | 1794 | * wrapEmebedContainer |
— | — | @@ -1809,15 +1869,14 @@ |
1810 | 1870 | html_code += '<span class="border_left"> </span>'; |
1811 | 1871 | available_width -= 4; |
1812 | 1872 | html_code += '<span class="border_right"> </span>'; |
1813 | | - available_width -= 4; |
1814 | | - |
| 1873 | + available_width -= 4; |
| 1874 | + |
1815 | 1875 | // fullscreen |
1816 | 1876 | if(this.supports['fullscreen']) |
1817 | 1877 | { |
1818 | 1878 | html_code += '<div class="fullscreen"><a href="javascript:$j(\'#'+this.id+'\').get(0).fullscreen();"></a></div>'; |
1819 | 1879 | available_width -= 20; |
1820 | 1880 | } |
1821 | | - |
1822 | 1881 | // options |
1823 | 1882 | html_code += '<div class="options"><a href="javascript:$j(\'#'+this.id+'\').get(0).DoOptionsHTML();"></a></div>'; |
1824 | 1883 | available_width -= 26; |
— | — | @@ -1826,7 +1885,6 @@ |
1827 | 1886 | if(options_margin<0) options_margin = 0; |
1828 | 1887 | |
1829 | 1888 | $j('#mv_embedded_options_'+this.id).css('margin-left',options_margin+'px'); |
1830 | | - |
1831 | 1889 | // play_pause |
1832 | 1890 | if (this.supports['play_or_pause']) |
1833 | 1891 | { |
— | — | @@ -1835,14 +1893,13 @@ |
1836 | 1894 | } |
1837 | 1895 | |
1838 | 1896 | // closed captioning |
1839 | | - if(this.media_element.hasStreamOfMIMEType('text/cmml') && this.show_meta_link) |
| 1897 | + if(this.roe && this.show_meta_link) |
1840 | 1898 | { |
1841 | 1899 | //add in cmml inline dispaly if roe description avaliable |
1842 | 1900 | //not to be displayed in stream interface. |
1843 | 1901 | html_code += '<div class="closed_captions"><a href="javascript:$j(\'#'+this.id+'\').get(0).showTextInterface();"></a></div>'; |
1844 | 1902 | available_width -= 40; |
1845 | 1903 | } |
1846 | | - |
1847 | 1904 | // volume control |
1848 | 1905 | if(this.supports['volume_control']) |
1849 | 1906 | { |
— | — | @@ -1854,7 +1911,6 @@ |
1855 | 1912 | html_code +='<div class="volume_icon"></div>'; |
1856 | 1913 | available_width -= 22; |
1857 | 1914 | } |
1858 | | - |
1859 | 1915 | // time display |
1860 | 1916 | if(this.supports['time_display'] && (available_width > 80)) |
1861 | 1917 | { |
— | — | @@ -1876,57 +1932,14 @@ |
1877 | 1933 | ' </div><!--seeker-->'; |
1878 | 1934 | } |
1879 | 1935 | 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 | + }, |
1926 | 1937 | getHTML : function (){ |
1927 | 1938 | //@@todo check if we have sources avaliable |
1928 | | - js_log('f:getHTML'); |
1929 | | - var html_code = ''; |
| 1939 | + js_log('f : getHTML'); |
1930 | 1940 | |
| 1941 | + |
| 1942 | + |
| 1943 | + var html_code = ''; |
1931 | 1944 | html_code = '<div style="width:'+this.width+'px;" class="videoPlayer">'; |
1932 | 1945 | html_code += '<div id="mv_embedded_player_'+this.id+'">' + |
1933 | 1946 | this.getThumbnailHTML() + |
— | — | @@ -1969,7 +1982,7 @@ |
1970 | 1983 | html_code += '</div>'; |
1971 | 1984 | js_log('should set: '+this.id); |
1972 | 1985 | $j(this).html(html_code); |
1973 | | - js_log('set this to: ' + $j(this).html() ); |
| 1986 | + //js_log('set this to: ' + $j(this).html() ); |
1974 | 1987 | //alert('stop'); |
1975 | 1988 | //if auto play==true directly embed the plugin |
1976 | 1989 | if(this.autoplay) |
— | — | @@ -2211,7 +2224,9 @@ |
2212 | 2225 | */ |
2213 | 2226 | displayHTML:function(html_code) |
2214 | 2227 | { |
2215 | | - this.stop(); |
| 2228 | + if(!this.supports['overlays']) |
| 2229 | + this.stop(); |
| 2230 | + |
2216 | 2231 | //put select list on-top |
2217 | 2232 | //make sure the parent is relatively positioned: |
2218 | 2233 | $j('#'+this.id).css('position', 'relative'); |
— | — | @@ -2228,29 +2243,6 @@ |
2229 | 2244 | fade_in = false; |
2230 | 2245 | $j('#blackbg_'+sel_id).remove(); |
2231 | 2246 | } |
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 | | - |
2255 | 2247 | //fade in a black bg div ontop of everything |
2256 | 2248 | var div_code = '<div id="blackbg_'+sel_id+'" class="videoComplete" ' + |
2257 | 2249 | 'style="height:'+parseInt(height)+'px;width:'+parseInt(width)+'px;">'+ |
— | — | @@ -2436,7 +2428,6 @@ |
2437 | 2429 | pause : function(){ |
2438 | 2430 | return null |
2439 | 2431 | }, |
2440 | | - |
2441 | 2432 | /* |
2442 | 2433 | * base embed stop (should be overwritten by the plugin) |
2443 | 2434 | */ |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skin/styles.css |
— | — | @@ -135,7 +135,7 @@ |
136 | 136 | .videoPlayer .time { |
137 | 137 | line-height: 32px; |
138 | 138 | height: 29px; |
139 | | - overflow: hidden; |
| 139 | + overflow: visible; |
140 | 140 | font-size: 11px; |
141 | 141 | width: 80px; |
142 | 142 | float: right; |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_playlist.js |
— | — | @@ -58,7 +58,7 @@ |
59 | 59 | loading_external_data:true, //load external data by default |
60 | 60 | tracks:{}, |
61 | 61 | default_track:null, // the default track to add clips to. |
62 | | - init:function(element){ |
| 62 | + init : function(element){ |
63 | 63 | js_log('init'); |
64 | 64 | //add default track & default track pointer: |
65 | 65 | this.tracks[0]= new trackObj; |
— | — | @@ -145,8 +145,7 @@ |
146 | 146 | } |
147 | 147 | }else{ |
148 | 148 | js_log('error: method doParse not found in plObj'); |
149 | | - } |
150 | | - |
| 149 | + } |
151 | 150 | }, |
152 | 151 | doWhenParseDone:function(){ |
153 | 152 | js_log("do when parse done: "+ this.default_track_id + ' len:'+ this.default_track.clips.length); |
— | — | @@ -289,9 +288,9 @@ |
290 | 289 | $j(this).html('empty playlist'); |
291 | 290 | return ; |
292 | 291 | } |
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;' + |
294 | 293 | 'height:'+this.height+'px;position:relative;"></div>'); |
295 | | - |
| 294 | + this.updateTitle(); |
296 | 295 | var plObj=this; |
297 | 296 | //append all embed details |
298 | 297 | //@@todo move into trackObj |
— | — | @@ -347,7 +346,7 @@ |
348 | 347 | |
349 | 348 | |
350 | 349 | |
351 | | - this.updateTitle(); |
| 350 | + |
352 | 351 | //check if we are in sequence mode (for seq layout don't display clips) |
353 | 352 | js_log('seq: ' + this.sequencer); |
354 | 353 | if(this.sequencer=='true'){ //string val |
— | — | @@ -486,7 +485,7 @@ |
487 | 486 | this.cur_clip.embed.pe_postEmbedJS(); |
488 | 487 | }, |
489 | 488 | //playlist play |
490 | | - play:function(){ |
| 489 | + play : function(){ |
491 | 490 | var plObj=this; |
492 | 491 | js_log('pl play'); |
493 | 492 | //update cur clip based if sequence playhead set: |
— | — | @@ -494,13 +493,14 @@ |
495 | 494 | this.start_clip = this.cur_clip; |
496 | 495 | this.start_clip_src= this.cur_clip.src; |
497 | 496 | //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'); |
499 | 499 | this.cur_clip.embed.playMovieAt(this.cur_clip.order); |
500 | 500 | }else{ |
| 501 | + js_log('basic play'); |
501 | 502 | //play cur_clip |
502 | 503 | this.cur_clip.embed.play(); |
503 | 504 | } |
504 | | - |
505 | 505 | }, |
506 | 506 | //wrappers for call to pl object to current embed obj |
507 | 507 | play_or_pause:function(){ |
— | — | @@ -780,7 +780,8 @@ |
781 | 781 | if(this.type)init_pl_embed['type'] = this.type; |
782 | 782 | |
783 | 783 | 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); |
785 | 786 | }, |
786 | 787 | //returns the mvClip representation of the clip ie stream_name?start_time/end_time |
787 | 788 | getMvClip:function(){ |
— | — | @@ -1048,7 +1049,7 @@ |
1049 | 1050 | } |
1050 | 1051 | } |
1051 | 1052 | var videoInterface = new embedVideo(ve); |
1052 | | - //js_log('created Embed Video'); |
| 1053 | + js_log('created Embed Video'); |
1053 | 1054 | //inherit the videoInterface |
1054 | 1055 | for(method in videoInterface){ |
1055 | 1056 | if(method!='style'){ |
— | — | @@ -1453,12 +1454,13 @@ |
1454 | 1455 | //@@todo get/parse meta: |
1455 | 1456 | var meta_tags = this.data.getElementsByTagName('meta'); |
1456 | 1457 | $j.each(meta_tags, function(i,meta_elm){ |
| 1458 | + js_log("ON META TAG: "+meta_elm.getAttribute('name')); |
1457 | 1459 | if(meta_elm.hasAttribute('name') && meta_elm.hasAttribute('content')){ |
1458 | 1460 | if(meta_elm.getAttribute('name')=='title' ){ |
1459 | | - _this.title = meta_elm.getAttribute('content'); |
| 1461 | + _this.title = meta_elm.getAttribute('content'); |
1460 | 1462 | } |
1461 | 1463 | } |
1462 | | - }); |
| 1464 | + }); |
1463 | 1465 | //add transition objects: |
1464 | 1466 | var transition_tags = this.data.getElementsByTagName('transition'); |
1465 | 1467 | $j.each(transition_tags, function(i,trans_elm){ |