Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js |
— | — | @@ -684,9 +684,7 @@ |
685 | 685 | }); |
686 | 686 | }, |
687 | 687 | /* check for all the results to finish */ |
688 | | - checkResultsDone: function(){ |
689 | | - js_log( "checkResultsDone:entry: " + rsdMVRS.disp_item + ' not: ' + this.disp_item); |
690 | | - |
| 688 | + checkResultsDone: function(){ |
691 | 689 | var _this = this; |
692 | 690 | var loading_done = true; |
693 | 691 | |
— | — | @@ -699,10 +697,9 @@ |
700 | 698 | } |
701 | 699 | if( loading_done ){ |
702 | 700 | this.drawOutputResults(); |
703 | | - }else{ |
704 | | - js_log("before setTimeout: " + rsdMVRS.disp_item); |
| 701 | + }else{ |
705 | 702 | //make sure the instance name is up-to-date refrence to _this; |
706 | | - eval( _this.instance_name + ' = _this'); |
| 703 | + eval( _this.instance_name + ' = _this'); |
707 | 704 | setTimeout( _this.instance_name + '.checkResultsDone()', 30); |
708 | 705 | } |
709 | 706 | }, |
Index: branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvPlayList.js |
— | — | @@ -736,11 +736,13 @@ |
737 | 737 | } |
738 | 738 | }); |
739 | 739 | //set the current clip to the first clip: |
740 | | - this.cur_clip = this.start_clip; |
741 | | - //display the first clip thumb: |
742 | | - this.cur_clip.embed.stop(); |
743 | | - //make sure the current clip is vissable: |
744 | | - $j('#clipDesc_'+this.cur_clip.id).show(); |
| 740 | + if(this.start_clip){ |
| 741 | + this.cur_clip = this.start_clip; |
| 742 | + //display the first clip thumb: |
| 743 | + this.cur_clip.embed.stop(); |
| 744 | + //make sure the current clip is vissable: |
| 745 | + $j('#clipDesc_'+this.cur_clip.id).show(); |
| 746 | + } |
745 | 747 | //reset the currentTime: |
746 | 748 | this.currentTime = 0; |
747 | 749 | //FIXME still some issues with "stoping" and reseting the playlist |
Index: branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvSequencer.js |
— | — | @@ -221,8 +221,8 @@ |
222 | 222 | 'width:'+this.video_width+'px;height:'+this.video_height+'px;border:solid thin blue;background:#FFF;font-color:black;"/>'+ |
223 | 223 | '<div id="'+this.sequence_tools_id+'" style="position:absolute;' + |
224 | 224 | 'left:0px;right:'+(this.video_width+15)+'px;top:0px;height:'+(this.video_height+23)+'px;"/>'+ |
225 | | - '<div id="'+this.timeline_id+'" style="position:absolute;' + |
226 | | - 'left:0px;right:0px;top:'+(this.video_height+10)+'px;bottom:25px;overflow:auto;">'+ |
| 225 | + '<div id="'+this.timeline_id+'" class="ui-widget ui-widget-content ui-corner-all" style="position:absolute;' + |
| 226 | + 'left:0px;right:0px;top:'+(this.video_height+34)+'px;bottom:25px;overflow:auto;">'+ |
227 | 227 | gM('loading_timeline')+ '</div>'+ |
228 | 228 | '<div id="' + this.target_sequence_container + '_status" style="position:absolute;left:0px;width:300px;"></div>'+ |
229 | 229 | '<div id="' + this.target_sequence_container + '_save_cancel" style="position:absolute;'+ |
— | — | @@ -402,7 +402,7 @@ |
403 | 403 | $j('#'+this.timeline_id+'_tracks').append( |
404 | 404 | '<div id="container_track_'+i+'" style="top:'+top_pos+'px;height:'+(track_height+2)+'px;left:0px;right:0px;" class="container_track" />' |
405 | 405 | ); |
406 | | - top_pos+=track_height+20; |
| 406 | + top_pos+=track_height+20; |
407 | 407 | } |
408 | 408 | } |
409 | 409 | if( this.timeline_mode=='storyboard'){ |
— | — | @@ -541,7 +541,7 @@ |
542 | 542 | selected_tab=inx; |
543 | 543 | |
544 | 544 | o+='<li>' + |
545 | | - '<a id="mv_menu_item_'+tab_id+'" href="#' + tab_id + '_ic">'+gM('menu_' + tab_id )+ |
| 545 | + '<a id="mv_menu_item_'+tab_id+'" href="#' + tab_id + '_ic">'+gM('menu_' + tab_id ) + '</a>' + |
546 | 546 | '</li>'; |
547 | 547 | |
548 | 548 | tabc += '<div id="' + tab_id + '_ic" style="overflow:auto;height:272px;" >'; |
— | — | @@ -957,8 +957,8 @@ |
958 | 958 | 'height:' + (this.track_clipThumb_height+30) + 'px;' + |
959 | 959 | 'width:'+(container_width)+'px;" >'; |
960 | 960 | track_html+=clip.embed.renderTimelineThumbnail({ |
961 | | - 'width':frame_width, |
962 | | - 'thumb_class':'mv_clip_thumb', |
| 961 | + 'width' : frame_width, |
| 962 | + 'thumb_class' : 'mv_clip_thumb', |
963 | 963 | 'height':this.track_clipThumb_height, |
964 | 964 | 'time':0 |
965 | 965 | }); |
— | — | @@ -1254,7 +1254,7 @@ |
1255 | 1255 | //js_log("pinit: "+ pint+ ' < '+clip.width_px+' ++'+frame_width); |
1256 | 1256 | for(var p=pint;p<clip.width_px;p+=frame_width){ |
1257 | 1257 | var clip_time = (p==0)?0:Math.round(p*this.timeline_scale); |
1258 | | - js_log('rendering clip frames: p:' +p+' '+ (p*this.timeline_scale)+' ' + clip_time); |
| 1258 | + js_log('rendering clip frames: p:' +p+' pts:'+ (p*this.timeline_scale)+' time:' + clip_time + ' height:'+this.track_thumb_height); |
1259 | 1259 | clip_frames_html+=clip.embed.renderTimelineThumbnail({ |
1260 | 1260 | 'width': frame_width, |
1261 | 1261 | 'thumb_class':'mv_tl_thumb', |
— | — | @@ -1323,12 +1323,27 @@ |
1324 | 1324 | render_playheadhead_seeker:function(){ |
1325 | 1325 | //render out time stamps and time "jump" links |
1326 | 1326 | //first get total width |
1327 | | - if(this.timeline_mode=='time'){ |
1328 | | - //hide the old control if present |
1329 | | - $j('#'+this.timeline_id + '_pl_control').remove(); |
1330 | | - //set width based on pixle to time and current length: |
1331 | | - pixle_length = Math.round( this.timeline_duration / this.timeline_scale); |
1332 | | - $j('#'+this.timeline_id+'_head_jump').width(pixle_length); |
| 1327 | + |
| 1328 | + //remove the old one if its still there |
| 1329 | + $j('#'+this.timeline_id +'_pl_control').remove(); |
| 1330 | + js_log('output controls to: ' + this.target_sequence_container); |
| 1331 | + //render out a playlist clip wide and all the way to the right (only playhead and play button) (outside of timeline) |
| 1332 | + $j(this.target_sequence_container).append('<div id="'+ this.timeline_id +'_pl_control"'+ |
| 1333 | + ' style="position:absolute;top:' + (this.plObj.height) +'px;'+ |
| 1334 | + 'right:1px;width:'+this.plObj.width+'px;height:'+this.plObj.org_control_height+'" '+ |
| 1335 | + 'class="videoPlayer"><div class="ui-widget ui-corner-bottom ui-state-default controls">'+ |
| 1336 | + this.plObj.getControlsHTML() + |
| 1337 | + '</div>'+ |
| 1338 | + '</div>'); |
| 1339 | + //update time and render out clip dividers .. should be used to show load progress |
| 1340 | + this.plObj.updateBaseStatus(); |
| 1341 | + |
| 1342 | + //once the controls are in the DOM add hooks: |
| 1343 | + ctrlBuilder.addControlHooks(this.plObj); |
| 1344 | + |
| 1345 | + //render out the "jump" div |
| 1346 | + if(this.timeline_mode=='time'){ |
| 1347 | + /*$j('#'+this.timeline_id+'_head_jump').width(pixle_length); |
1333 | 1348 | //output times every 50pixles |
1334 | 1349 | var out=''; |
1335 | 1350 | //output time-desc every 50pixles and jump links every 10 pixles |
— | — | @@ -1340,26 +1355,9 @@ |
1341 | 1356 | out+='<span style="position:absolute;left:'+i+'px;">|'+seconds2npt(Math.round(i*this.timeline_scale))+'</span>'; |
1342 | 1357 | n++; |
1343 | 1358 | if(n==10)n=0; |
1344 | | - } |
1345 | | - $j('#'+this.timeline_id+'_head_jump').html(out); |
1346 | | - } |
1347 | | - if(this.timeline_mode=='storyboard'){ |
1348 | | - //remove the old one if its still there |
1349 | | - $j('#'+this.timeline_id +'_pl_control').remove(); |
1350 | | - //render out a playlist clip wide and all the way to the right (only playhead and play button) (outside of timeline) |
1351 | | - $j(this.target_sequence_container).append('<div id="'+ this.timeline_id +'_pl_control"'+ |
1352 | | - ' style="position:absolute;top:' + (this.plObj.height) +'px;'+ |
1353 | | - 'right:1px;width:'+this.plObj.width+'px;height:'+this.plObj.org_control_height+'" '+ |
1354 | | - 'class="videoPlayer"><div class="ui-widget ui-corner-bottom ui-state-default controls">'+ |
1355 | | - this.plObj.getControlsHTML() + |
1356 | | - '</div>'+ |
1357 | | - '</div>'); |
1358 | | - //update time and render out clip dividers .. should be used to show load progress |
1359 | | - this.plObj.updateBaseStatus(); |
| 1359 | + }*/ |
1360 | 1360 | |
1361 | | - //once the controls are in the DOM add hooks: |
1362 | | - ctrlBuilder.addControlHooks(this.plObj); |
1363 | | - } |
| 1361 | + } |
1364 | 1362 | }, |
1365 | 1363 | jt:function( jh_time ){ |
1366 | 1364 | js_log('jt:' + jh_time); |
Index: branches/new-upload/phase3/js2/mwEmbed/libClipEdit/mvClipEdit.js |
— | — | @@ -98,15 +98,15 @@ |
99 | 99 | 'duration':{ |
100 | 100 | d:1, |
101 | 101 | 'media':['image','template'], |
102 | | - 'doEdit':function( _this ){ |
| 102 | + 'doEdit':function(target, _this ){ |
103 | 103 | //do clock mouse scroll duration editor |
104 | | - $j('#sub_cliplib_ic').html('cur dur: ' + _this.rObj.dur ); |
| 104 | + $j(target).html('cur dur: ' + _this.rObj.dur ); |
105 | 105 | } |
106 | 106 | }, |
107 | 107 | 'inoutpoints':{ |
108 | 108 | 'd':1, |
109 | 109 | 'media':['video'], |
110 | | - 'doEdit':function( _this ){ |
| 110 | + 'doEdit':function(target, _this ){ |
111 | 111 | //do clock mouse scroll duration editor |
112 | 112 | var end_ntp = ( _this.rObj.embed.end_ntp) ? _this.rObj.embed.end_ntp : _this.rObj.embed.getDuration(); |
113 | 113 | if(!end_ntp) |
— | — | @@ -116,7 +116,7 @@ |
117 | 117 | if(!start_ntp) |
118 | 118 | seconds2npt( 0 ); |
119 | 119 | |
120 | | - $j('#sub_cliplib_ic').html( |
| 120 | + $j(target).html( |
121 | 121 | _this.getSetInOutHtml({ |
122 | 122 | 'start_ntp' : start_ntp, |
123 | 123 | 'end_ntp' : end_ntp |
— | — | @@ -128,7 +128,7 @@ |
129 | 129 | 'fileopts':{ |
130 | 130 | 'd':0, |
131 | 131 | 'media':['image','video','template'], |
132 | | - 'doEdit':function( _this ){ |
| 132 | + 'doEdit':function(target, _this ){ |
133 | 133 | var doEditHtml = function(){ |
134 | 134 | //add html for rObj resource: |
135 | 135 | var o= '<table>' + |
— | — | @@ -173,14 +173,14 @@ |
174 | 174 | '<td>' + |
175 | 175 | gM('mv_resource_page') + |
176 | 176 | '</td>' + |
177 | | - '<td><a href="' + wgArticlePath.replace(/\$1/, _this.rObj.uri ) + |
| 177 | + '<td><a href="' + wgArticlePath.replace(/\$1/, _this.rObj.uri ) +'" '+ |
178 | 178 | ' target="new">'+ |
179 | 179 | _this.rObj.uri + '</a>'+ |
180 | 180 | '</td>'+ |
181 | 181 | '</tr>'; |
182 | 182 | o+='</table>'; |
183 | 183 | |
184 | | - $j('#sub_cliplib_ic').html ( o ); |
| 184 | + $j(target).html ( o ); |
185 | 185 | //add update bindings |
186 | 186 | |
187 | 187 | //update doFocusBindings |
— | — | @@ -247,25 +247,25 @@ |
248 | 248 | 'panzoom':{ |
249 | 249 | 'd':0, |
250 | 250 | 'media':['image','video'], |
251 | | - 'doEdit':function( _this ){ |
| 251 | + 'doEdit':function(target, _this ){ |
252 | 252 | //do clock mouse scroll duration editor |
253 | | - $j('#sub_cliplib_ic').html('<h3>Set Position</h3><h3>Set Zoom</h3><h3>Set Crop</h3><h3>Set Aspect</h3>'); |
| 253 | + $j(target).html('<h3>Set Position</h3><h3>Set Zoom</h3><h3>Set Crop</h3><h3>Set Aspect</h3>'); |
254 | 254 | } |
255 | 255 | }, |
256 | 256 | 'overlays':{ |
257 | 257 | 'd':0, |
258 | 258 | 'media':['image','video'], |
259 | | - 'doEdit':function( _this ){ |
| 259 | + 'doEdit':function(target, _this ){ |
260 | 260 | //do clock mouse scroll duration editor |
261 | | - $j('#sub_cliplib_ic').html('<h3>Current Overlays:</h3>Add,Remove,Modify'); |
| 261 | + $j(target).html('<h3>Current Overlays:</h3>Add,Remove,Modify'); |
262 | 262 | } |
263 | 263 | }, |
264 | 264 | 'audio':{ |
265 | 265 | 'd':0, |
266 | 266 | 'media':['image','video', 'template'], |
267 | | - 'doEdit':function( _this ){ |
| 267 | + 'doEdit':function(target, _this ){ |
268 | 268 | //do clock mouse scroll duration editor |
269 | | - $j('#sub_cliplib_ic').html('<h3>Audio Volume:</h3>'); |
| 269 | + $j(target).html('<h3>Audio Volume:</h3>'); |
270 | 270 | } |
271 | 271 | } |
272 | 272 | }, |
— | — | @@ -273,8 +273,11 @@ |
274 | 274 | var _this = this; |
275 | 275 | //add in subMenus if set |
276 | 276 | //check for submenu and add to item container |
277 | | - var o=''; |
278 | | - o+= '<ul id="mv_submenu_clipedit" class="mv_submenu">'; |
| 277 | + var o=''; |
| 278 | + var tabc =''; |
| 279 | + o+= '<div id="mv_submenu_clipedit">'; |
| 280 | + o+='<ul>'; |
| 281 | + var selected_tab = 0; |
279 | 282 | $j.each(this.edit_types, function(sInx, editType){ |
280 | 283 | //check if the given editType is valid for our given media type |
281 | 284 | var include = false; |
— | — | @@ -282,22 +285,28 @@ |
283 | 286 | if( editType.media[i] == _this.media_type) |
284 | 287 | include = true; |
285 | 288 | } |
286 | | - if(include){ |
287 | | - var sub_sel_class = (editType.d == 1)?'class="mv_sub_selected"':''; |
288 | | - o+= '<li ' + sub_sel_class + ' id="mv_smi_' + sInx + '">' + |
289 | | - gM('sc_' + sInx ) + '</li>'; |
| 289 | + if(include){ |
| 290 | + o+= '<li>'+ |
| 291 | + '<a id="mv_smi_'+sInx+'" href="#sc_' + sInx + '">' + gM('sc_' + sInx ) + '</a>'+ |
| 292 | + '</li>'; |
| 293 | + tabc += '<div id="sc_' + sInx + '" style="overflow:auto;" ></div>'; |
290 | 294 | } |
291 | 295 | }); |
292 | | - o+= '</ul>'; |
293 | | - //add sub menu container with menu html: |
294 | | - o+= '<div id="sub_cliplib_ic" class="submenu_container"></div>'; |
295 | | - $j('#'+this.control_ct).html( o ) ; |
| 296 | + o+= '</ul>' + tabc; |
| 297 | + o+= '</div>'; |
| 298 | + //add sub menu container with menu html: |
| 299 | + $j('#'+this.control_ct).html( o ) ; |
296 | 300 | //set up bindings: |
297 | | - for( var i in this.edit_types){ |
298 | | - $j('#mv_smi_'+ i).click( function(){ |
299 | | - _this.doDisplayEdit( $j(this).attr("id").replace('mv_smi_','') ); |
300 | | - }); |
301 | | - } |
| 301 | + $j('#mv_submenu_clipedit').tabs({ |
| 302 | + select: function(event, ui) { |
| 303 | + _this.doDisplayEdit( $j(ui.tab).attr('id').replace('mv_smi_', '') ); |
| 304 | + } |
| 305 | + //add sorting |
| 306 | + }).addClass('ui-tabs-vertical ui-helper-clearfix'); |
| 307 | + //close left: |
| 308 | + $j("#mv_submenu_clipedit li").removeClass('ui-corner-top').addClass('ui-corner-left'); |
| 309 | + //update the default edit display: |
| 310 | + _this.doDisplayEdit(); |
302 | 311 | }, |
303 | 312 | doDisplayEdit:function( edit_type ){ |
304 | 313 | if(!edit_type) |
— | — | @@ -305,15 +314,11 @@ |
306 | 315 | if(this.edit_types[i].d == 1) |
307 | 316 | edit_type = i; |
308 | 317 | } |
309 | | - js_log('doDisplayEdit: ' + edit_type ); |
310 | | - //remove from all |
311 | | - $j('#mv_submenu_clipedit li').removeClass('mv_sub_selected'); |
312 | | - //add selected class: |
313 | | - $j('#mv_smi_' + edit_type).addClass('mv_sub_selected'); |
| 318 | + js_log('doDisplayEdit: ' + edit_type ); |
314 | 319 | |
315 | 320 | //do edit interface for that edit type: |
316 | 321 | if( this.edit_types[ edit_type ].doEdit ) |
317 | | - this.edit_types[ edit_type ].doEdit( this ); |
| 322 | + this.edit_types[ edit_type ].doEdit( '#sc_'+edit_type, this ); |
318 | 323 | }, |
319 | 324 | setUpVideoCtrl:function(){ |
320 | 325 | js_log('setUpVideoCtrl:f'); |
Index: branches/new-upload/phase3/js2/mwEmbed/skins/mvpcf/mv_sequence.css |
— | — | @@ -171,22 +171,23 @@ |
172 | 172 | right:0px; |
173 | 173 | } |
174 | 174 | .submenu_container{ |
175 | | - top:25px; |
| 175 | +/* top:25px; |
176 | 176 | left:10px; |
177 | 177 | right:0px; |
178 | 178 | overflow:auto; |
179 | 179 | position:absolute; |
180 | 180 | broder: solid thin gray; |
| 181 | +*/ |
181 | 182 | } |
182 | 183 | .mv_submenu{ |
183 | 184 | /*position:absolute;*/ |
184 | | - left:0px; |
| 185 | + /*left:0px; |
185 | 186 | top:0px; |
186 | 187 | margin:2px; |
187 | 188 | list-style-type:none; |
188 | 189 | bottom:0px; |
189 | 190 | border:none; |
190 | | - padding:0px; |
| 191 | + padding:0px;*/ |
191 | 192 | } |
192 | 193 | .mv_submenu li{ |
193 | 194 | border:solid thin gray; |
Index: branches/new-upload/phase3/js2/mwEmbed/skins/mvpcf/styles.css |
— | — | @@ -684,4 +684,14 @@ |
685 | 685 | |
686 | 686 | .ui-progressbar-value{ |
687 | 687 | background-image: url('images/pbar-ani.gif'); |
688 | | -} |
\ No newline at end of file |
| 688 | +} |
| 689 | + |
| 690 | +/* Vertical Tabs |
| 691 | +----------------------------------*/ |
| 692 | +.ui-tabs-vertical { width: 55em; } |
| 693 | +.ui-tabs-vertical .ui-tabs-nav { padding: .2em .1em .2em .2em; float: left; width: 12em; } |
| 694 | +.ui-tabs-vertical .ui-tabs-nav li { clear: left; width: 100%; border-bottom-width: 1px !important; border-right-width: 0 !important; margin: 0 -1px .2em 0; } |
| 695 | +.ui-tabs-vertical .ui-tabs-nav li a { display:block; } |
| 696 | +.ui-tabs-vertical .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 0; padding-right: .1em; border-right-width: 1px; border-right-width: 1px; } |
| 697 | +.ui-tabs-vertical .ui-tabs-panel { padding: 1em; float: right; width: 40em;} |
| 698 | + |
Index: branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/htmlEmbed.js |
— | — | @@ -80,6 +80,7 @@ |
81 | 81 | return true; |
82 | 82 | }, |
83 | 83 | renderTimelineThumbnail:function( options ){ |
| 84 | + js_log("HTMLembed req w, height: " + options.width + ' ' + options.height); |
84 | 85 | //generate a scaled down version _that_ we can clone if nessisary |
85 | 86 | //add a not vissiable container to the body: |
86 | 87 | var do_refresh = (typeof options['refresh'] != 'undefined')?true:false; |
— | — | @@ -88,16 +89,18 @@ |
89 | 90 | if( $j('#' + thumb_render_id ).length == 0 || do_refresh ){ |
90 | 91 | //set the font scale down percentage: (kind of arbitrary) |
91 | 92 | var scale_perc = options.width / this.pc.pp.width; |
92 | | - //js_log('scale_perc:'+options.width + ' / '+ $j(this).width()+ ' = '+scale_perc ); |
| 93 | + js_log('scale_perc:'+options.width + ' / '+ $j(this).width()+ ' = '+scale_perc ); |
93 | 94 | //min scale font percent of 70 (overflow is hidden) |
94 | | - var font_perc = ( Math.round( scale_perc*100 ) < 80 )?80:Math.round( scale_perc*100 ); |
95 | | - var thumb_class = (typeof options['thumb_class'] !='undefined')? options['thumb_class'] : ''; |
96 | | - |
| 95 | + var font_perc = ( Math.round( scale_perc*100 ) < 80 ) ? 80 : Math.round( scale_perc*100 ); |
| 96 | + var thumb_class = (typeof options['thumb_class'] !='undefined')? options['thumb_class'] : ''; |
97 | 97 | $j('body').append( '<div id="' + thumb_render_id + '" style="display:none">'+ |
98 | 98 | '<div class="' + thumb_class + '" '+ |
99 | 99 | 'style="width:'+options.width+'px;height:'+options.height+'px;" >'+ |
100 | | - this.getThumbnailHTML() + |
101 | | - '</div>'+ |
| 100 | + this.getThumbnailHTML({ |
| 101 | + 'width': options.width, |
| 102 | + 'height': options.height |
| 103 | + }) + |
| 104 | + '</div>' + |
102 | 105 | '</div>' |
103 | 106 | ); |
104 | 107 | //scale down the fonts: |
— | — | @@ -112,7 +115,7 @@ |
113 | 116 | $j('#' + thumb_render_id + ' img').filter('[width]').each(function(){ |
114 | 117 | $j(this).attr({ |
115 | 118 | 'width': Math.round( $j(this).attr('width') * scale_perc ), |
116 | | - 'height': Math.round( $j(this).attr('height') * scale_perc ) |
| 119 | + 'height': Math.round( $j(this).attr('height') * scale_perc ) |
117 | 120 | } |
118 | 121 | ); |
119 | 122 | }); |
— | — | @@ -133,11 +136,16 @@ |
134 | 137 | //wrap output in videoPlayer_ div: |
135 | 138 | $j(this).html('<div id="videoPlayer_'+ this.id+'">'+this.getThumbnailHTML()+'</div>'); |
136 | 139 | }, |
137 | | - getThumbnailHTML:function(){ |
| 140 | + getThumbnailHTML:function( opt ){ |
138 | 141 | var out=''; |
| 142 | + if(!opt) |
| 143 | + opt = {}; |
| 144 | + var height = (opt.height)?opt.height:this.pc.pp.height; |
| 145 | + var width = (opt.width)?opt.width: this.pc.pp.width; |
| 146 | + js_log('1req '+ opt.height + ' but got: ' + height); |
139 | 147 | if( this.pc.type =='image/jpeg'){ |
140 | 148 | js_log('should put src: '+this.pc.src); |
141 | | - out = '<img width="'+this.pc.pp.width+'" height="'+this.pc.pp.height+'" src="'+this.pc.src+'">'; |
| 149 | + out = '<img style="width:'+width+'px;height:'+height+'px" src="'+this.pc.src+'">'; |
142 | 150 | }else{ |
143 | 151 | out = this.pc.wholeText; |
144 | 152 | } |
— | — | @@ -167,8 +175,7 @@ |
168 | 176 | //@@todo we can "start loading images" if we want |
169 | 177 | on_dom_swap:function(){ |
170 | 178 | this.loading_external_data=false |
171 | | - this.ready_to_play=true; |
172 | | - debugger; |
| 179 | + this.ready_to_play=true; |
173 | 180 | return ; |
174 | 181 | } |
175 | 182 | }; |
\ No newline at end of file |
Index: branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js |
— | — | @@ -1579,13 +1579,13 @@ |
1580 | 1580 | //@@todo overwite by embed library if we can render frames natavily |
1581 | 1581 | renderTimelineThumbnail:function( options ){ |
1582 | 1582 | var my_thumb_src = this.media_element.getThumbnailURL(); |
1583 | | - |
| 1583 | + //check if our thumbnail has a time attribute: |
1584 | 1584 | if( my_thumb_src.indexOf('t=') !== -1){ |
1585 | 1585 | var time_ntp = seconds2npt ( options.time + parseInt(this.start_offset) ); |
1586 | 1586 | my_thumb_src = getURLParamReplace( my_thumb_src, { 't':time_ntp, 'size': options.size } ); |
1587 | 1587 | } |
1588 | | - var thumb_class = (typeof options['thumb_class'] !='undefined')? options['thumb_class'] : ''; |
1589 | | - return '<div class="' + thumb_class + '" src="' + my_thumb_src +'" '+ |
| 1588 | + var thumb_class = (typeof options['thumb_class'] != 'undefined' ) ? options['thumb_class'] : ''; |
| 1589 | + return '<div class="ui-corner-all ' + thumb_class + '" src="' + my_thumb_src + '" '+ |
1590 | 1590 | 'style="height:' + options.height + 'px;' + |
1591 | 1591 | 'width:' + options.width + 'px" >' + |
1592 | 1592 | '<img src="' + my_thumb_src +'" '+ |