r42432 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r42431‎ | r42432 | r42433 >
Date:23:40, 23 October 2008
Author:dale
Status:old
Tags:
Comment:
smile sequencer updates
Modified paths:
  • /trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_flashEmbed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_htmlEmbed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/mv_playlist.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/mv_sequencer.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/ui.resizable.js (deleted) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_sequence.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MetavidWiki/skins/mv_sequence.js
@@ -11,7 +11,6 @@
1212 });
1313 }
1414
15 -
1615 /*
1716 * similar to mv_d_ajax_form_submit in mv_stream.js
1817 * @@todo could be merged with mv_do_ajax_form_submit from mv_stream (into mv_common.js or something like that)
Index: trunk/extensions/MetavidWiki/skins/mv_embed/ui.resizable.js
@@ -1,770 +0,0 @@
2 -/*
3 - * jQuery UI Resizable
4 - *
5 - * Copyright (c) 2008 Paul Bakaus
6 - * Dual licensed under the MIT (MIT-LICENSE.txt)
7 - * and GPL (GPL-LICENSE.txt) licenses.
8 - *
9 - * http://docs.jquery.com/UI/Resizables
10 - *
11 - * Depends:
12 - * ui.core.js
13 - */
14 -(function($) {
15 -
16 -$.widget("ui.resizable", $.extend({}, $.ui.mouse, {
17 - init: function() {
18 -
19 - var self = this, o = this.options;
20 -
21 - var elpos = this.element.css('position');
22 -
23 - this.originalElement = this.element;
24 -
25 - // simulate .ui-resizable { position: relative; }
26 - this.element.addClass("ui-resizable").css({ position: /static/.test(elpos) ? 'relative' : elpos });
27 -
28 - $.extend(o, {
29 - _aspectRatio: !!(o.aspectRatio),
30 - helper: o.helper || o.ghost || o.animate ? o.helper || 'proxy' : null,
31 - knobHandles: o.knobHandles === true ? 'ui-resizable-knob-handle' : o.knobHandles
32 - });
33 -
34 - //Default Theme
35 - var aBorder = '1px solid #DEDEDE';
36 -
37 - o.defaultTheme = {
38 - 'ui-resizable': { display: 'block' },
39 - 'ui-resizable-handle': { position: 'absolute', background: '#F2F2F2', fontSize: '0.1px' },
40 - 'ui-resizable-n': { cursor: 'n-resize', height: '4px', left: '0px', right: '0px', borderTop: aBorder },
41 - 'ui-resizable-s': { cursor: 's-resize', height: '4px', left: '0px', right: '0px', borderBottom: aBorder },
42 - 'ui-resizable-e': { cursor: 'e-resize', width: '4px', top: '0px', bottom: '0px', borderRight: aBorder },
43 - 'ui-resizable-w': { cursor: 'w-resize', width: '4px', top: '0px', bottom: '0px', borderLeft: aBorder },
44 - 'ui-resizable-se': { cursor: 'se-resize', width: '4px', height: '4px', borderRight: aBorder, borderBottom: aBorder },
45 - 'ui-resizable-sw': { cursor: 'sw-resize', width: '4px', height: '4px', borderBottom: aBorder, borderLeft: aBorder },
46 - 'ui-resizable-ne': { cursor: 'ne-resize', width: '4px', height: '4px', borderRight: aBorder, borderTop: aBorder },
47 - 'ui-resizable-nw': { cursor: 'nw-resize', width: '4px', height: '4px', borderLeft: aBorder, borderTop: aBorder }
48 - };
49 -
50 - o.knobTheme = {
51 - 'ui-resizable-handle': { background: '#F2F2F2', border: '1px solid #808080', height: '8px', width: '8px' },
52 - 'ui-resizable-n': { cursor: 'n-resize', top: '0px', left: '45%' },
53 - 'ui-resizable-s': { cursor: 's-resize', bottom: '0px', left: '45%' },
54 - 'ui-resizable-e': { cursor: 'e-resize', right: '0px', top: '45%' },
55 - 'ui-resizable-w': { cursor: 'w-resize', left: '0px', top: '45%' },
56 - 'ui-resizable-se': { cursor: 'se-resize', right: '0px', bottom: '0px' },
57 - 'ui-resizable-sw': { cursor: 'sw-resize', left: '0px', bottom: '0px' },
58 - 'ui-resizable-nw': { cursor: 'nw-resize', left: '0px', top: '0px' },
59 - 'ui-resizable-ne': { cursor: 'ne-resize', right: '0px', top: '0px' }
60 - };
61 -
62 - o._nodeName = this.element[0].nodeName;
63 -
64 - //Wrap the element if it cannot hold child nodes
65 - if(o._nodeName.match(/canvas|textarea|input|select|button|img/i)) {
66 - var el = this.element;
67 -
68 - //Opera fixing relative position
69 - if (/relative/.test(el.css('position')) && $.browser.opera)
70 - el.css({ position: 'relative', top: 'auto', left: 'auto' });
71 -
72 - //Create a wrapper element and set the wrapper to the new current internal element
73 - el.wrap(
74 - $('<div class="ui-wrapper" style="overflow: hidden;"></div>').css( {
75 - position: el.css('position'),
76 - width: el.outerWidth(),
77 - height: el.outerHeight(),
78 - top: el.css('top'),
79 - left: el.css('left')
80 - })
81 - );
82 -
83 - var oel = this.element; this.element = this.element.parent();
84 -
85 - // store instance on wrapper
86 - this.element.data('resizable', this);
87 -
88 - //Move margins to the wrapper
89 - this.element.css({ marginLeft: oel.css("marginLeft"), marginTop: oel.css("marginTop"),
90 - marginRight: oel.css("marginRight"), marginBottom: oel.css("marginBottom")
91 - });
92 -
93 - oel.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0});
94 -
95 - //Prevent Safari textarea resize
96 - if ($.browser.safari && o.preventDefault) oel.css('resize', 'none');
97 -
98 - o.proportionallyResize = oel.css({ position: 'static', zoom: 1, display: 'block' });
99 -
100 - // avoid IE jump
101 - this.element.css({ margin: oel.css('margin') });
102 -
103 - // fix handlers offset
104 - this._proportionallyResize();
105 - }
106 -
107 - if(!o.handles) o.handles = !$('.ui-resizable-handle', this.element).length ? "e,s,se" : { n: '.ui-resizable-n', e: '.ui-resizable-e', s: '.ui-resizable-s', w: '.ui-resizable-w', se: '.ui-resizable-se', sw: '.ui-resizable-sw', ne: '.ui-resizable-ne', nw: '.ui-resizable-nw' };
108 - if(o.handles.constructor == String) {
109 -
110 - o.zIndex = o.zIndex || 1000;
111 -
112 - if(o.handles == 'all') o.handles = 'n,e,s,w,se,sw,ne,nw';
113 -
114 - var n = o.handles.split(","); o.handles = {};
115 -
116 - // insertions are applied when don't have theme loaded
117 - var insertionsDefault = {
118 - handle: 'position: absolute; display: none; overflow:hidden;',
119 - n: 'top: 0pt; width:100%;',
120 - e: 'right: 0pt; height:100%;',
121 - s: 'bottom: 0pt; width:100%;',
122 - w: 'left: 0pt; height:100%;',
123 - se: 'bottom: 0pt; right: 0px;',
124 - sw: 'bottom: 0pt; left: 0px;',
125 - ne: 'top: 0pt; right: 0px;',
126 - nw: 'top: 0pt; left: 0px;'
127 - };
128 -
129 - for(var i = 0; i < n.length; i++) {
130 - var handle = $.trim(n[i]), dt = o.defaultTheme, hname = 'ui-resizable-'+handle, loadDefault = !$.ui.css(hname) && !o.knobHandles, userKnobClass = $.ui.css('ui-resizable-knob-handle'),
131 - allDefTheme = $.extend(dt[hname], dt['ui-resizable-handle']), allKnobTheme = $.extend(o.knobTheme[hname], !userKnobClass ? o.knobTheme['ui-resizable-handle'] : {});
132 -
133 - // increase zIndex of sw, se, ne, nw axis
134 - var applyZIndex = /sw|se|ne|nw/.test(handle) ? { zIndex: ++o.zIndex } : {};
135 -
136 - var defCss = (loadDefault ? insertionsDefault[handle] : ''),
137 - axis = $(['<div class="ui-resizable-handle ', hname, '" style="', defCss, insertionsDefault.handle, '"></div>'].join('')).css( applyZIndex );
138 - o.handles[handle] = '.ui-resizable-'+handle;
139 -
140 - this.element.append(
141 - //Theme detection, if not loaded, load o.defaultTheme
142 - axis.css( loadDefault ? allDefTheme : {} )
143 - // Load the knobHandle css, fix width, height, top, left...
144 - .css( o.knobHandles ? allKnobTheme : {} ).addClass(o.knobHandles ? 'ui-resizable-knob-handle' : '').addClass(o.knobHandles)
145 - );
146 - }
147 -
148 - if (o.knobHandles) this.element.addClass('ui-resizable-knob').css( !$.ui.css('ui-resizable-knob') ? { /*border: '1px #fff dashed'*/ } : {} );
149 - }
150 -
151 - this._renderAxis = function(target) {
152 - target = target || this.element;
153 -
154 - for(var i in o.handles) {
155 - if(o.handles[i].constructor == String)
156 - o.handles[i] = $(o.handles[i], this.element).show();
157 -
158 - if (o.transparent)
159 - o.handles[i].css({opacity:0});
160 -
161 - //Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls)
162 - if (this.element.is('.ui-wrapper') &&
163 - o._nodeName.match(/textarea|input|select|button/i)) {
164 -
165 - var axis = $(o.handles[i], this.element), padWrapper = 0;
166 -
167 - //Checking the correct pad and border
168 - padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();
169 -
170 - //The padding type i have to apply...
171 - var padPos = [ 'padding',
172 - /ne|nw|n/.test(i) ? 'Top' :
173 - /se|sw|s/.test(i) ? 'Bottom' :
174 - /^e$/.test(i) ? 'Right' : 'Left' ].join("");
175 -
176 - if (!o.transparent)
177 - target.css(padPos, padWrapper);
178 -
179 - this._proportionallyResize();
180 - }
181 - if(!$(o.handles[i]).length) continue;
182 - }
183 - };
184 -
185 - this._renderAxis(this.element);
186 - o._handles = $('.ui-resizable-handle', self.element);
187 -
188 - if (o.disableSelection)
189 - o._handles.each(function(i, e) { $.ui.disableSelection(e); });
190 -
191 - //Matching axis name
192 - o._handles.mouseover(function() {
193 - if (!o.resizing) {
194 - if (this.className)
195 - var axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
196 - //Axis, default = se
197 - self.axis = o.axis = axis && axis[1] ? axis[1] : 'se';
198 - }
199 - });
200 -
201 - //If we want to auto hide the elements
202 - if (o.autoHide) {
203 - o._handles.hide();
204 - $(self.element).addClass("ui-resizable-autohide").hover(function() {
205 - $(this).removeClass("ui-resizable-autohide");
206 - o._handles.show();
207 - },
208 - function(){
209 - if (!o.resizing) {
210 - $(this).addClass("ui-resizable-autohide");
211 - o._handles.hide();
212 - }
213 - });
214 - }
215 -
216 - this.mouseInit();
217 - },
218 - plugins: {},
219 - ui: function() {
220 - return {
221 - originalElement: this.originalElement,
222 - element: this.element,
223 - helper: this.helper,
224 - position: this.position,
225 - size: this.size,
226 - options: this.options,
227 - originalSize: this.originalSize,
228 - originalPosition: this.originalPosition
229 - };
230 - },
231 - propagate: function(n,e) {
232 - $.ui.plugin.call(this, n, [e, this.ui()]);
233 - if (n != "resize") this.element.triggerHandler(["resize", n].join(""), [e, this.ui()], this.options[n]);
234 - },
235 - destroy: function() {
236 - var el = this.element, wrapped = el.children(".ui-resizable").get(0);
237 -
238 - this.mouseDestroy();
239 -
240 - var _destroy = function(exp) {
241 - $(exp).removeClass("ui-resizable ui-resizable-disabled")
242 - .removeData("resizable").unbind(".resizable").find('.ui-resizable-handle').remove();
243 - };
244 -
245 - _destroy(el);
246 -
247 - if (el.is('.ui-wrapper') && wrapped) {
248 - el.parent().append(
249 - $(wrapped).css({
250 - position: el.css('position'),
251 - width: el.outerWidth(),
252 - height: el.outerHeight(),
253 - top: el.css('top'),
254 - left: el.css('left')
255 - })
256 - ).end().remove();
257 -
258 - _destroy(wrapped);
259 - }
260 - },
261 - mouseStart: function(e) {
262 - if(this.options.disabled) return false;
263 -
264 - var handle = false;
265 - for(var i in this.options.handles) {
266 - if($(this.options.handles[i])[0] == e.target) handle = true;
267 - }
268 - if (!handle) return false;
269 -
270 - var o = this.options, iniPos = this.element.position(), el = this.element,
271 - num = function(v) { return parseInt(v, 10) || 0; }, ie6 = $.browser.msie && $.browser.version < 7;
272 - o.resizing = true;
273 - o.documentScroll = { top: $(document).scrollTop(), left: $(document).scrollLeft() };
274 -
275 - // bugfix #1749
276 - if (el.is('.ui-draggable') || (/absolute/).test(el.css('position'))) {
277 -
278 - // sOffset decides if document scrollOffset will be added to the top/left of the resizable element
279 - var sOffset = $.browser.msie && !o.containment && (/absolute/).test(el.css('position')) && !(/relative/).test(el.parent().css('position'));
280 - var dscrollt = sOffset ? o.documentScroll.top : 0, dscrolll = sOffset ? o.documentScroll.left : 0;
281 -
282 - el.css({ position: 'absolute', top: (iniPos.top + dscrollt), left: (iniPos.left + dscrolll) });
283 - }
284 -
285 - //Opera fixing relative position
286 - if ($.browser.opera && /relative/.test(el.css('position')))
287 - el.css({ position: 'relative', top: 'auto', left: 'auto' });
288 -
289 - this._renderProxy();
290 -
291 - var curleft = num(this.helper.css('left')), curtop = num(this.helper.css('top'));
292 -
293 - if (o.containment) {
294 - curleft += $(o.containment).scrollLeft()||0;
295 - curtop += $(o.containment).scrollTop()||0;
296 - }
297 -
298 - //Store needed variables
299 - this.offset = this.helper.offset();
300 - this.position = { left: curleft, top: curtop };
301 - this.size = o.helper || ie6 ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
302 - this.originalSize = o.helper || ie6 ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
303 - this.originalPosition = { left: curleft, top: curtop };
304 - this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() };
305 - this.originalMousePosition = { left: e.pageX, top: e.pageY };
306 -
307 - //Aspect Ratio
308 - o.aspectRatio = (typeof o.aspectRatio == 'number') ? o.aspectRatio : ((this.originalSize.height / this.originalSize.width)||1);
309 -
310 - if (o.preserveCursor)
311 - $('body').css('cursor', this.axis + '-resize');
312 -
313 - this.propagate("start", e);
314 - return true;
315 - },
316 - mouseDrag: function(e) {
317 -
318 - //Increase performance, avoid regex
319 - var el = this.helper, o = this.options, props = {},
320 - self = this, smp = this.originalMousePosition, a = this.axis;
321 -
322 - var dx = (e.pageX-smp.left)||0, dy = (e.pageY-smp.top)||0;
323 - var trigger = this._change[a];
324 - if (!trigger) return false;
325 -
326 - // Calculate the attrs that will be change
327 - var data = trigger.apply(this, [e, dx, dy]), ie6 = $.browser.msie && $.browser.version < 7, csdif = this.sizeDiff;
328 -
329 - if (o._aspectRatio || e.shiftKey)
330 - data = this._updateRatio(data, e);
331 -
332 - data = this._respectSize(data, e);
333 -
334 - // plugins callbacks need to be called first
335 - this.propagate("resize", e);
336 -
337 - el.css({
338 - top: this.position.top + "px", left: this.position.left + "px",
339 - width: this.size.width + "px", height: this.size.height + "px"
340 - });
341 -
342 - if (!o.helper && o.proportionallyResize)
343 - this._proportionallyResize();
344 -
345 - this._updateCache(data);
346 -
347 - // calling the user callback at the end
348 - this.element.triggerHandler("resize", [e, this.ui()], this.options["resize"]);
349 -
350 - return false;
351 - },
352 - mouseStop: function(e) {
353 -
354 - this.options.resizing = false;
355 - var o = this.options, num = function(v) { return parseInt(v, 10) || 0; }, self = this;
356 -
357 - if(o.helper) {
358 - var pr = o.proportionallyResize, ista = pr && (/textarea/i).test(pr.get(0).nodeName),
359 - soffseth = ista && $.ui.hasScroll(pr.get(0), 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
360 - soffsetw = ista ? 0 : self.sizeDiff.width;
361 -
362 - var s = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) },
363 - left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,
364 - top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;
365 -
366 - if (!o.animate)
367 - this.element.css($.extend(s, { top: top, left: left }));
368 -
369 - if (o.helper && !o.animate) this._proportionallyResize();
370 - }
371 -
372 - if (o.preserveCursor)
373 - $('body').css('cursor', 'auto');
374 -
375 - this.propagate("stop", e);
376 -
377 - if (o.helper) this.helper.remove();
378 -
379 - return false;
380 - },
381 - _updateCache: function(data) {
382 - var o = this.options;
383 - this.offset = this.helper.offset();
384 - if (data.left) this.position.left = data.left;
385 - if (data.top) this.position.top = data.top;
386 - if (data.height) this.size.height = data.height;
387 - if (data.width) this.size.width = data.width;
388 - },
389 - _updateRatio: function(data, e) {
390 - var o = this.options, cpos = this.position, csize = this.size, a = this.axis;
391 -
392 - if (data.height) data.width = (csize.height / o.aspectRatio);
393 - else if (data.width) data.height = (csize.width * o.aspectRatio);
394 -
395 - if (a == 'sw') {
396 - data.left = cpos.left + (csize.width - data.width);
397 - data.top = null;
398 - }
399 - if (a == 'nw') {
400 - data.top = cpos.top + (csize.height - data.height);
401 - data.left = cpos.left + (csize.width - data.width);
402 - }
403 -
404 - return data;
405 - },
406 - _respectSize: function(data, e) {
407 -
408 - var el = this.helper, o = this.options, pRatio = o._aspectRatio || e.shiftKey, a = this.axis,
409 - ismaxw = data.width && o.maxWidth && o.maxWidth < data.width, ismaxh = data.height && o.maxHeight && o.maxHeight < data.height,
410 - isminw = data.width && o.minWidth && o.minWidth > data.width, isminh = data.height && o.minHeight && o.minHeight > data.height;
411 -
412 - if (isminw) data.width = o.minWidth;
413 - if (isminh) data.height = o.minHeight;
414 - if (ismaxw) data.width = o.maxWidth;
415 - if (ismaxh) data.height = o.maxHeight;
416 -
417 - var dw = this.originalPosition.left + this.originalSize.width, dh = this.position.top + this.size.height;
418 - var cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
419 -
420 - if (isminw && cw) data.left = dw - o.minWidth;
421 - if (ismaxw && cw) data.left = dw - o.maxWidth;
422 - if (isminh && ch) data.top = dh - o.minHeight;
423 - if (ismaxh && ch) data.top = dh - o.maxHeight;
424 -
425 - // fixing jump error on top/left - bug #2330
426 - var isNotwh = !data.width && !data.height;
427 - if (isNotwh && !data.left && data.top) data.top = null;
428 - else if (isNotwh && !data.top && data.left) data.left = null;
429 -
430 - return data;
431 - },
432 - _proportionallyResize: function() {
433 - var o = this.options;
434 - if (!o.proportionallyResize) return;
435 - var prel = o.proportionallyResize, el = this.helper || this.element;
436 -
437 - if (!o.borderDif) {
438 - var b = [prel.css('borderTopWidth'), prel.css('borderRightWidth'), prel.css('borderBottomWidth'), prel.css('borderLeftWidth')],
439 - p = [prel.css('paddingTop'), prel.css('paddingRight'), prel.css('paddingBottom'), prel.css('paddingLeft')];
440 -
441 - o.borderDif = $.map(b, function(v, i) {
442 - var border = parseInt(v,10)||0, padding = parseInt(p[i],10)||0;
443 - return border + padding;
444 - });
445 - }
446 - prel.css({
447 - height: (el.height() - o.borderDif[0] - o.borderDif[2]) + "px",
448 - width: (el.width() - o.borderDif[1] - o.borderDif[3]) + "px"
449 - });
450 - },
451 - _renderProxy: function() {
452 - var el = this.element, o = this.options;
453 - this.elementOffset = el.offset();
454 -
455 - if(o.helper) {
456 - this.helper = this.helper || $('<div style="overflow:hidden;"></div>');
457 -
458 - // fix ie6 offset
459 - var ie6 = $.browser.msie && $.browser.version < 7, ie6offset = (ie6 ? 1 : 0),
460 - pxyoffset = ( ie6 ? 2 : -1 );
461 -
462 - this.helper.addClass(o.helper).css({
463 - width: el.outerWidth() + pxyoffset,
464 - height: el.outerHeight() + pxyoffset,
465 - position: 'absolute',
466 - left: this.elementOffset.left - ie6offset +'px',
467 - top: this.elementOffset.top - ie6offset +'px',
468 - zIndex: ++o.zIndex
469 - });
470 -
471 - this.helper.appendTo("body");
472 -
473 - if (o.disableSelection)
474 - $.ui.disableSelection(this.helper.get(0));
475 -
476 - } else {
477 - this.helper = el;
478 - }
479 - },
480 - _change: {
481 - e: function(e, dx, dy) {
482 - return { width: this.originalSize.width + dx };
483 - },
484 - w: function(e, dx, dy) {
485 - var o = this.options, cs = this.originalSize, sp = this.originalPosition;
486 - return { left: sp.left + dx, width: cs.width - dx };
487 - },
488 - n: function(e, dx, dy) {
489 - var o = this.options, cs = this.originalSize, sp = this.originalPosition;
490 - return { top: sp.top + dy, height: cs.height - dy };
491 - },
492 - s: function(e, dx, dy) {
493 - return { height: this.originalSize.height + dy };
494 - },
495 - se: function(e, dx, dy) {
496 - return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [e, dx, dy]));
497 - },
498 - sw: function(e, dx, dy) {
499 - return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [e, dx, dy]));
500 - },
501 - ne: function(e, dx, dy) {
502 - return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [e, dx, dy]));
503 - },
504 - nw: function(e, dx, dy) {
505 - return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [e, dx, dy]));
506 - }
507 - }
508 -}));
509 -
510 -$.extend($.ui.resizable, {
511 - defaults: {
512 - cancel: ":input",
513 - distance: 1,
514 - delay: 0,
515 - preventDefault: true,
516 - transparent: false,
517 - minWidth: 10,
518 - minHeight: 10,
519 - aspectRatio: false,
520 - disableSelection: true,
521 - preserveCursor: true,
522 - autoHide: false,
523 - knobHandles: false
524 - }
525 -});
526 -
527 -/*
528 - * Resizable Extensions
529 - */
530 -
531 -$.ui.plugin.add("resizable", "containment", {
532 -
533 - start: function(e, ui) {
534 - var o = ui.options, self = $(this).data("resizable"), el = self.element;
535 - var oc = o.containment, ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;
536 - if (!ce) return;
537 -
538 - self.containerElement = $(ce);
539 -
540 - if (/document/.test(oc) || oc == document) {
541 - self.containerOffset = { left: 0, top: 0 };
542 - self.containerPosition = { left: 0, top: 0 };
543 -
544 - self.parentData = {
545 - element: $(document), left: 0, top: 0,
546 - width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight
547 - };
548 - }
549 -
550 -
551 - // i'm a node, so compute top, left, right, bottom
552 - else{
553 - self.containerOffset = $(ce).offset();
554 - self.containerPosition = $(ce).position();
555 - self.containerSize = { height: $(ce).innerHeight(), width: $(ce).innerWidth() };
556 -
557 - var co = self.containerOffset, ch = self.containerSize.height, cw = self.containerSize.width,
558 - width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw ), height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);
559 -
560 - self.parentData = {
561 - element: ce, left: co.left, top: co.top, width: width, height: height
562 - };
563 - }
564 - },
565 -
566 - resize: function(e, ui) {
567 - var o = ui.options, self = $(this).data("resizable"),
568 - ps = self.containerSize, co = self.containerOffset, cs = self.size, cp = self.position,
569 - pRatio = o._aspectRatio || e.shiftKey, cop = { top:0, left:0 }, ce = self.containerElement;
570 -
571 - if (ce[0] != document && /static/.test(ce.css('position')))
572 - cop = self.containerPosition;
573 -
574 - if (cp.left < (o.helper ? co.left : cop.left)) {
575 - self.size.width = self.size.width + (o.helper ? (self.position.left - co.left) : (self.position.left - cop.left));
576 - if (pRatio) self.size.height = self.size.width * o.aspectRatio;
577 - self.position.left = o.helper ? co.left : cop.left;
578 - }
579 -
580 - if (cp.top < (o.helper ? co.top : 0)) {
581 - self.size.height = self.size.height + (o.helper ? (self.position.top - co.top) : self.position.top);
582 - if (pRatio) self.size.width = self.size.height / o.aspectRatio;
583 - self.position.top = o.helper ? co.top : 0;
584 - }
585 -
586 - var woset = (o.helper ? self.offset.left - co.left : (self.position.left - cop.left)) + self.sizeDiff.width,
587 - hoset = (o.helper ? self.offset.top - co.top : self.position.top) + self.sizeDiff.height;
588 -
589 - if (woset + self.size.width >= self.parentData.width) {
590 - self.size.width = self.parentData.width - woset;
591 - if (pRatio) self.size.height = self.size.width * o.aspectRatio;
592 - }
593 -
594 - if (hoset + self.size.height >= self.parentData.height) {
595 - self.size.height = self.parentData.height - hoset;
596 - if (pRatio) self.size.width = self.size.height / o.aspectRatio;
597 - }
598 - },
599 -
600 - stop: function(e, ui){
601 - var o = ui.options, self = $(this).data("resizable"), cp = self.position,
602 - co = self.containerOffset, cop = self.containerPosition, ce = self.containerElement;
603 -
604 - var helper = $(self.helper), ho = helper.offset(), w = helper.innerWidth(), h = helper.innerHeight();
605 -
606 -
607 - if (o.helper && !o.animate && /relative/.test(ce.css('position')))
608 - $(this).css({ left: (ho.left - co.left), top: (ho.top - co.top), width: w, height: h });
609 -
610 - if (o.helper && !o.animate && /static/.test(ce.css('position')))
611 - $(this).css({ left: cop.left + (ho.left - co.left), top: cop.top + (ho.top - co.top), width: w, height: h });
612 -
613 - }
614 -});
615 -
616 -$.ui.plugin.add("resizable", "grid", {
617 -
618 - resize: function(e, ui) {
619 - var o = ui.options, self = $(this).data("resizable"), cs = self.size, os = self.originalSize, op = self.originalPosition, a = self.axis, ratio = o._aspectRatio || e.shiftKey;
620 - o.grid = typeof o.grid == "number" ? [o.grid, o.grid] : o.grid;
621 - var ox = Math.round((cs.width - os.width) / (o.grid[0]||1)) * (o.grid[0]||1), oy = Math.round((cs.height - os.height) / (o.grid[1]||1)) * (o.grid[1]||1);
622 -
623 - if (/^(se|s|e)$/.test(a)) {
624 - self.size.width = os.width + ox;
625 - self.size.height = os.height + oy;
626 - }
627 - else if (/^(ne)$/.test(a)) {
628 - self.size.width = os.width + ox;
629 - self.size.height = os.height + oy;
630 - self.position.top = op.top - oy;
631 - }
632 - else if (/^(sw)$/.test(a)) {
633 - self.size.width = os.width + ox;
634 - self.size.height = os.height + oy;
635 - self.position.left = op.left - ox;
636 - }
637 - else {
638 - self.size.width = os.width + ox;
639 - self.size.height = os.height + oy;
640 - self.position.top = op.top - oy;
641 - self.position.left = op.left - ox;
642 - }
643 - }
644 -
645 -});
646 -
647 -$.ui.plugin.add("resizable", "animate", {
648 -
649 - stop: function(e, ui) {
650 - var o = ui.options, self = $(this).data("resizable");
651 -
652 - var pr = o.proportionallyResize, ista = pr && (/textarea/i).test(pr.get(0).nodeName),
653 - soffseth = ista && $.ui.hasScroll(pr.get(0), 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
654 - soffsetw = ista ? 0 : self.sizeDiff.width;
655 -
656 - var style = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) },
657 - left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,
658 - top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;
659 -
660 - self.element.animate(
661 - $.extend(style, top && left ? { top: top, left: left } : {}), {
662 - duration: o.animateDuration || "slow", easing: o.animateEasing || "swing",
663 - step: function() {
664 -
665 - var data = {
666 - width: parseInt(self.element.css('width'), 10),
667 - height: parseInt(self.element.css('height'), 10),
668 - top: parseInt(self.element.css('top'), 10),
669 - left: parseInt(self.element.css('left'), 10)
670 - };
671 -
672 - if (pr) pr.css({ width: data.width, height: data.height });
673 -
674 - // propagating resize, and updating values for each animation step
675 - self._updateCache(data);
676 - self.propagate("animate", e);
677 -
678 - }
679 - }
680 - );
681 - }
682 -
683 -});
684 -
685 -$.ui.plugin.add("resizable", "ghost", {
686 -
687 - start: function(e, ui) {
688 - var o = ui.options, self = $(this).data("resizable"), pr = o.proportionallyResize, cs = self.size;
689 -
690 - if (!pr) self.ghost = self.element.clone();
691 - else self.ghost = pr.clone();
692 -
693 - self.ghost.css(
694 - { opacity: .25, display: 'block', position: 'relative', height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 }
695 - )
696 - .addClass('ui-resizable-ghost').addClass(typeof o.ghost == 'string' ? o.ghost : '');
697 -
698 - self.ghost.appendTo(self.helper);
699 -
700 - },
701 -
702 - resize: function(e, ui){
703 - var o = ui.options, self = $(this).data("resizable"), pr = o.proportionallyResize;
704 -
705 - if (self.ghost) self.ghost.css({ position: 'relative', height: self.size.height, width: self.size.width });
706 -
707 - },
708 -
709 - stop: function(e, ui){
710 - var o = ui.options, self = $(this).data("resizable"), pr = o.proportionallyResize;
711 - if (self.ghost && self.helper) self.helper.get(0).removeChild(self.ghost.get(0));
712 - }
713 -
714 -});
715 -
716 -$.ui.plugin.add("resizable", "alsoResize", {
717 -
718 - start: function(e, ui) {
719 - var o = ui.options, self = $(this).data("resizable"),
720 -
721 - _store = function(exp) {
722 - $(exp).each(function() {
723 - $(this).data("resizable-alsoresize", {
724 - width: parseInt($(this).width(), 10), height: parseInt($(this).height(), 10),
725 - left: parseInt($(this).css('left'), 10), top: parseInt($(this).css('top'), 10)
726 - });
727 - });
728 - };
729 -
730 - if (typeof(o.alsoResize) == 'object') {
731 - if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }
732 - else { $.each(o.alsoResize, function(exp, c) { _store(exp); }); }
733 - }else{
734 - _store(o.alsoResize);
735 - }
736 - },
737 -
738 - resize: function(e, ui){
739 - var o = ui.options, self = $(this).data("resizable"), os = self.originalSize, op = self.originalPosition;
740 -
741 - var delta = {
742 - height: (self.size.height - os.height) || 0, width: (self.size.width - os.width) || 0,
743 - top: (self.position.top - op.top) || 0, left: (self.position.left - op.left) || 0
744 - },
745 -
746 - _alsoResize = function(exp, c) {
747 - $(exp).each(function() {
748 - var start = $(this).data("resizable-alsoresize"), style = {}, css = c && c.length ? c : ['width', 'height', 'top', 'left'];
749 -
750 - $.each(css || ['width', 'height', 'top', 'left'], function(i, prop) {
751 - var sum = (start[prop]||0) + (delta[prop]||0);
752 - if (sum && sum >= 0)
753 - style[prop] = sum || null;
754 - });
755 - $(this).css(style);
756 - });
757 - };
758 -
759 - if (typeof(o.alsoResize) == 'object') {
760 - $.each(o.alsoResize, function(exp, c) { _alsoResize(exp, c); });
761 - }else{
762 - _alsoResize(o.alsoResize);
763 - }
764 - },
765 -
766 - stop: function(e, ui){
767 - $(this).removeData("resizable-alsoresize-start");
768 - }
769 -});
770 -
771 -})(jQuery);
Index: trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_flashEmbed.js
@@ -191,8 +191,7 @@
192192
193193 //flash is giving bogus duration get from "this" (if available)
194194 if(!this.media_element.selected_source.end_ntp && this.fla.getDuration()>0)
195 - this.media_element.selected_source.setDuration(this.fla.getDuration());
196 -
 195+ this.media_element.selected_source.setDuration(this.fla.getDuration());
197196
198197 if(!this.userSlide){
199198 if((this.currentTime - ntp2seconds(start_ntp))<0){
Index: trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_htmlEmbed.js
@@ -17,7 +17,9 @@
1818 'overlays':true,
1919 'playlist_swap_loader':true //if the object supports playlist functions
2020 },
 21+ ready_to_play:true,
2122 pauseTime:0,
 23+ currentTime:0,
2224 start_offset:0,
2325 monitorTimerId:false,
2426 play:function(){
@@ -63,7 +65,7 @@
6466 media_element:{
6567 autoSelectSource:function(){
6668 return true;
67 - },
 69+ },
6870 selectedPlayer:{
6971 library:"html"
7072 },
@@ -74,15 +76,53 @@
7577 inheritEmbedObj:function(){
7678 return true;
7779 },
 80+ renderTimelineThumbnail:function( options ){
 81+ //generate a scaled down version _that_ we can clone if nessesary
 82+ //add a not vissable container to the body:
 83+ if($j('#'+this.id+'_thumb_render').length == 0){
 84+ //set the font scale down percentage: (kind of arbitrary)
 85+ var scale_perc = options.width / $j(this).width();
 86+ var font_perc = Math.round( scale_perc*400 ); //fonts don't scale uniformly arbitrary adjust perc
 87+ $j('body').append( '<div id="' + this.id +'_thumb_render" style="display:none">'+
 88+ '<div style="display:block;'+
 89+ 'width:'+options.width+'px;height:'+options.height+'px;overflow:hidden;" >'+
 90+ this.getThumbnailHTML() +
 91+ '</div>'+
 92+ '</div>'
 93+ );
 94+ //scale down the font:
 95+ $j('#'+this.id+'_thumb_render *').filter('span,div,p,h,h1,h2,h3,h4,h5,h6').css('font-size',font_perc+'%')
 96+ //replace links:
 97+ //$j('#'+this.id+'_thumb_render a').each(function(){
 98+ // $j(this).replaceWith("<span>" + $j(this).text() + "</span>");
 99+ //});
 100+
 101+ //scale images that have width or height:
 102+ $j('#'+this.id+'_thumb_render img').filter('[width]').each(function(){
 103+ $j(this).attr({
 104+ 'width':$j(this).attr('width') * scale_perc,
 105+ 'height':$j(this).attr('height') * scale_perc
 106+ }
 107+ );
 108+ });
 109+ }
 110+ return $j('#'+this.id+'_thumb_render').html();
 111+ },
78112 //nothing to update in static html display: (return a static representation)
79113 //@@todo render out a mini text "preview"
80 - pdateThumbTime:function( float_time ){
 114+ updateThumbTime:function( float_time ){
81115 return ;
82116 },
83117 getEmbedHTML:function(){
 118+ js_log('f:html:getEmbedHTML');
84119 //set up the css for our parent div:
85120 $j(this).css({'width':this.pc.pp.width, 'height':this.pc.pp.height, 'overflow':"hidden"});
86121 //@@todo support more smil image layout stuff:
 122+
 123+ //wrap output in videoPlayer_ div:
 124+ $j(this).html('<div id="videoPlayer_'+ this.id+'">'+this.getThumbnailHTML()+'</div>');
 125+ },
 126+ getThumbnailHTML:function(){
87127 var out='';
88128 if( this.pc.type =='image/jpeg'){
89129 js_log('should put src: '+this.pc.src);
@@ -90,8 +130,7 @@
91131 }else{
92132 out = this.pc.wholeText;
93133 }
94 - //wrap output in videoPlayer_ div:
95 - $j(this).html('<div id="videoPlayer_'+ this.id+'">'+out+'</div>');
 134+ return out;
96135 },
97136 doThumbnailHTML:function(){
98137 js_log('f:htmlEmbed:doThumbnailHTML');
@@ -110,11 +149,12 @@
111150 //no dur use default:
112151 return pcHtmlEmbedDefaults.dur;
113152 },
114 - //gives a chance to make any nesseary external requests
 153+ //gives a chance to make any neseary external requests
115154 //@@todo we can "start loading images" if we want
116155 on_dom_swap:function(){
117156 this.loading_external_data=false
118 - this.ready_to_play=true;
119 - return ;
 157+ this.ready_to_play=true;
 158+ debugger;
 159+ return ;
120160 }
121161 }
\ No newline at end of file
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js
@@ -249,8 +249,7 @@
250250 /*
251251 * should be cleaned up ... the embedType loading should be part of load_libs above:
252252 */
253 - check_init_done:function(){
254 - js_log('f:check_init_done');
 253+ check_init_done:function(){
255254 //check if all videos are "ready to play"
256255 var is_ready=true;
257256 for(var i in global_player_list){
@@ -261,7 +260,8 @@
262261 $j(cur_vid).html( cur_vid.load_error );
263262 }
264263 }
265 - if(!is_ready){
 264+ js_log('f:check_init_done '+ is_ready + ' ' + cur_vid.load_error + ' rtp: '+ cur_vid.ready_to_play);
 265+ if( !is_ready ){
266266 //js_log('some ' + global_player_list + ' not ready');
267267 setTimeout( 'mvEmbed.check_init_done()', 250 );
268268 }else{
@@ -326,7 +326,7 @@
327327 this.loading_callbacks.push(callback);
328328
329329 js_log('plugin not loaded, queing callback');
330 - js_log('requesting plugin: ' + plugin_path);
 330+ js_log('requesting plugin: ' + plugin_path + ' should define lib:' + this.library+'Embed');
331331
332332 /*$j.getScript(plugin_path, function(){
333333 js_log(_this.id + ' plugin loaded');
@@ -693,8 +693,6 @@
694694 }
695695 }
696696
697 -
698 -
699697 js_log("mv embed path:"+ mv_embed_path);
700698 /*
701699 * embedTypes object handles setting and getting of supported embed types:
@@ -883,7 +881,7 @@
884882 }
885883 if(loading){
886884 if( this.load_time++ > 2000){ //time out after ~50seconds
887 - js_error( getMsg('error_load_lib') );
 885+ js_error( getMsg('error_load_lib') + cur_path);
888886 }else{
889887 setTimeout('mvJsLoader.doLoad()',25);
890888 }
@@ -1049,7 +1047,10 @@
10501048 mvJsLoader.doLoad({
10511049 'mvPlayList':'mv_playlist.js',
10521050 '$j.ui.sortable':'jquery/jquery.ui-1.5.2/ui/minified/ui.sortable.min.js',
1053 - '$j.ui.resizable':'jquery/jquery.ui-1.5.2/ui/minified/ui.resizable.min.js'
 1051+ '$j.ui.resizable':'jquery/jquery.ui-1.5.2/ui/minified/ui.resizable.min.js',
 1052+ //'$j.ui' :'jquery/jquery.ui-1.5.2/ui/minified/ui.core.min.js',
 1053+ //'$j.effects':'jquery/jquery.ui-1.5.2/ui/minified/effects.core.min.js',
 1054+ //'$j.effects.puff':'jquery/jquery.ui-1.5.2/ui/minified/effects.scale.min.js'
10541055 //'$j.ui.sortable':'jquery/plugins/ui.sortable.js'
10551056 },function(){
10561057 //load the sequencer and draggable ext
@@ -1931,7 +1932,7 @@
19321933 this.media_element = new mediaElement(element);
19331934 },
19341935 on_dom_swap: function(){
1935 - js_log('f:on_dom_swap');
 1936+ js_log('f:on_dom_swap');
19361937 // Process the provided ROE file... if we don't yet have sources
19371938 if(this.roe && this.media_element.sources.length==0 ){
19381939 js_log('loading external data');
@@ -1941,18 +1942,20 @@
19421943 {
19431944 //continue
19441945 _this.media_element.addROE(data);
1945 - js_log('added_roe::' + _this.media_element.sources);
1946 - js_log('done loading ROE '+_this.thumbnail_disp )
1947 - _this.init_with_sources_loaded();
 1946+ js_log('added_roe::' + _this.media_element.sources.length);
 1947+
19481948 js_log('set loading_external_data=false');
19491949 _this.loading_external_data=false;
 1950+
 1951+ _this.init_with_sources_loaded();
19501952 });
19511953 }
19521954 },
19531955 init_with_sources_loaded : function()
19541956 {
1955 - js_log('f:init_with_sources_loaded');
1956 -
 1957+ js_log('f:init_with_sources_loaded');
 1958+ //set flag that we have run this function:
 1959+ this.init_with_sources_loadedDone=true;
19571960 //autoseletct the source
19581961 this.media_element.autoSelectSource();
19591962 //auto select player based on prefrence or default order
@@ -1964,27 +1967,30 @@
19651968 //do load player if just displaying innerHTML:
19661969 if(this.pc.type =='text/html'){
19671970 this.selected_player = embedTypes.players.defaultPlayer( 'text/html' );
1968 - js_log('set selected player:'+ this.selected_player);
 1971+ js_log('set selected player:'+ this.selected_player.mime_type);
19691972 }
19701973 }
19711974 }else{
19721975 this.selected_player = embedTypes.players.defaultPlayer( this.media_element.selected_source.mime_type );
1973 - }
1974 -
 1976+ }
19751977 if(this.selected_player){
19761978 js_log('selected ' + this.selected_player.getName());
19771979 js_log("PLAYBACK TYPE: "+this.selected_player.library);
19781980 this.thumbnail_disp = true;
19791981 this.inheritEmbedObj();
1980 - this.init_with_sources_loadedDone=true;
19811982 }else{
1982 - //select first source as not playable
1983 - var missing_type =this.media_element.sources[0].mime_type;
 1983+ //no source's playable
 1984+ var missing_type ='';
 1985+ var or ='';
 1986+ for( var i in this.media_element.sources){
 1987+ missing_type+=or + this.media_element.sources[i].mime_type;
 1988+ or=' or ';
 1989+ }
19841990 if( this.pc )
19851991 var missing_type = this.pc.type;
19861992
19871993 js_log('no player found for given source type ' + missing_type);
1988 - this.load_error= getMsg('generic_missing_plugin', missing_type );
 1994+ this.load_error= getMsg('generic_missing_plugin', missing_type );
19891995 }
19901996 },
19911997 inheritEmbedObj:function(){
@@ -2421,22 +2427,31 @@
24222428 updateVideoSrc : function(src){
24232429 js_log("UPDATE SRC:"+src);
24242430 this.src = src;
2425 - },
 2431+ },
 2432+ //@@todo overwite by embed library if we can render frames natavily
 2433+ renderTimelineThumbnail:function( options ){
 2434+ var my_thumb_src = this.media_element.getThumbnailURL();
 2435+
 2436+ if( my_thumb_src.indexOf('t=') !== -1){
 2437+ var time_ntp = seconds2ntp ( options.time + parseInt(this.start_offset) );
 2438+ my_thumb_src = getUpdateTimeURL( org_thum_src, time_ntp, options.size );
 2439+ }
 2440+ return '<img src="' + my_thumb_src +'" '+
 2441+ 'style="height:' + options.height + 'px;' +
 2442+ 'width:' + options.width + 'px" >';
 2443+ },
24262444 updateThumbTime:function( float_sec ){
24272445 var _this = this;
24282446 if( typeof org_thum_src=='undefined' ){
24292447 org_thum_src = this.media_element.getThumbnailURL();
24302448 }
2431 - var thumb_at_perc_src =org_thum_src;
24322449 if( org_thum_src.indexOf('t=') !== -1){
24332450 this.last_thumb_url = getUpdateTimeURL(org_thum_src,seconds2ntp( float_sec + parseInt(this.start_offset)));
24342451 if(!this.thumbnail_updating){
24352452 this.updateThumbnail(this.last_thumb_url ,false);
2436 - thumb_at_perc_src = this.last_thumb_url;
24372453 this.last_thumb_url =null;
24382454 }
24392455 }
2440 - return thumb_at_perc_src;
24412456 },
24422457 //for now provide a src url .. but need to figure out how to copy frames from video for plug-in based thumbs
24432458 updateThumbPerc:function( perc ){
@@ -2935,15 +2950,22 @@
29362951 /*
29372952 * utility functions:
29382953 */
2939 -function getUpdateTimeURL(url, new_time){
 2954+//simple url re-writer for standard temporal and size request urls:
 2955+function getUpdateTimeURL(url, new_time, size){
29402956 pSrc =parseUri(url);
29412957 var new_url = pSrc.protocol +'://'+ pSrc.host + pSrc.path +'?';
29422958 var amp = '';
2943 - for(i in pSrc.queryKey){
2944 - new_url +=(i=='t')? amp + 't=' + new_time:
2945 - amp+i+'='+ pSrc.queryKey[i];
 2959+
 2960+ if(new_time && pSrc.queryKey['t'])
 2961+ pSrc.queryKey['t'] = new_time;
 2962+
 2963+ if(size && pSrc.queryKey['size'])
 2964+ pSrc.queryKey['size']=size;
 2965+
 2966+ for(var i in pSrc.queryKey){
 2967+ new_url+= amp+i+'='+ pSrc.queryKey[i];
29462968 amp = '&';
2947 - }
 2969+ }
29482970 return new_url;
29492971 }
29502972 function seconds2ntp(sec){
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_sequencer.js
@@ -18,7 +18,7 @@
1919 */
2020
2121 gMsg['menu_welcome']='Welcome';
22 -gMsg['menu_cliplib']='Clip Library';
 22+gMsg['menu_cliplib']='Resource Locator';
2323 gMsg['menu_transition']='Transitions';
2424 gMsg['menu_soundtrack']='Soundtrack';
2525
@@ -47,9 +47,8 @@
4848 timeline_id:'mv_timeline',
4949 plObj_id:'seq_plobj',
5050 plObj_clone:null,
51 -
52 - track_timeline_format:'boxes', //boxes (imovie like) or timeline ( finalCut like)
5351
 52+
5453 timeline_scale:.25, //in pixel to second ratio ie 100pixles for every ~30seconds
5554 timeline_duration:500, //default timeline length in seconds
5655 playline_time:0,
@@ -57,7 +56,9 @@
5857 track_text_height:20,
5958 //possible options:block rendering?
6059 // note some options will be lost in block rendering mode (like cutting clips etc)
61 - timeline_mode:'time',
 60+
 61+ timeline_mode:'time', //clip (imovie like) or timeline (finalCut like)
 62+
6263 //Msg are all the language specific values ...
6364 // (@@todo overwrite by msg values preloaded in the page)
6465 //tack/clips can be pushed via json or inline playlist format
@@ -93,77 +94,59 @@
9495 return js_log('Error: no sequence_container_id');
9596
9697 //check for sequence_container
97 - if(this.sequence_container_id!='null'){
 98+ if(this.sequence_container_id=='null')
 99+ return js_log("Error: missing sequence_container_id");
98100
99 - //$j('#'+this.sequence_container_id).css('position', 'relative');
100 - this['base_width']=$j('#'+this.sequence_container_id).width();
101 - this['base_height']=$j('#'+this.sequence_container_id).height();
 101+ //$j('#'+this.sequence_container_id).css('position', 'relative');
 102+ this['base_width']=$j('#'+this.sequence_container_id).width();
 103+ this['base_height']=$j('#'+this.sequence_container_id).height();
 104+
 105+ /*
 106+ var vid_width = (Math.round(this['base_width']*.5)>320)?
 107+ Math.round(this['base_width']*.5):320;
 108+ var vid_height = Math.round(vid_width*.75)+30;
 109+ */
 110+ //var vid_width=320;
 111+ //var vid_height=240+30;
 112+
 113+
 114+ //add the container divs (with basic layout ~universal~
 115+ $j('#'+this.sequence_container_id).html(''+
 116+ '<div id="'+this.video_container_id+'" style="position:absolute;right:0px;top:0px;' +
 117+ 'width:'+this.video_width+'px;height:'+this.video_height+'px;border:solid thin blue;background:#FFF;font-color:black;"/>'+
 118+ '<div id="'+this.sequence_tools_id+'" style="position:absolute;' +
 119+ 'left:0px;right:'+(this.video_width+10)+'px;top:0px;height:'+this.video_height+'px;border:solid thin black;"/>'+
 120+ '<div id="'+this.timeline_id+'" style="position:absolute;' +
 121+ 'left:0px;right:0px;top:'+(this.video_height+10)+'px;bottom:0px;border:solid thin red;"/>');
 122+
 123+ js_log('set: '+this.sequence_container_id + ' html to:'+ "\n"+
 124+ $j('#'+this.sequence_container_id).html()
 125+ );
 126+ //add some sample tool content: (not translated since sequence_tools_id is generally overwritten
 127+ //set the default display item to 1:
 128+ var menu_items = {
 129+ 'welcome':1,
 130+ 'cliplib':0,
 131+ 'transition':0,
 132+ 'soundtrack':0
 133+ };
 134+ var menu_html = '<ul style="list-style-type:none;list-style-position:outside;display:block;">';
 135+ var item_container ='';
 136+ for(var i in menu_items){
 137+ menu_html+='<li style="display:inline;padding:10px;"><a style="color:#fff" href="javascript:'+this.instance_name+'.disp(\''+i+'\')">'+getMsg('menu_'+i)+'</a></li>';
 138+ var disp_style= (menu_items[i])?'block':'none';
 139+ //item_container+='<div id="'+i+'"
 140+ }
 141+ menu_html+='</ul>';
 142+ var advChecked = (this.timeline_mode=='time')?' checked ':'';
 143+ var simpleChecked = (this.timeline_mode=='clip')?' checked ':'';
 144+ //debugger;
 145+ $j('#'+this.sequence_tools_id).html( menu_html +
102146
103 - /*
104 - var vid_width = (Math.round(this['base_width']*.5)>320)?
105 - Math.round(this['base_width']*.5):320;
106 - var vid_height = Math.round(vid_width*.75)+30;
107 - */
108 - //var vid_width=320;
109 - //var vid_height=240+30;
110 -
111 -
112 - //add the container divs (with basic layout)
113 - $j('#'+this.sequence_container_id).html(''+
114 - '<div id="'+this.video_container_id+'" style="position:absolute;right:0px;top:0px;' +
115 - 'width:'+this.video_width+'px;height:'+this.video_height+'px;border:solid thin blue;background:#FFF;font-color:black;"/>'+
116 - '<div id="'+this.sequence_tools_id+'" style="position:absolute;' +
117 - 'left:0px;right:'+(this.video_width+10)+'px;top:0px;height:'+this.video_height+'px;border:solid thin black;"/>'+
118 - '<div id="'+this.timeline_id+'" style="position:absolute;' +
119 - 'left:0px;right:0px;top:'+(this.video_height+10)+'px;bottom:0px;border:solid thin red;"/>');
120 -
121 - js_log('set: '+this.sequence_container_id + ' html to:'+ "\n"+
122 - $j('#'+this.sequence_container_id).html()
123 - );
124 - //add some sample tool content: (not translated since sequence_tools_id is generally overwritten
125 - var menu_items = {
126 - 'welcome':1,
127 - 'cliplib':1,
128 - 'transition':1,
129 - 'soundtrack':1
130 - };
131 - var menu_html = '<ul style="list-style-type:none;list-style-position:outside;display:block;">';
132 - for(var i in menu_items){
133 - menu_html+='<li style="display:inline;padding:10px;"><a style="color:#fff" href="javascript:'+this.instance_name+'.disp(\''+i+'\')">'+getMsg('menu_'+i)+'</a></li>';
134 - }
135 - menu_html+='</ul>';
136 - $j('#'+this.sequence_tools_id).html( menu_html +
137 - '<div id="seq_tool_disp_'+this.instance_name+'">Welcome to The sequencer demo<br>' +
138 - 'Select your editor preferance:<br> '+
139 - '<blockquote><input type="radio" value="A" name="radio_button">simple editor </blockquote>' +
140 - '<blockquote><input type="radio" value="A" name="radio_button" checked>advanced editor </blockquote>' +
141 - '</div>'
142 - );
143 -
144 - }
145 - //add html content for timeline
146 - $j('#'+this.timeline_id).html(''+
147 - '<div id="'+this.timeline_id+'_left_cnt" class="mv_tl_left_cnt">'+
148 - '<div id="'+this.timeline_id+'_head_control" style="position:absolute;top:0px;left:0px;right:0px;height:30px;">' +
149 - '<a title="'+getMsg('play_clip')+'" href="javascript:'+this.instance_name+'.play_jt()">'+
150 - '<img style="width:16px;height:16px;border:0" src="' + mv_embed_path + 'images/control_play_blue.png">'+
151 - '</a>'+
152 - '<a title="'+getMsg('zoom_in')+'" href="javascript:'+this.instance_name+'.zoom_in()">'+
153 - '<img style="width:16px;height:16px;border:0" src="' + mv_embed_path + 'images/zoom_in.png">'+
154 - '</a>'+
155 - '<a title="'+getMsg('zoom_out')+'" href="javascript:'+this.instance_name+'.zoom_out()">'+
156 - '<img style="width:16px;height:16px;border:0" src="' + mv_embed_path + 'images/zoom_out.png">'+
157 - '</a>'+
158 - '<a title="'+getMsg('cut_clip')+'" href="javascript:'+this.instance_name+'.cut_mode()">'+
159 - '<img style="width:16px;height:16px;border:0" src="' + mv_embed_path + 'images/cut.png">'+
160 - '</a>'+
161 - '</div>' +
162 - '</div>' +
163 - '<div id="'+this.timeline_id+'_tracks" class="mv_seq_tracks">' +
164 - '<div id="'+this.timeline_id+'_head_jump" class="mv_head_jump" style="position:absolute;top:0px;left:0px;height:20px;"></div>'+
165 - '<div id="'+this.timeline_id+'_playline" class="mv_playline"></div>'+
166 - '</div>'
167147 );
 148+
 149+ this.renderTimeLine();
 150+
168151 //add src based pl:
169152 if( this.mv_pl_src != 'null' ) {
170153 js_log( ' pl src:: '+ this.mv_pl_src );
@@ -177,8 +160,57 @@
178161 ' sequencer="true" id="'+this.plObj_id+'" />');
179162
180163 rewrite_by_id( this.plObj_id );
181 - setTimeout(this.instance_name +'.checkReadyPlObj()', 25);
 164+ setTimeout(this.instance_name +'.checkReadyPlObj()', 25);
182165 },
 166+ //@@todo should switch this over to php gennerated
 167+ getInitItem:function(item){
 168+ switch(item){
 169+ case 'welcome':
 170+ return '<h3>Welcome to The sequencer demo<h3>' +
 171+ 'Select your editor preference:<br> '+
 172+ '<blockquote><input onClick="'+this.instance_name+'.doSimpleTl()" type="radio" value="A" name="radio_button" ' + simpleChecked + '>simple editor (imovie style) </blockquote>' +
 173+ '<blockquote><input onClick="'+this.instance_name+'.doAdvancedTl()" type="radio" value="A" name="radio_button" ' + advChecked + '>advanced editor (final cut style) </blockquote>';
 174+ break;
 175+ case 'cliplib':
 176+ return '<h3>Resource Finder</h3>';
 177+ break;
 178+ case 'transition':
 179+ return '<h3>Transition Library</h3>';
 180+ break;
 181+ case 'soundtrack':
 182+ return '<h3>Sound Track?</h3>';
 183+ break;
 184+ }
 185+ },
 186+ renderTimeLine:function(){
 187+ //add html content for timeline
 188+ if( this.timeline_mode=='time'){
 189+ $j('#'+this.timeline_id).html(''+
 190+ '<div id="'+this.timeline_id+'_left_cnt" class="mv_tl_left_cnt">'+
 191+ '<div id="'+this.timeline_id+'_head_control" style="position:absolute;top:0px;left:0px;right:0px;height:30px;">' +
 192+ '<a title="'+getMsg('play_clip')+'" href="javascript:'+this.instance_name+'.play_jt()">'+
 193+ '<img style="width:16px;height:16px;border:0" src="' + mv_embed_path + 'images/control_play_blue.png">'+
 194+ '</a>'+
 195+ '<a title="'+getMsg('zoom_in')+'" href="javascript:'+this.instance_name+'.zoom_in()">'+
 196+ '<img style="width:16px;height:16px;border:0" src="' + mv_embed_path + 'images/zoom_in.png">'+
 197+ '</a>'+
 198+ '<a title="'+getMsg('zoom_out')+'" href="javascript:'+this.instance_name+'.zoom_out()">'+
 199+ '<img style="width:16px;height:16px;border:0" src="' + mv_embed_path + 'images/zoom_out.png">'+
 200+ '</a>'+
 201+ '<a title="'+getMsg('cut_clip')+'" href="javascript:'+this.instance_name+'.cut_mode()">'+
 202+ '<img style="width:16px;height:16px;border:0" src="' + mv_embed_path + 'images/cut.png">'+
 203+ '</a>'+
 204+ '</div>' +
 205+ '</div>' +
 206+ '<div id="'+this.timeline_id+'_tracks" class="mv_seq_tracks">' +
 207+ '<div id="'+this.timeline_id+'_head_jump" class="mv_head_jump" style="position:absolute;top:0px;left:0px;height:20px;"></div>'+
 208+ '<div id="'+this.timeline_id+'_playline" class="mv_playline"></div>'+
 209+ '</div>'
 210+ );
 211+ }else{
 212+ $j('#'+this.timeline_id).html('simple editor goes here');
 213+ }
 214+ },
183215 //once playlist is ready continue
184216 checkReadyPlObj:function(){
185217 this.plObj = $j('#'+ this.plObj_id ).get(0);
@@ -213,7 +245,7 @@
214246 //js_log("on track: "+ i + ' t:'+ $j('#'+this.timeline_id+'_left_cnt').html() );
215247 //set up track based on disp type
216248 switch(track.disp_mode){
217 - case 'thumb':
 249+ case 'timeline_thumb':
218250 var track_height=60;
219251 var exc_img = 'opened';
220252 var exc_action='close';
@@ -242,7 +274,7 @@
243275 );
244276 top_pos+=track_height+10;
245277 }
246 - this.do_render_timeline();
 278+ this.do_refresh_timeline();
247279 },
248280 update_tl_hook:function(jh_time_ms){
249281 //put into seconds scale:
@@ -362,14 +394,14 @@
363395 $j('#track_cnt_'+inx+',#container_track_'+inx).animate({height:this.track_text_height}, "slow",'',
364396 function(){
365397 this_seq.plObj.tracks[inx].disp_mode='text';
366 - this_seq.render_tracks(inx);
 398+ this_seq.render_tracks( inx );
367399 });
368400 }else if(req=='open'){
369401 $j('#mv_exc_'+inx).attr('href', 'javascript:'+this.instance_name+'.exc_track('+inx+',\'close\')');
370402 $j('#mv_exc_'+inx + ' > img').attr('src',mv_embed_path + 'images/opened.png');
371403 $j('#track_cnt_'+inx+',#container_track_'+inx).animate({height:this.track_thumb_height}, "slow",'',
372404 function(){
373 - this_seq.plObj.tracks[inx].disp_mode='thumb';
 405+ this_seq.plObj.tracks[inx].disp_mode='timeline_thumb';
374406 this_seq.render_tracks(inx);
375407 });
376408
@@ -384,14 +416,25 @@
385417 js_log('do cut mode');
386418 //add cut layer ontop of clips
387419 },
 420+ doAdvancedTl:function(){
 421+ this.timeline_mode='time';
 422+ this.renderTimeLine();
 423+ this.do_refresh_timeline();
 424+ return false;
 425+ },
 426+ doSimpleTl:function(){
 427+ this.timeline_mode='clip';
 428+ this.renderTimeLine();
 429+ this.do_refresh_timeline();
 430+ return false;
 431+ },
388432 //renders updates the timeline based on the current scale
389433 render_tracks:function(track_inx){
390 - js_log("render track: "+track_inx);
391 - if(!track_inx)track_inx=-1;
 434+ js_log("f::render track: "+track_inx);
392435 var this_seq = this;
393436 //inject the tracks into the timeline (if not already there)
394 - for(track_id in this.plObj.tracks){
395 - if(track_inx==track_id || track_inx==-1){
 437+ for(var track_id in this.plObj.tracks){
 438+ if(track_inx==track_id || typeof track_inx=='undefined'){
396439 //empty out the track container:
397440 //$j('#container_track_'+track_id).empty();
398441 var track_html=droppable_html='';
@@ -401,15 +444,26 @@
402445 //for each clip:
403446 for(var j in track.clips){
404447 clip = track.clips[j];
405 - //var img = clip.getClipImg('icon');
 448+ //var img = clip.getClipImg('icon');
 449+ if(this.timeline_mode=='clip'){
 450+ var frame_width = Math.round(this.track_thumb_height*1.3333333);
 451+ track_html+='<span id="track_'+track_id+'_clip_'+j+'" style="width:'+(frame_width+30)+'" '+
 452+ +' class="mv_time_clip mv_clip_drag" >';
 453+ track_html+=clip.embed.renderTimelineThumbnail({
 454+ 'width':frame_width,
 455+ 'height':this.track_thumb_height,
 456+ 'time':0
 457+ });
 458+ track_html+='</span>';
 459+ }
406460 //do per display type rendering:
407 - if(this.timeline_mode=='time'){
 461+ if(this.timeline_mode=='time'){
408462 clip.left_px = Math.round( cur_clip_time/this.timeline_scale);
409463 clip.width_px = Math.round( Math.round( clip.getDuration() )/this.timeline_scale);
410464 js_log('at time:' + cur_clip_time + ' left: ' +clip.left_px + ' clip dur: ' + Math.round( clip.getDuration() ) + ' clip wdith:' + clip.width_px);
411 -
 465+
412466 //for every clip_width pixle output image
413 - if(track.disp_mode=='thumb'){
 467+ if(track.disp_mode=='timeline_thumb'){
414468 track_html+='<span id="track_'+track_id+'_clip_'+j+'" style="left:'+clip.left_px+'px;width:'+clip.width_px+'px;" class="mv_time_clip mv_clip_drag">';
415469 track_html+= this.render_clip_frames( clip );
416470 }else if(track.disp_mode=='text'){
@@ -418,11 +472,11 @@
419473 'width:'+clip.width_px+'px;background:'+clip.getColor()+
420474 '" class="mv_time_clip_text mv_clip_drag">'+clip.title;
421475 }
422 - //add in per clip controls
423 - track_html+='<div title="'+getMsg('clip_in')+' '+clip.embed.start_ntp+'" class="ui-resizable-w ui-resizable-handle" style="width: 16px; height: 16px; left: 0px; top: 2px;background:url(\''+mv_embed_path+'images/application_side_contract.png\');"></div>'+"\n";
424 - track_html+='<div title="'+getMsg('clip_out')+' '+clip.embed.end_ntp+'" class="ui-resizable-e ui-resizable-handle" style="width: 16px; height: 16px; right: 0px; top: 2px;background:url(\''+mv_embed_path+'images/application_side_expand.png\');"></div>'+"\n";
425 - track_html+='<div title="'+getMsg('rmclip')+'" onClick="'+this.instance_name+'.removeClip('+track_id+','+j+')" style="position:absolute;cursor:pointer;width: 16px; height: 16px; left: 0px; bottom:2px;background:url(\''+mv_embed_path+'images/delete.png\');"></div>'+"\n";
426 - track_html+='<span style="display:none;" class="mv_clip_stats"></span>';
 476+ //add in per clip controls
 477+ track_html+='<div title="'+getMsg('clip_in')+' '+clip.embed.start_ntp+'" class="ui-resizable-w ui-resizable-handle" style="width: 16px; height: 16px; left: 0px; top: 2px;background:url(\''+mv_embed_path+'images/application_side_contract.png\');" ></div>'+"\n";
 478+ track_html+='<div title="'+getMsg('clip_out')+' '+clip.embed.end_ntp+'" class="ui-resizable-e ui-resizable-handle" style="width: 16px; height: 16px; right: 0px; top: 2px;background:url(\''+mv_embed_path+'images/application_side_expand.png\');" ></div>'+"\n";
 479+ track_html+='<div title="'+getMsg('rmclip')+'" onClick="'+this.instance_name+'.removeClip('+track_id+','+j+')" style="position:absolute;cursor:pointer;width: 16px; height: 16px; left: 0px; bottom:2px;background:url(\''+mv_embed_path+'images/delete.png\');"></div>'+"\n";
 480+ track_html+='<span style="display:none;" class="mv_clip_stats"></span>';
427481
428482 track_html+='</span>';
429483 //droppable_html+='<div id="dropBefore_'+i+'_c_'+j+'" class="mv_droppable" style="height:'+this.track_thumb_height+'px;left:'+clip.left_px+'px;width:'+Math.round(clip.width_px/2)+'px"></div>';
@@ -451,7 +505,7 @@
452506 drag:function(e, ui){
453507 //animate re-arrange by left position:
454508 //js_log('left: '+ui.position.left);
455 - //locate clip (based on clip durration not annimate)
 509+ //locate clip (based on clip duration not animate)
456510 var id_parts = this.id.split('_');
457511 var track_inx = id_parts[1];
458512 var clip_inx = id_parts[3];
@@ -570,11 +624,13 @@
571625 for(var p=pint;p<clip.width_px;p+=frame_width){
572626 var clip_time = (p==0)?0:Math.round(p*this.timeline_scale);
573627 js_log('rendering clip frames: p:' +p+' '+ (p*this.timeline_scale)+' ' + clip_time);
574 - clip_frames_html+='<img src="'+clip.getClipImg(clip_time, 'icon')+'" ' +
575 - 'height="'+this.track_thumb_height+'" ' +
576 - 'width="'+frame_width+'">';
 628+ clip_frames_html+=clip.embed.renderTimelineThumbnail({
 629+ 'width':frame_width,
 630+ 'height':this.track_thumb_height,
 631+ 'time':clip_time
 632+ });
577633 }
578 - //js_log('render_clip_frames:'+clip_frames_html);
 634+ js_log('render_clip_frames:'+clip_frames_html);
579635 return clip_frames_html;
580636 },
581637 update_clip_resize:function(clip_element){
@@ -668,15 +724,15 @@
669725 //adjusts the current scale
670726 zoom_in:function(){
671727 this.timeline_scale = this.timeline_scale*.75;
672 - this.do_render_timeline();
 728+ this.do_refresh_timeline();
673729 js_log('zoomed in:'+this.timeline_scale);
674730 },
675731 zoom_out:function(){
676732 this.timeline_scale = this.timeline_scale*(1+(1/3));
677 - this.do_render_timeline();
 733+ this.do_refresh_timeline();
678734 js_log('zoom out: '+this.timeline_scale);
679735 },
680 - do_render_timeline:function(){
 736+ do_refresh_timeline:function(){
681737 this.render_head_jump();
682738 this.render_tracks();
683739 this.jt(this.playline_time);
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_playlist.js
@@ -50,7 +50,7 @@
5151 start_clip_src:null,
5252 disp_play_head:null,
5353 userSlide:false,
54 - loading:true,
 54+ loading:true,
5555 loading_external_data:true, //if we are loading external data (set to loading by default)
5656 tracks:{},
5757 default_track:null, // the default track to add clips to.
@@ -188,7 +188,9 @@
189189 for( var i in this.default_track.clips ){
190190 var clip = this.default_track.clips[i];
191191 if(clip.embed.load_error){
192 - var error = clip.embed.load_error;
 192+ var error = clip.embed.load_error;
 193+ //break on any clip we can't playback:
 194+ break;
193195 }
194196 if( clip.embed.ready_to_play ){
195197 _this.clip_ready_count++;
@@ -201,14 +203,16 @@
202204 clip.embed.init_with_sources_loaded();
203205 }
204206 }
 207+
205208 //@@todo for some plugins we have to conform types of clips
206209 // ie vlc can play flash _followed_by_ ogg _followed_by_ whatever
207210 // but
208211 // native ff 3.1a2 can only play ogg
209212 if( error){
210 - $j(this).html( error );
211 - }else if(_this.clip_ready_count == this.getClipCount() ){
212 - js_log("done initing all clips");
 213+ this.load_error=error;
 214+ this.is_ready=false;
 215+ }else if( _this.clip_ready_count == this.getClipCount() ){
 216+ js_log("done init all clips");
213217 this.doWhenClipLoadDone();
214218 }else{
215219 js_log("only "+ _this.clip_ready_count +" clips done, scheduling callback:");
@@ -418,7 +422,7 @@
419423 if(this.cur_clip)
420424 $j('#clipDesc_'+this.cur_clip.id).css({display:'inline'});
421425 },
422 - updateThumbPerc:function(perc){
 426+ updateThumbPerc:function( perc ){
423427 //get float seconds:
424428 var float_sec = (this.getDuration()*perc);
425429 this.updateThumbTime( float_sec );
@@ -454,7 +458,7 @@
455459 this.cur_clip.embed.currentTime = (float_sec -pl_sum_time)+this.cur_clip.embed.start_offset ;
456460 this.cur_clip.embed.seek_time_sec = (float_sec -pl_sum_time );
457461
458 - this.doSmilActions();
 462+ this.doSmilActions( single_line = true );
459463 },
460464 updateBaseStatus:function(){
461465 js_log('f:updateBaseStatus');
@@ -605,6 +609,7 @@
606610 //update cur clip based if sequence playhead set:
607611 var d = new Date();
608612 this.clockStartTime = d.getTime();
 613+
609614 this.monitor();
610615
611616 //@@todo pre-load each clip:
@@ -1012,9 +1017,8 @@
10131018 $j('#seqThumb_'+this.pp.id).append(out);
10141019 },
10151020 getClipImg:function(start_offset, size){
1016 - js_log('f:getClipImg ' + start_offset + ' s:'+size);
1017 - //if its a metavid image (grab the requested size)
1018 - if(!this.img){
 1021+ js_log('f:getClipImg ' + start_offset + ' s:'+size);
 1022+ if( !this.img){
10191023 return mv_default_thumb_url;
10201024 }else{
10211025 if(!size && !start_offset){
@@ -1349,14 +1353,14 @@
13501354 }
13511355 //handles the rendering of overlays load of future clips (if necessary)
13521356 //@@todo could be lazy loaded if necessary
1353 -mvPlayList.prototype.doSmilActions = function(){
 1357+mvPlayList.prototype.doSmilActions = function( single_frame ){
13541358 //js_log('f:doSmilActions: ' + this.cur_clip.id + ' tid: ' + this.cur_clip.transOut );
13551359 var offSetTime = 0; //offset time should let us start a transition later on if we have to.
13561360 var _clip = this.cur_clip; //setup a local pointer to cur_clip
13571361
13581362
13591363 //do any smil time actions that may change the current clip
1360 - if(this.userSlide){
 1364+ if( this.userSlide ){
13611365 //current clip set is set via updateThumbTime function
13621366 }else{
13631367 //assume playing and go to next:
@@ -1387,7 +1391,7 @@
13881392 in_range = (_clip.embed.currentTime >= (_clip.dur - tObj.dur))?true:false;
13891393
13901394 if(in_range){
1391 - if(this.userSlide){
 1395+ if( this.userSlide || single_frame ){
13921396 if(tid=='transIn')
13931397 mvTransLib.doUpdate(tObj, (_clip.embed.currentTime / tObj.dur) );
13941398
@@ -1422,7 +1426,7 @@
14231427 var mvTransLib = {
14241428 /*
14251429 * function doTransition lookups up the transition in the mvTransLib obj
1426 - * and init the transition if its avaliable
 1430+ * and init the transition if its available
14271431 * @param tObj transition attribute object
14281432 * @param offSetTime default value 0 if we need to start rendering from a given time
14291433 */
@@ -1740,26 +1744,29 @@
17411745 * the main animation loop called every MV_ANIMATION_CB_RATE or 34ms ~around 30frames per second~
17421746 */
17431747 run_transition:function(){
1744 - //js_log('f:run_transition:' + this.interValCount);
1745 - //read directly from plugin if avalible (for native video)
 1748+ //js_log('f:run_transition:' + this.interValCount);
 1749+
 1750+ //update the time from the video if native:
17461751 if(typeof this.pClip.embed.vid !='undefined'){
17471752 this.interValCount=0;
17481753 this.pClip.embed.currentTime = this.pClip.embed.vid.currentTime;
1749 - }else{
 1754+ }
 1755+
 1756+ //}else{
17501757 //relay on currentTime update grabs (every 250ms or so) (ie for images)
1751 - if(this.prev_curtime!=this.pClip.embed.currentTime){
1752 - this.prev_curtime = this.pClip.embed.currentTime;
1753 - this.interValCount=0;
1754 - }
1755 - }
1756 - //start_time =asinged by doSmilActions
 1758+ // if(this.prev_curtime!=this.pClip.embed.currentTime){
 1759+ // this.prev_curtime = this.pClip.embed.currentTime;
 1760+ // this.interValCount=0;
 1761+ // }
 1762+ //}
 1763+ //start_time =asigned by doSmilActions
17571764 //base_cur_time = pClip.embed.currentTime;
1758 - //dur = asinged by attribute
 1765+ //dur = asigned by attribute
17591766 if(this.animation_state==0){
17601767 mvTransLib.doInitTransition(this);
17611768 this.animation_state=1;
17621769 }
1763 - //set percentage include diffrence of currentTime to prev_curTime
 1770+ //set percentage include difrence of currentTime to prev_curTime
17641771 // ie updated in-between currentTime updates)
17651772
17661773 if(this.transAttrType=='transIn')
@@ -1781,7 +1788,7 @@
17821789 //update state based on current time + cur_time_offset (for now just use pClip.embed.currentTime)
17831790 mvTransLib.doUpdate(this, percentage);
17841791
1785 - if(percentage >= 1){
 1792+ if( percentage >= 1 ){
17861793 js_log("transition done update with percentage "+percentage);
17871794 this.animation_state=2;
17881795 clearInterval(this.timerId);
@@ -1791,7 +1798,7 @@
17921799
17931800 this.interValCount++;
17941801 //setInterval in we are still in running state and user is not using the playhead
1795 - if(this.animation_state==1){
 1802+ if( this.animation_state==1 ){
17961803 if(!this.timerId){
17971804 this.timerId = setInterval('document.getElementById(\''+this.pClip.pp.id+'\').cur_clip.'+this.transAttrType+'.run_transition()',
17981805 MV_ANIMATION_CB_RATE);
@@ -1831,7 +1838,7 @@
18321839 desc:'empty description',
18331840 }
18341841 trackObj.prototype = {
1835 - disp_mode:'thumb',
 1842+ disp_mode:'timeline_thumb',
18361843 init : function(initObj){
18371844 if(!initObj)
18381845 initObj={};

Status & tagging log