Index: trunk/phase3/js2/mwEmbed/example_usage/kPlayer_Simple_Video_Tag.html |
— | — | @@ -1,35 +0,0 @@ |
2 | | -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
3 | | -"http://www.w3.org/TR/html4/loose.dtd"> |
4 | | -<html> |
5 | | -<head> |
6 | | - <title>Simple Video Tag Usage</title> |
7 | | - <script type="text/javascript"> |
8 | | - var mwConfig = { |
9 | | - 'skin_name': 'kskin', |
10 | | - 'jui_skin' : 'base' |
11 | | - }; |
12 | | - </script> |
13 | | - <script type="text/javascript" src="../mv_embed.js?debug=true"></script> |
14 | | -</head> |
15 | | -<body> |
16 | | -<h3> Simple Video Tag Usage </h3> |
17 | | -once you include: mv_embed.js on any remote page you can then use the video tag like so: |
18 | | -<span id="default_attr"> |
19 | | -</span> <br /> |
20 | | -<br /> |
21 | | - <table border="1" cellpadding="6" width="600"> |
22 | | - <tr> |
23 | | - <td valign="top"><video durationHint="70" |
24 | | - style="width:400px;height:288px" |
25 | | - poster="http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/B-36_bomber.ogg/mid-B-36_bomber.ogg.jpg" |
26 | | - src="http://upload.wikimedia.org/wikipedia/commons/0/0d/B-36_bomber.ogg"></video></video></td> |
27 | | - <td valign="top"><b>Sample Embed</b><br /> |
28 | | - Simple video Embed: |
29 | | - <pre><video style="width:400px;height:288px" poster="http://metavid.org/w/index.php?action=ajax&rs=mv_frame_server&stream_id=71&t=1:23:16&size=400x300" |
30 | | -src="http://metavidstorage01.ucsc.edu/media/house_proceeding_07-18-06_00.ogg?t=1:23:16/1:23:44"></video></pre> |
31 | | - </td> |
32 | | - </table> |
33 | | - <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> |
34 | | - </body> |
35 | | -</html> |
36 | | - |
Index: trunk/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js |
— | — | @@ -607,9 +607,9 @@ |
608 | 608 | //load this_wiki search system to grab the rObj |
609 | 609 | _this.loadSearchLib(cp, function(){ |
610 | 610 | //do basic layout form on left upload "bin" on right |
611 | | - $j('#tab-upload').html('<table cellspacing="10">' + |
| 611 | + $j('#tab-upload').html('<table>' + |
612 | 612 | '<tr>' + |
613 | | - '<td valign="top" style="width:350px;">' + |
| 613 | + '<td valign="top" style="width:350px; padding-right: 12px;">' + |
614 | 614 | '<h4>' + gM('mwe-upload_a_file') + '</h4>' + |
615 | 615 | '<div id="upload_form">' + |
616 | 616 | mv_get_loading_img() + |
— | — | @@ -639,19 +639,16 @@ |
640 | 640 | $j('#upload_form').simpleUploadForm({ |
641 | 641 | "api_target" : _this.upload_api_target , |
642 | 642 | "ondone_cb" : function( resultData ){ |
643 | | - var wTitle = resultData['wpDestFile']; |
| 643 | + var wTitle = resultData['wpDestFile']; |
644 | 644 | //add a loading div |
645 | | - $j( _this.target_container ).append('<div id="temp_edit_loader" '+ |
646 | | - 'style="position:absolute;top:0px;left:0px;bottom:5px;right:4px;background-color:#FFF;">' + |
647 | | - mv_get_loading_img('position:absolute;top:30px;left:30px') + |
648 | | - '</div>'); |
649 | | - cp.sObj.addByTitle( wTitle, function( rObj ){ |
650 | | - $j( _this.target_container ).find('#temp_edit_loader').remove(); |
651 | | - //redraw (with added result if new) |
652 | | - _this.drawOutputResults(); |
653 | | - //pull up recource editor: |
654 | | - _this.resourceEdit( rObj, $j('#res_upload_' + rObj.id).get(0) ); |
655 | | - }); |
| 645 | + _this.addResourceEditLoader(); |
| 646 | + |
| 647 | + cp.sObj.addByTitle( wTitle, function( rObj ){ |
| 648 | + //redraw (with added result if new) |
| 649 | + _this.drawOutputResults(); |
| 650 | + //pull up recource editor: |
| 651 | + _this.resourceEdit( rObj, $j('#res_upload__' + rObj.id).get(0) ); |
| 652 | + }); |
656 | 653 | //return false to close progress window: |
657 | 654 | return false; |
658 | 655 | } |
— | — | @@ -1012,7 +1009,7 @@ |
1013 | 1010 | o+='</div>'; |
1014 | 1011 | }else if(_this.result_display_mode == 'list'){ |
1015 | 1012 | o+='<div id="mv_result_' + rInx + '" class="mv_clip_list_result" style="width:90%">'; |
1016 | | - o+='<img title="'+rItem.title+'" class="rsd_res_item" id="res_' + cp_id + '_' + rInx +'" style="float:left;width:' + |
| 1013 | + o+='<img title="'+rItem.title+'" class="rsd_res_item" id="res_' + cp_id + '__' + rInx +'" style="float:left;width:' + |
1017 | 1014 | _this.thumb_width + 'px;" src="' + |
1018 | 1015 | cp.sObj.getImageTransform( rItem, {'width':_this.thumb_width } ) |
1019 | 1016 | + '">'; |
— | — | @@ -1456,14 +1453,13 @@ |
1457 | 1454 | myUp = new mvBaseUploadInterface({ |
1458 | 1455 | 'api_url' : _this.local_wiki_api_url, |
1459 | 1456 | 'done_upload_cb':function(){ |
1460 | | - //we have finished the upload: |
1461 | | - |
1462 | | - //close up the rsd_resource_import |
1463 | | - $j('#rsd_resource_import').remove(); |
1464 | | - //run the parent callback: |
1465 | | - cir_callback(); |
1466 | | - //return false to avoid BaseUploadInterface done actions |
1467 | | - return false; |
| 1457 | + js_log('doImportAPI:: run callback::' ); |
| 1458 | + //we have finished the upload: |
| 1459 | + |
| 1460 | + //close up the rsd_resource_import |
| 1461 | + $j('#rsd_resource_import').remove(); |
| 1462 | + //return the parent callback: |
| 1463 | + return cir_callback(); |
1468 | 1464 | } |
1469 | 1465 | }); |
1470 | 1466 | //set the edit token if we have it handy |
— | — | @@ -1577,7 +1573,6 @@ |
1578 | 1574 | $j('#rsd_resource_import').remove(); |
1579 | 1575 | }); |
1580 | 1576 | } |
1581 | | - |
1582 | 1577 | } |
1583 | 1578 | ); |
1584 | 1579 | } |
Index: trunk/phase3/js2/mwEmbed/libAddMedia/simpleUploadForm.js |
— | — | @@ -46,33 +46,34 @@ |
47 | 47 | } |
48 | 48 | |
49 | 49 | //build an upload form: |
50 | | - var o = ''+ |
51 | | - '<form id="suf-upload" enctype="multipart/form-data" action="' + opt.api_target + '" method="post">' + |
52 | | - //hidden input: |
53 | | - '<input type="hidden" name="action" value="upload">'+ |
54 | | - '<input type="hidden" name="format" value="jsonfm">'+ |
55 | | - '<input type="hidden" name="token" value="'+ eToken +'">' + |
| 50 | + var o = '<div>'+ |
| 51 | + '<form id="suf-upload" enctype="multipart/form-data" action="' + opt.api_target + '" method="post">' + |
| 52 | + //hidden input: |
| 53 | + '<input type="hidden" name="action" value="upload">'+ |
| 54 | + '<input type="hidden" name="format" value="jsonfm">'+ |
| 55 | + '<input type="hidden" name="token" value="'+ eToken +'">' + |
| 56 | + |
| 57 | + //form name set: |
| 58 | + '<label for="wpUploadFile">' + gM('mwe-select_file') + '</label><br>'+ |
| 59 | + '<input type="file" style="display: inline;" name="wpUploadFile" size="15"/><br>' + |
| 60 | + |
| 61 | + '<label for="wpDestFile">' +gM('mwe-destfilename') + '</label><br>'+ |
| 62 | + '<input type="text" name="wpDestFile" size="30" /><br>'+ |
| 63 | + |
| 64 | + '<label for="wpUploadDescription">' + gM('mwe-summary') + ':</label><br>' + |
| 65 | + '<textarea cols="30" rows="3" name="wpUploadDescription" tabindex="3"/><br>'+ |
| 66 | + |
| 67 | + '<div id="wpDestFile-warning"></div>' + |
| 68 | + '<div style="clear:both;"></div>' + |
| 69 | + |
| 70 | + gM('mwe-select_ownwork') + '<br>' + |
| 71 | + '<input type="checkbox" id="wpLicence" name="wpLicence" value="cc-by-sa">' + gM('mwe-licence_cc-by-sa') + '<br>' + |
| 72 | + |
| 73 | + '<input type="submit" accesskey="s" value="' + gM('mwe-upload') + '" name="wpUploadBtn" id="wpUploadBtn" tabindex="9"/>' + |
| 74 | + //close the form and div |
| 75 | + '</form>' + |
| 76 | + '</div>'; |
56 | 77 | |
57 | | - //form name set: |
58 | | - '<label for="wpUploadFile">' + gM('mwe-select_file') + '</label><br>'+ |
59 | | - '<input type="file" style="display: inline;" name="wpUploadFile" size="15"/><br>' + |
60 | | - |
61 | | - '<label for="wpDestFile">' +gM('mwe-destfilename') + '</label><br>'+ |
62 | | - '<input type="text" name="wpDestFile" size="30" /><br>'+ |
63 | | - |
64 | | - '<label for="wpUploadDescription">' + gM('mwe-summary') + ':</label><br>' + |
65 | | - '<textarea cols="30" rows="3" name="wpUploadDescription" tabindex="3"/><br>'+ |
66 | | - |
67 | | - '<div id="wpDestFile-warning"></div>' + |
68 | | - '<div style="clear:both;"></div>' + |
69 | | - |
70 | | - gM('mwe-select_ownwork') + '<br>' + |
71 | | - '<input type="checkbox" id="wpLicence" name="wpLicence" value="cc-by-sa">' + gM('mwe-licence_cc-by-sa') + '<br>' + |
72 | | - |
73 | | - '<input type="submit" accesskey="s" value="' + gM('mwe-upload') + '" name="wpUploadBtn" id="wpUploadBtn" tabindex="9"/>' + |
74 | | - //close the form and div |
75 | | - '</form>'; |
76 | | - |
77 | 78 | //set the target with the form output: |
78 | 79 | $( _this.selector ).html( o ); |
79 | 80 | //by default dissable: |
— | — | @@ -88,7 +89,7 @@ |
89 | 90 | }); |
90 | 91 | //do destination fill: |
91 | 92 | //@@should integrate with doDestinationFill on upload page |
92 | | - $j("[name='wpUploadFile']").change(function(){ |
| 93 | + $j("#suf-upload [name='wpUploadFile']").change(function(){ |
93 | 94 | var path = $j(this).val(); |
94 | 95 | // Find trailing part |
95 | 96 | var slash = path.lastIndexOf('/'); |
— | — | @@ -103,9 +104,9 @@ |
104 | 105 | } |
105 | 106 | fname = fname.charAt(0).toUpperCase().concat(fname.substring(1,10000)).replace(/ /g, '_'); |
106 | 107 | // Output result |
107 | | - $j("[name='wpDestFile']").val( fname ); |
| 108 | + $j("#suf-upload [name='wpDestFile']").val( fname ); |
108 | 109 | //do destination check |
109 | | - $j("[name='wpDestFile']").doDestCheck({ |
| 110 | + $j("#suf-upload [name='wpDestFile']").doDestCheck({ |
110 | 111 | 'warn_target':'#wpDestFile-warning' |
111 | 112 | }); |
112 | 113 | }); |
Index: trunk/phase3/js2/mwEmbed/php/script-cache/README |
— | — | @@ -1,4 +1,6 @@ |
2 | | -This folder holds cached versions of grouped script requests. |
| 2 | +This folder holds cached versions of grouped script requests (if running mwEmbed in stand-alone-mode. |
| 3 | +(otherwise $wgFileCacheDirectory from mediaWiki is used) |
| 4 | + |
3 | 5 | Be sure to enable write access by your web-server to this directory. |
4 | 6 | |
5 | 7 | You can specify a different directory by updating the $wgFileCacheDirectory variable in noMediaWikiConfig.php |
Index: trunk/phase3/js2/mwEmbed/skins/ctrlBuilder.js |
— | — | @@ -79,9 +79,9 @@ |
80 | 80 | if($j('#gnp_' + embedObj.id).length==0){ |
81 | 81 | $j(this).append('<div id="gnp_' + embedObj.id + '" class="ui-state-highlight ui-corner-all" ' + |
82 | 82 | 'style="position:absolute;display:none;background:#FFF;top:10px;left:10px;right:10px;">' + |
83 | | - gM('mv_for_best_experience') + |
| 83 | + gM('mwe-for_best_experience') + |
84 | 84 | '<br><input id="ffwarn_'+embedObj.id+'" type=\"checkbox\">' + |
85 | | - gM('mv_do_not_warn_again') + |
| 85 | + gM('mwe-do_not_warn_again') + |
86 | 86 | '</div>'); |
87 | 87 | $j('#ffwarn_'+embedObj.id).click(function(){ |
88 | 88 | if( $j(this).is(':checked') ){ |
— | — | @@ -146,7 +146,7 @@ |
147 | 147 | var perc = ui.value/1000; |
148 | 148 | embedObj.jump_time = seconds2npt( parseFloat( parseFloat(embedObj.getDuration()) * perc ) + embedObj.start_time_sec); |
149 | 149 | //js_log('perc:' + perc + ' * ' + embedObj.getDuration() + ' jt:'+ this.jump_time); |
150 | | - embedObj.setStatus( gM('seek_to')+' '+embedObj.jump_time ); |
| 150 | + embedObj.setStatus( gM('mwe-seek_to')+' '+embedObj.jump_time ); |
151 | 151 | //update the thumbnail / frame |
152 | 152 | if(embedObj.isPlaying==false){ |
153 | 153 | embedObj.updateThumbPerc( perc ); |
— | — | @@ -268,9 +268,9 @@ |
269 | 269 | '<h6>Video Options</h6>'+ |
270 | 270 | '</div>'+ |
271 | 271 | '<div class="block">'+ |
272 | | - '<p class="short_match vo_selection"><a href="#"><span>Stream Selection</span></a></p>'+ |
273 | | - '<p class="short_match vo_download"><a href="#"><span>Download</span></a></p>'+ |
274 | | - '<p class="short_match vo_showcode"><a href="#"><span>Share or Embed</span></a></p>'; |
| 272 | + '<p class="short_match vo_selection"><a href="#"><span>'+gM('mwe-chose_player')+'</span></a></p>'+ |
| 273 | + '<p class="short_match vo_download"><a href="#"><span>'+gM('mwe-download')+'</span></a></p>'+ |
| 274 | + '<p class="short_match vo_showcode"><a href="#"><span>'+gM('mwe-share')+'</span></a></p>'; |
275 | 275 | |
276 | 276 | //link to the stream page if we are not already there: |
277 | 277 | if( ctrlBuilder.embedObj.roe && typeof mv_stream_interface == 'undefined' ) |
— | — | @@ -286,31 +286,31 @@ |
287 | 287 | 'fullscreen':{ |
288 | 288 | 'w':20, |
289 | 289 | 'o':function(){ |
290 | | - return '<div title="' + gM('player_fullscreen') + '" id="fullscreen_'+ctrlBuilder.id+'" class="ui-state-default ui-corner-all ui-icon_link rButton"><span class="ui-icon ui-icon-arrow-4-diag"></span></div>' |
| 290 | + return '<div title="' + gM('mwe-player_fullscreen') + '" id="fullscreen_'+ctrlBuilder.id+'" class="ui-state-default ui-corner-all ui-icon_link rButton"><span class="ui-icon ui-icon-arrow-4-diag"></span></div>' |
291 | 291 | } |
292 | 292 | }, |
293 | 293 | 'options':{ |
294 | 294 | 'w':26, |
295 | 295 | 'o':function(){ |
296 | | - return '<div title="'+ gM('player_options') + '" id="options_button_'+ctrlBuilder.id+'" class="ui-state-default ui-corner-all ui-icon_link rButton"><span class="ui-icon ui-icon-wrench"></span></div>'; |
| 296 | + return '<div title="'+ gM('mwe-player_options') + '" id="options_button_'+ctrlBuilder.id+'" class="ui-state-default ui-corner-all ui-icon_link rButton"><span class="ui-icon ui-icon-wrench"></span></div>'; |
297 | 297 | } |
298 | 298 | }, |
299 | 299 | 'pause':{ |
300 | 300 | 'w':24, |
301 | 301 | 'o':function(){ |
302 | | - return '<div title="' + gM('play_clip') + '" id="mv_play_pause_button_' + ctrlBuilder.id + '" class="ui-state-default ui-corner-all ui-icon_link lButton"><span class="ui-icon ui-icon-play"/></div>'; |
| 302 | + return '<div title="' + gM('mwe-play_clip') + '" id="mv_play_pause_button_' + ctrlBuilder.id + '" class="ui-state-default ui-corner-all ui-icon_link lButton"><span class="ui-icon ui-icon-play"/></div>'; |
303 | 303 | } |
304 | 304 | }, |
305 | 305 | 'closed_captions':{ |
306 | 306 | 'w':23, |
307 | 307 | 'o':function(){ |
308 | | - return '<div title="' + gM('closed_captions') + '" id="timed_text_'+ctrlBuilder.id+'" class="ui-state-default ui-corner-all ui-icon_link rButton"><span class="ui-icon ui-icon-comment"></span></div>' |
| 308 | + return '<div title="' + gM('mwe-closed_captions') + '" id="timed_text_'+ctrlBuilder.id+'" class="ui-state-default ui-corner-all ui-icon_link rButton"><span class="ui-icon ui-icon-comment"></span></div>' |
309 | 309 | } |
310 | 310 | }, |
311 | 311 | 'volume_control':{ |
312 | 312 | 'w':23, |
313 | 313 | 'o':function(){ |
314 | | - return '<div title="' + gM('volume_control') + '" id="volume_control_'+ctrlBuilder.id+'" class="ui-state-default ui-corner-all ui-icon_link rButton">' + |
| 314 | + return '<div title="' + gM('mwe-volume_control') + '" id="volume_control_'+ctrlBuilder.id+'" class="ui-state-default ui-corner-all ui-icon_link rButton">' + |
315 | 315 | '<span class="ui-icon ui-icon-volume-on"></span>' + |
316 | 316 | '<div style="position:absolute;display:none;" id="vol_container_'+ctrlBuilder.id+'" class="vol_container ui-corner-all">' + |
317 | 317 | '<div class="volume_bar" id="volume_bar_' + ctrlBuilder.id + '"></div>' + |
Index: trunk/phase3/js2/mwEmbed/skins/mvpcf/styles.css |
— | — | @@ -739,4 +739,58 @@ |
740 | 740 | height:10px; |
741 | 741 | position:absolute; |
742 | 742 | left:-1px; |
| 743 | +} |
| 744 | + |
| 745 | +/* related videos Video */ |
| 746 | +.related_vids { |
| 747 | + top:10px; |
| 748 | + left:5px; |
| 749 | + right:5px; |
| 750 | + bottom:5px; |
| 751 | + position:absolute; |
| 752 | + overflow-y:auto; |
| 753 | +} |
| 754 | +.related_vids h1 { |
| 755 | + border:medium none; |
| 756 | + font-size:20px; |
| 757 | + margin:4px 0px 4px 11px; |
| 758 | + padding:0; |
| 759 | + color:#F0F0F0; |
| 760 | + font-family:arial,sans-serif; |
| 761 | +} |
| 762 | + |
| 763 | +.related_vids ul { |
| 764 | + margin:0; |
| 765 | + padding:0; |
| 766 | + |
| 767 | + list-style-image:none; |
| 768 | + list-style-position:inside; |
| 769 | + list-style-type:none; |
| 770 | + margin:0; |
| 771 | + padding:0; |
| 772 | +} |
| 773 | + |
| 774 | + |
| 775 | +.related_vids li{ |
| 776 | + -x-system-font:none; |
| 777 | + color:#FAFAFA; |
| 778 | + display:table; |
| 779 | + font-family:arial,sans-serif; |
| 780 | + font-size:11px; |
| 781 | + line-height:normal; |
| 782 | + margin:0 0 6px 35px; |
| 783 | + padding:0; |
| 784 | +} |
| 785 | + |
| 786 | +.related_vids li div { |
| 787 | + float:right; |
| 788 | + margin:5px 0 0 10px; |
| 789 | + width:200px; |
| 790 | +} |
| 791 | + |
| 792 | +.related_vids img { |
| 793 | + width:80px; |
| 794 | + z-index:2; |
| 795 | + border-bottom:3px solid #36393D; |
| 796 | + border-top:3px solid #36393D; |
743 | 797 | } |
\ No newline at end of file |
Index: trunk/phase3/js2/mwEmbed/mv_embed.js |
— | — | @@ -211,7 +211,7 @@ |
212 | 212 | "mvFirefoggRender" : "libSequencer/mvFirefoggRender.js", |
213 | 213 | "mvTimedEffectsEdit": "libSequencer/mvTimedEffectsEdit.js", |
214 | 214 | |
215 | | - "libTimedText" : "libTimedText/mvTextInterface.js" |
| 215 | + "mvTextInterface" : "libTimedText/mvTextInterface.js" |
216 | 216 | |
217 | 217 | }); |
218 | 218 | |
— | — | @@ -1093,7 +1093,7 @@ |
1094 | 1094 | if(!options.data['action']) |
1095 | 1095 | options.data['action']='query'; |
1096 | 1096 | |
1097 | | - js_log('do api req: ' + options.url +'?' + jQuery.param(options.data) ); |
| 1097 | + //js_log('do api req: ' + options.url +'?' + jQuery.param(options.data) ); |
1098 | 1098 | //build request string: |
1099 | 1099 | if( parseUri( document.URL ).host == parseUri( options.url ).host ){ |
1100 | 1100 | //local request do api request directly |
Index: trunk/phase3/js2/mwEmbed/libEmbedVideo/nativeEmbed.js |
— | — | @@ -159,11 +159,7 @@ |
160 | 160 | //update currentTime |
161 | 161 | this.currentTime = this.vid.currentTime; |
162 | 162 | this.addPresTimeOffset(); |
163 | | - |
164 | | - //do clip done |
165 | | - if(this.currentTime > this.duration){ |
166 | | - this.onClipDone(); |
167 | | - } |
| 163 | + |
168 | 164 | //js_log('currentTime:' + this.currentTime); |
169 | 165 | //js_log('this.currentTime: ' + this.currentTime ); |
170 | 166 | //once currentTime is updated call parent_monitor |