Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js |
— | — | @@ -1214,10 +1214,10 @@ |
1215 | 1215 | doImportAPI:function(rObj, cir_callback){ |
1216 | 1216 | var _this = this; |
1217 | 1217 | //baseUploadInterface |
1218 | | - mvJsLoader.doLoad( { |
1219 | | - 'mvBaseUploadInterface': 'libAddMedia/mvBaseUploadInterface.js', |
1220 | | - '$j.ui.progressbar' : 'jquery/' + jQueryUiVN + '/ui/ui.progressbar.js' |
1221 | | - },function(){ |
| 1218 | + mvJsLoader.doLoad([ |
| 1219 | + 'mvBaseUploadInterface', |
| 1220 | + '$j.ui.progressbar' |
| 1221 | + ],function(){ |
1222 | 1222 | //initicate a download similar to url copy: |
1223 | 1223 | myUp = new mvBaseUploadInterface({ |
1224 | 1224 | 'api_url' : _this.local_wiki_api_url, |
— | — | @@ -1401,15 +1401,14 @@ |
1402 | 1402 | _this.updatePreviewText( rObj ); |
1403 | 1403 | $j(_this.target_textbox).val( _this.preview_wtext ); |
1404 | 1404 | |
1405 | | - //also update the render area: |
| 1405 | + //update the render area (if present) |
1406 | 1406 | if(_this.target_render_area && _this.cur_embed_code){ |
1407 | 1407 | //output with some padding: |
1408 | 1408 | $j(_this.target_render_area).append( _this.cur_embed_code + '<div style="clear:both;height:10px">') |
1409 | 1409 | //update if its |
1410 | | - mv_video_embed(function(){ |
1411 | | - _this.closeAll(); |
1412 | | - }); |
| 1410 | + mv_video_embed(); |
1413 | 1411 | } |
| 1412 | + _this.closeAll(); |
1414 | 1413 | }); |
1415 | 1414 | }, |
1416 | 1415 | closeAll:function(){ |
Index: branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvSequencer.js |
— | — | @@ -9,7 +9,7 @@ |
10 | 10 | * @url http://metavid.org |
11 | 11 | * |
12 | 12 | * @further developed in open source collaboration with kaltura. |
13 | | - * more info at http://kaltura.com |
| 13 | + * more info at http://kaltura.com & http://kaltura.org |
14 | 14 | * |
15 | 15 | * mv_sequencer.js |
16 | 16 | * is a basic embeddeble sequencer. |
Index: branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js |
— | — | @@ -108,10 +108,8 @@ |
109 | 109 | if(swap_done_callback) |
110 | 110 | mvEmbed.flist.push( swap_done_callback ); |
111 | 111 | //get mv_embed location if it has not been set |
112 | | - js_log('mv_embed ' + MV_EMBED_VERSION); |
| 112 | + js_log('mv_embed ' + MV_EMBED_VERSION); |
113 | 113 | |
114 | | - this.swap_done_callback = swap_done_callback; |
115 | | - |
116 | 114 | var loadPlaylistLib=false; |
117 | 115 | //set up the jQuery selector: |
118 | 116 | |
— | — | @@ -126,13 +124,13 @@ |
127 | 125 | //if video doSwap |
128 | 126 | switch( this_elm.tagName.toLowerCase()){ |
129 | 127 | case 'video': |
130 | | - var videoInterface = new embedVideo(this_elm); |
131 | | - mvEmbed.swapEmbedVideoElement( this_elm, videoInterface ); |
| 128 | + var videoInterface = new embedVideo(this_elm); |
| 129 | + mvEmbed.swapEmbedVideoElement( this_elm, videoInterface ); |
132 | 130 | break; |
133 | 131 | case 'audio': |
134 | 132 | var videoInterface = new embedVideo(this_elm); |
135 | 133 | videoInterface.type ='audio'; |
136 | | - mvEmbed.swapEmbedVideoElement( this_elm, videoInterface ); |
| 134 | + mvEmbed.swapEmbedVideoElement( this_elm, videoInterface ); |
137 | 135 | break; |
138 | 136 | case 'playlist': |
139 | 137 | loadPlaylistLib=true; |
— | — | @@ -149,7 +147,7 @@ |
150 | 148 | //ie8 does not play well with the jQuery video,audio,playlist selector use native: |
151 | 149 | if($j.browser.msie && $j.browser.version >= 8){ |
152 | 150 | jtags = j_selector.split(','); |
153 | | - for(var i=0;i<jtags.length;i++){ |
| 151 | + for(var i=0;i<jtags.length;i++){ |
154 | 152 | $j( document.getElementsByTagName( jtags[i] )).each(function(){ |
155 | 153 | eAction(this); |
156 | 154 | }); |
— | — | @@ -239,6 +237,7 @@ |
240 | 238 | }, |
241 | 239 | //this should not be needed. |
242 | 240 | checkClipsReady : function(){ |
| 241 | + js_log('checkClipsReady'); |
243 | 242 | var is_ready=true; |
244 | 243 | for(var i=0; i < global_player_list.length; i++){ |
245 | 244 | if( $j('#'+global_player_list[i]).length !=0){ |
— | — | @@ -254,12 +253,15 @@ |
255 | 254 | mvEmbed.allClipsReady = true; |
256 | 255 | // run queued functions |
257 | 256 | //js_log('run queded functions:' + mvEmbed.flist[0]); |
258 | | - while (mvEmbed.flist.length){ |
259 | | - mvEmbed.flist.shift()(); |
260 | | - } |
| 257 | + mvEmbed.runFlist(); |
261 | 258 | }else{ |
262 | 259 | setTimeout( 'mvEmbed.checkClipsReady()', 25 ); |
263 | 260 | } |
| 261 | + }, |
| 262 | + runFlist:function(){ |
| 263 | + while (this.flist.length){ |
| 264 | + this.flist.shift()(); |
| 265 | + } |
264 | 266 | } |
265 | 267 | } |
266 | 268 | |