Index: trunk/extensions/MetavidWiki/skins/mv_stream.js |
— | — | @@ -18,7 +18,6 @@ |
19 | 19 | * addLoadEvent() |
20 | 20 | */ |
21 | 21 | var org_vid_time_req =null; //store the original time req: |
22 | | -var org_thum_src = null; //stores the original thumbnail src |
23 | 22 | var org_vid_title = null; //stores the original title |
24 | 23 | //store the original range request: |
25 | 24 | // @@todo could replace the above 4 globals as they are all org request derived |
— | — | @@ -101,7 +100,7 @@ |
102 | 101 | return false; |
103 | 102 | } |
104 | 103 | org_vid_time_req = $j('#embed_vid').get(0).getTimeReq(); |
105 | | - org_thum_src = $j('#embed_vid').get(0).thumbnail; |
| 104 | + $j('#embed_vid').get(0).org_thum_src = $j('#embed_vid').get(0).thumbnail; |
106 | 105 | |
107 | 106 | //@@TODO override stop function in player: |
108 | 107 | |
— | — | @@ -304,7 +303,7 @@ |
305 | 304 | if(!vid_elm.onClipDone_disp){ |
306 | 305 | //only restore if the cur_mvd = 'base' and interface updates are not locked |
307 | 306 | if(this.cur_mvd_id=='base'){ |
308 | | - vid_elm.updateThumbnail( org_thum_src ); |
| 307 | + vid_elm.updateThumbnail( $j('#embed_vid').get(0).org_thum_src ); |
309 | 308 | vid_elm.updateVideoTimeReq(org_vid_time_req); |
310 | 309 | //vid_elm.updateVideoSrc(org_vid_src); |
311 | 310 | $j('#mv_videoPlayerTime').html(org_vid_title); |
— | — | @@ -970,11 +969,11 @@ |
971 | 970 | }); |
972 | 971 | } |
973 | 972 | } |
974 | | -function highlight_fd(mvd_id){ |
975 | | - $j('#mv_fd_mvd_'+mvd_id).css('border','1px solid #FF0000'); |
| 973 | +function highlight_fd(mvd_id){ |
| 974 | + $j('#mv_fd_mvd_'+mvd_id).css('border','1px solid #F00'); |
976 | 975 | } |
977 | 976 | function de_highlight_fd(mvd_id){ |
978 | | - $j('#mv_fd_mvd_'+mvd_id).css('border', '1px solid #FFFFFF'); |
| 977 | + $j('#mv_fd_mvd_'+mvd_id).css('border', '1px solid #FFF'); |
979 | 978 | } |
980 | 979 | |
981 | 980 | function highlight_tl_ts(mvd_id){ |
— | — | @@ -1033,8 +1032,8 @@ |
1034 | 1033 | } |
1035 | 1034 | } |
1036 | 1035 | //else set via org_thum_src |
1037 | | - if(org_thum_src.indexOf('?')!=-1){ |
1038 | | - var url = org_thum_src.split('?'); |
| 1036 | + if( $j('#embed_vid').get(0).org_thum_src.indexOf('?')!=-1){ |
| 1037 | + var url = $j('#embed_vid').get(0).org_thum_src.split('?'); |
1039 | 1038 | var args = Array(); |
1040 | 1039 | var arg_parts = url[1].split('&'); |
1041 | 1040 | for(i in arg_parts){ |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/loading_ani.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/loading_ani.gif |
___________________________________________________________________ |
Added: svn:mime-type |
1042 | 1041 | + application/octet-stream |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js |
— | — | @@ -600,6 +600,16 @@ |
601 | 601 | //js_log('looking for: #mv_seeker_slider_'+embedObj.id + "\n " + |
602 | 602 | // 'start sec: '+embedObj.start_time_sec + ' base offset: '+embedObj.base_seeker_slider_offset); |
603 | 603 | |
| 604 | + //add play hook: |
| 605 | + $j('#mv_play_pause_button_' + embedObj.id).unbind( "click" ).click(function(){ |
| 606 | + $j('#' + embedObj.id).get(0).play(); |
| 607 | + }); |
| 608 | + |
| 609 | + //big_play_link_ play binding: |
| 610 | + $j('#big_play_link_' + embedObj.id).unbind('click').click(function(){ |
| 611 | + $j('#' + embedObj.id).get(0).play(); |
| 612 | + }); |
| 613 | + |
604 | 614 | //build draggable hook here: |
605 | 615 | $j('#mv_seeker_slider_'+embedObj.id).draggable({ |
606 | 616 | containment:'#seeker_bar_'+embedObj.id, |
— | — | @@ -684,8 +694,7 @@ |
685 | 695 | 'pause':{ |
686 | 696 | 'w':24, |
687 | 697 | 'o':function(){ |
688 | | - return '<div id="mv_play_pause_button_' + ctrlBuilder.id + '" class="play_button"' + |
689 | | - 'onClick="$j(\'#' + ctrlBuilder.id + '\').get(0).play()"></div>'; |
| 698 | + return '<div id="mv_play_pause_button_' + ctrlBuilder.id + '" class="play_button"></div>'; |
690 | 699 | } |
691 | 700 | }, |
692 | 701 | 'closed_captions':{ |
— | — | @@ -1926,12 +1935,7 @@ |
1927 | 1936 | js_log('performing embed for ' + _this.id); |
1928 | 1937 | var embed_code = _this.getEmbedHTML(); |
1929 | 1938 | //js_log(embed_code); |
1930 | | - $j('#mv_embedded_player_'+_this.id).html(embed_code); |
1931 | | - js_log('changed embed code'); |
1932 | | - _this.paused = false; |
1933 | | - _this.thumbnail_disp=false; |
1934 | | - $j("#mv_play_pause_button_"+ _this.id).attr('class', 'pause_button'); |
1935 | | - $j("#mv_play_pause_button_"+ _this.id).attr('onClick', '$j(\'#'+_this.id+'\').get(0).pause()'); |
| 1939 | + $j('#mv_embedded_player_'+_this.id).html(embed_code); |
1936 | 1940 | }); |
1937 | 1941 | }, |
1938 | 1942 | /* todo abstract out onClipDone chain of functions and merge with textInterface */ |
— | — | @@ -2147,18 +2151,13 @@ |
2148 | 2152 | }, |
2149 | 2153 | doThumbnailHTML:function() |
2150 | 2154 | { |
| 2155 | + var _this = this; |
2151 | 2156 | js_log('f:doThumbnailHTML'+ this.thumbnail_disp); |
2152 | 2157 | this.closeDisplayedHTML(); |
2153 | 2158 | this.thumbnail_disp = true; |
2154 | 2159 | |
2155 | 2160 | $j('#mv_embedded_player_'+this.id).html( this.getThumbnailHTML() ); |
2156 | | - this.paused = true; |
2157 | | - if(!this.pc) //if not in playlist mode update the play_pause button: |
2158 | | - $j("#mv_play_pause_button_" + this.id).attr({ |
2159 | | - 'class':'play_button', |
2160 | | - 'onClick':'$j(\'#' + this.id + '\').get(0).play()' |
2161 | | - }); |
2162 | | - |
| 2161 | + this.paused = true; |
2163 | 2162 | }, |
2164 | 2163 | refreshControlsHTML:function(){ |
2165 | 2164 | js_log('refreshing controls HTML'); |
— | — | @@ -2384,7 +2383,7 @@ |
2385 | 2384 | }, |
2386 | 2385 | getPlayButton:function(id){ |
2387 | 2386 | if(!id)id=this.id; |
2388 | | - return '<div onclick="$j(\'#'+id+'\').get(0).play()" id="big_play_link_'+id+'" class="large_play_button" '+ |
| 2387 | + return '<div id="big_play_link_'+id+'" class="large_play_button" '+ |
2389 | 2388 | 'style="left:'+((this.playerPixelWidth()-130)/2)+'px;'+ |
2390 | 2389 | 'top:'+((this.playerPixelHeight()-96)/2)+'px;"></div>'; |
2391 | 2390 | }, |
— | — | @@ -2635,7 +2634,8 @@ |
2636 | 2635 | }else{ |
2637 | 2636 | this.doEmbedHTML(); |
2638 | 2637 | this.onClipDone_disp=false; |
2639 | | - this.paused=false; |
| 2638 | + this.paused=false; |
| 2639 | + this.thumbnail_disp=false; |
2640 | 2640 | } |
2641 | 2641 | }else{ |
2642 | 2642 | //the plugin is already being displayed |
— | — | @@ -2643,8 +2643,9 @@ |
2644 | 2644 | } |
2645 | 2645 | js_log("should update play controL"); |
2646 | 2646 | $j("#mv_play_pause_button_"+this.id).attr({ |
2647 | | - 'class':'pause_button', |
2648 | | - 'onClick':'$j(\'#'+this_id+'\').get(0).pause()' |
| 2647 | + 'class':'pause_button' |
| 2648 | + }).unbind( "click" ).click(function(){ |
| 2649 | + $j('#' + this_id ).get(0).pause(); |
2649 | 2650 | }); |
2650 | 2651 | }, |
2651 | 2652 | /* |
— | — | @@ -2659,8 +2660,9 @@ |
2660 | 2661 | this.paused=true; |
2661 | 2662 | //update the ctrl "paused state" |
2662 | 2663 | $j("#mv_play_pause_button_"+this.id).attr({ |
2663 | | - 'class':'play_button', |
2664 | | - 'onClick':'$j(\'#'+this_id+'\').get(0).play()' |
| 2664 | + 'class':'play_button' |
| 2665 | + }).unbind( "click" ).click(function(){ |
| 2666 | + $j('#'+this_id).get(0).play(); |
2665 | 2667 | }); |
2666 | 2668 | }, |
2667 | 2669 | /*play_or_pause: function(){ |
— | — | @@ -2676,7 +2678,9 @@ |
2677 | 2679 | * base embed stop (can be overwritten by the plugin) |
2678 | 2680 | */ |
2679 | 2681 | stop: function(){ |
2680 | | - js_log('mvEmbed:stop:'+this.id); |
| 2682 | + js_log('mvEmbed:stop:'+this.id); |
| 2683 | + //first issue pause to update interface |
| 2684 | + this.pause(); |
2681 | 2685 | //check if thumbnail is being displayed in which case do nothing |
2682 | 2686 | if(this.thumbnail_disp){ |
2683 | 2687 | //already in stooped state |
— | — | @@ -3117,18 +3121,16 @@ |
3118 | 3122 | /* |
3119 | 3123 | * IE and non-firebug debug: |
3120 | 3124 | */ |
3121 | | - /*var log_elm = document.getElementById('mv_js_log'); |
| 3125 | + /*var log_elm = document.getElementById('mv_js_log'); |
3122 | 3126 | if(!log_elm){ |
3123 | 3127 | 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>'); |
3124 | 3128 | var log_elm = document.getElementById('mv_js_log'); |
3125 | 3129 | } |
3126 | 3130 | if(log_elm){ |
3127 | 3131 | log_elm.value+=string+"\n"; |
3128 | | - }*/ |
3129 | | - |
3130 | | - } |
3131 | | - //return false |
3132 | | - return false; |
| 3132 | + }*/ |
| 3133 | + } |
| 3134 | + //return false; |
3133 | 3135 | } |
3134 | 3136 | |
3135 | 3137 | function js_error(string){ |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedObj/mv_flashEmbed.js |
— | — | @@ -1653,26 +1653,24 @@ |
1654 | 1654 | } |
1655 | 1655 | }, |
1656 | 1656 | monitor : function() |
1657 | | - { |
| 1657 | + { |
| 1658 | + var _this = this; |
1658 | 1659 | //do monitor update: |
1659 | 1660 | if( ! this.monitorTimerId ){ |
1660 | | - if(document.getElementById(this.id)){ |
1661 | | - this.monitorTimerId = setInterval('$j(\'#'+this.id+'\').get(0).monitor()', 250); |
1662 | | - } |
| 1661 | + if( $j('#'+this.id).length != 0 ) |
| 1662 | + this.monitorTimerId = window.setInterval('$j(\'#'+_this.id+'\').get(0).monitor()', 250); |
1663 | 1663 | } |
1664 | 1664 | |
1665 | 1665 | var flash_state = this.fla.getStatus(); |
1666 | 1666 | if( typeof flash_state == 'undefined' ){ |
1667 | 1667 | var flash_state = { |
1668 | 1668 | "time" : this.fla.getTime() |
1669 | | - }; |
1670 | | - js_log('got time: ' + flash_state.time); |
| 1669 | + }; |
1671 | 1670 | }else{ |
1672 | 1671 | //simplification of buffer state ... should move to support returning time rages like: |
1673 | 1672 | //http://www.whatwg.org/specs/web-apps/current-work/#normalized-timeranges-object |
1674 | 1673 | this.bufferedPercent = flash_state.bufferEnd / this.getDuration(); |
1675 | 1674 | } |
1676 | | - |
1677 | 1675 | //set the current Time (based on timeFormat) |
1678 | 1676 | if( this.media_element.selected_source.timeFormat =='anx' ){ |
1679 | 1677 | this.currentTime = flash_state.time; |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedObj/mv_javaEmbed.js |
— | — | @@ -1,6 +1,13 @@ |
2 | 2 | var javaEmbed = { |
3 | 3 | instanceOf:'javaEmbed', |
4 | | - supports: {'play_head':true, 'pause':true, 'stop':true, 'fullscreen':true, 'time_display':true, 'volume_control':true}, |
| 4 | + supports: { |
| 5 | + 'play_head':true, |
| 6 | + 'pause':true, |
| 7 | + 'stop':true, |
| 8 | + 'fullscreen':true, |
| 9 | + 'time_display':true, |
| 10 | + 'volume_control':true |
| 11 | + }, |
5 | 12 | getEmbedHTML : function (){ |
6 | 13 | if(this.controls) |
7 | 14 | setTimeout('document.getElementById(\''+this.id+'\').postEmbedJS()', 150); |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedObj/mv_vlcEmbed.js |
— | — | @@ -303,7 +303,9 @@ |
304 | 304 | }, |
305 | 305 | pause : function(){ |
306 | 306 | this.parent_pause(); //update the inteface if paused via native control |
307 | | - this.vlc.playlist.togglePause(); |
| 307 | + if(this.vlc){ |
| 308 | + this.vlc.playlist.togglePause(); |
| 309 | + } |
308 | 310 | }, |
309 | 311 | fullscreen : function(){ |
310 | 312 | if(this.vlc){ |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libRemoteMediaSearch/mv_remote_media_search.js |
— | — | @@ -1,7 +1,8 @@ |
2 | 2 | /* |
3 | 3 | * a library for doing remote media searches |
4 | 4 | * |
5 | | -* initial targeted archives are: |
| 5 | +* initial targeted archives are: |
| 6 | + the local wiki |
6 | 7 | wikimedia commons |
7 | 8 | metavid |
8 | 9 | and archive.org |
— | — | @@ -32,26 +33,32 @@ |
33 | 34 | } |
34 | 35 | }, |
35 | 36 | content_providers:{ |
| 37 | + //@@todo seed this via the include call (can be exported to seperate library |
| 38 | + // once we get the script loader integrated) |
36 | 39 | 'this_wiki':{ |
37 | | - 'enabled':0, |
| 40 | + 'enabled':1, |
| 41 | + 'checked':1, |
38 | 42 | 'title':'The Current Wiki', |
39 | 43 | 'desc': '(should be updated with the proper text)' |
40 | 44 | }, |
41 | 45 | 'wiki_commons':{ |
42 | 46 | 'enabled':1, |
| 47 | + 'checked':1, |
43 | 48 | 'title':'Wikipedia Commons', |
44 | 49 | 'desc': 'Wikimedia Commons is a media file repository making available public domain '+ |
45 | 50 | 'and freely-licensed educational media content (images, sound and video clips) to all.', |
46 | 51 | 'logo': 'http://upload.wikimedia.org/wikipedia/commons/thumb/7/79/Wiki-commons.png/80px-Wiki-commons.png' |
47 | 52 | }, |
48 | 53 | 'archive_org':{ |
49 | | - 'enabled':0, |
| 54 | + 'enabled':1, |
| 55 | + 'checked':1, |
50 | 56 | 'title' : 'Archive.org', |
51 | 57 | 'desc' : 'The Internet Archive, a digital library of cultural artifacts in digital form', |
52 | 58 | 'logo' : 'http://www.archive.org/images/logo.jpg' |
53 | 59 | }, |
54 | 60 | 'metavid':{ |
55 | | - 'enabled':0, |
| 61 | + 'enabled':1, |
| 62 | + 'checked':1, |
56 | 63 | 'title':'Metavid.org', |
57 | 64 | 'desc': 'Metavid hosts thousands of hours of US house and senate floor proccedings', |
58 | 65 | 'logo': 'http://metavid.org/w/skins/mvpcf/images/logo.png' |
— | — | @@ -83,7 +90,7 @@ |
84 | 91 | '</td>'+ |
85 | 92 | '<td style="width:110px">'+ |
86 | 93 | '<input type="submit" value="' + getMsg('mv_media_search') + '" tabindex="2" '+ |
87 | | - ' id="search-button"/>'+ |
| 94 | + ' id="rms_search_button"/>'+ |
88 | 95 | '</td>'+ |
89 | 96 | '<td>'; |
90 | 97 | for(var i in this.main_search_options){ |
— | — | @@ -101,8 +108,7 @@ |
102 | 109 | for( var i in this.content_providers ){ |
103 | 110 | var cp = this.content_providers[i]; |
104 | 111 | |
105 | | - var checked_attr = (this.default_provider_id && |
106 | | - ( this.default_provider_id == i || this.default_provider_id == 'all' ))?'checked':''; |
| 112 | + var checked_attr = ( cp.checked ) ? 'checked':''; |
107 | 113 | |
108 | 114 | cpsdiv+='<td '+ |
109 | 115 | ' title="' + cp.title + '" '+ |
— | — | @@ -117,7 +123,8 @@ |
118 | 124 | } |
119 | 125 | cpsdiv+='</td>'; |
120 | 126 | } |
121 | | - cpsdiv+='</table><a id="mso_selprovider_close" href="#">close</a></div>'; |
| 127 | + cpsdiv+='<tr><td><a id="mso_selprovider_close" href="#">'+getMsg('close')+'</a></td></tr></table></div>'; |
| 128 | + |
122 | 129 | out+='<div id="rsd_options_bar" style="display:none;width:100%;height:0px;background:#BBB">'+ |
123 | 130 | cpsdiv + |
124 | 131 | '</div>'; |
— | — | @@ -129,21 +136,34 @@ |
130 | 137 | $j('#'+ this.target_id ).html( out ); |
131 | 138 | }, |
132 | 139 | add_interface_bindings:function(){ |
| 140 | + var _this = this; |
133 | 141 | js_log("add_interface_bindings:"); |
134 | 142 | //setup for this.main_search_options: |
135 | | - $j('#mso_selprovider').(function(){ |
136 | | - $j('#rsd_options_bar:visible').animate({ |
137 | | - 'height':'100px', |
138 | | - 'opacity':1 |
139 | | - }, "normal"); |
140 | | - $j('#rsd_options_bar:hidden,#mso_selprovider_close').animate({ |
141 | | - 'height':'0px', |
142 | | - 'opacity':0 |
143 | | - }, "normal"); |
| 143 | + $j('#mso_selprovider,#mso_selprovider_close').click(function(){ |
| 144 | + if($j('#rsd_options_bar:hidden').length !=0 ){ |
| 145 | + $j('#rsd_options_bar').animate({ |
| 146 | + 'height':'110px', |
| 147 | + 'opacity':1 |
| 148 | + }, "normal"); |
| 149 | + }else{ |
| 150 | + $j('#rsd_options_bar').animate({ |
| 151 | + 'height':'0px', |
| 152 | + 'opacity':0 |
| 153 | + }, "normal", function(){ |
| 154 | + $j(this).hide(); |
| 155 | + }) |
| 156 | + } |
144 | 157 | }); |
145 | 158 | //setup binding for search provider check box: |
146 | | - |
147 | | - } |
| 159 | + //search button: |
| 160 | + $j('#rms_search_button').click(function(){ |
| 161 | + _this.runSearch(); |
| 162 | + }); |
| 163 | + }, |
| 164 | + runSearch:function(){ |
| 165 | + //get a remote search object for each search provider: |
| 166 | + for(var i in |
| 167 | + } |
148 | 168 | } |
149 | 169 | |
150 | 170 | var mvBaseRemoteSearch = function(initObj) { |