r68141 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68140‎ | r68141 | r68142 >
Date:22:18, 16 June 2010
Author:dale
Status:deferred
Tags:
Comment:
smil player updates added mw.SmilBuffer stubs
refactored player flow.
Modified paths:
  • /branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/SmilPlayer/loader.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/SmilPlayer/mw.EmbedPlayerSmil.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/SmilPlayer/mw.Smil.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBody.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBuffer.js (added) (history)
  • /branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilHooks.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilLayout.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/SwarmTransport/mw.SwarmTransport.js (modified) (history)
  • /branches/MwEmbedStandAlone/mwEmbed.i18n.php (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/mwEmbed.i18n.php
@@ -276,6 +276,10 @@
277277 'mwe-load-drag-item' => 'Am Lade vu mitgschleipfte Poschte',
278278 'mwe-ok' => 'OK',
279279 'mwe-cancel' => 'Abbräche',
 280+ 'mwe-enable-gadget' => 'D Beta-Version vum Multimedia-Heälferli (mwEmbed) fir alli Syte aktiviere',
 281+ 'mwe-enable-gadget-done' => 'Beta-Version vum Multimedia-Hälferli isch aktiviert wore',
 282+ 'mwe-must-login-gadget' => 'Go s Hälferli aktiviere chenne, muesch di <a target="_new" href="$1">aamälde</a>',
 283+ 'mwe-test-plural' => '{{PLURAL:$1|$1 Tescht|$1 Tescht}} uusgfiert',
280284 );
281285
282286 /** Hebrew (עברית)
@@ -553,6 +557,14 @@
554558 'mwe-test-plural' => 'Покренуо/ла сам {{PLURAL:$1|$1 тест|$1 тестова}}',
555559 );
556560
 561+/** Serbian Latin ekavian (Srpski (latinica)) */
 562+$messages['sr-el'] = array(
 563+ 'mwe-loading_txt' => 'Učitavanje ...',
 564+ 'mwe-ok' => 'OK',
 565+ 'mwe-cancel' => 'Poništi',
 566+ 'mwe-test-plural' => 'Pokrenuo/la sam {{PLURAL:$1|$1 test|$1 testova}}',
 567+);
 568+
557569 /** Swedish (Svenska)
558570 * @author Dafer45
559571 * @author GameOn
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBody.js
@@ -2,47 +2,95 @@
33 * The smil body also see:
44 * http://www.w3.org/TR/2008/REC-SMIL3-20081201/smil-structure.html#edef-body
55 */
6 -mw.SmilBody = function( $body ){
7 - return this.init( $body );
 6+mw.SmilBody = function( smilObject ){
 7+ return this.init( smilObject );
88 }
99
1010 mw.SmilBody.prototype = {
1111
12 - // Used to store elements for getElementForTime method
 12+ // Used to store elements for getElementsForTime method
1313 elementsInRange: [],
1414
 15+ // Index of auto assigned ids
 16+ idIndex : 0,
 17+
1518 // Constructor:
1619 init: function( smilObject ){
1720 this.smil = smilObject;
1821 this.$dom = this.smil.getDom().find( 'body' );
 22+
 23+ // Assign ids to smil body elements
 24+ this.assignIds( this.$dom );
1925 },
2026
2127 /**
 28+ * Assigns body smil elements id (for content that has a html representation "ref" & "smilText" )
 29+ * ( enables fast sync between smilDom and htmlDom )
 30+ */
 31+ assignIds: function( $node ) {
 32+ var _this = this;
 33+ if( !$node.attr('id')
 34+ && !$node.attr( 'xml:id' )
 35+ && (
 36+ _this.getNodeSmilType( $node ) == 'ref'
 37+ || _this.getNodeSmilType( $node ) == 'smilText'
 38+ )
 39+ ){
 40+ $node.attr('id', _this.smil.embedPlayer.id + '_ref_' + _this.idIndex );
 41+ mw.log('SmilBody:: gave: ' + $node.get(0).nodeName + ' id: ' + $node.attr('id') );
 42+ _this.idIndex++;
 43+ }
 44+
 45+ // Recurse to all the nodes children
 46+ if( $node.children().length ) {
 47+ $node.children().each( function( inx, childNode ){
 48+ _this.assignIds( $j( childNode ) );
 49+ });
 50+ }
 51+ },
 52+
 53+ /**
 54+ * Render the body elements for a given time, use layout engine to draw elements
 55+ */
 56+ renderTime: function( time ){
 57+ var _this = this;
 58+ // Get all the draw elements from the body this time:
 59+ var drawElements = this.getElementsForTime( time );
 60+ mw.log(" got " + drawElements.length + " drawElements" );
 61+
 62+ // Render the active elements using the layout engine
 63+ $j.each( drawElements , function(inx, smilElement ) {
 64+ _this.smil.getLayout().drawElement( smilElement, time );
 65+ } )
 66+ },
 67+
 68+ /**
2269 * Gets all the elements for a given time.
2370 *
2471 */
25 - getElementForTime: function ( time ) {
 72+ getElementsForTime: function ( time ) {
2673 var startOffset = 0;
27 - if( !time )
 74+ if( !time ) {
2875 time =0;
 76+ }
2977 // Empty out the requested element set:
3078 this.elementsInRange = [];
31 - this.getElementForTimeRecurse( this.$dom, time, startOffset);
 79+ this.getElementsForTimeRecurse( this.$dom, time, startOffset);
3280 return this.elementsInRange;
3381 },
3482
3583 /**
36 - * getElementForTimeRecurse
 84+ * getElementsForTimeRecurse
3785 * @param {Object} $node NOde to recursively search for elements in the given time range
3886 */
39 - getElementForTimeRecurse: function( $node, time, startOffset){
 87+ getElementsForTimeRecurse: function( $node, time, startOffset){
4088 // Setup local pointers:
4189 var nodeDuration = this.getNodeDuration( $node );
4290 var nodeType = this.getNodeSmilType( $node );
4391 var nodeParentType = this.getNodeSmilType( $node.parent() );
4492 var _this = this;
4593
46 - mw.log( "getElementForTimeRecurse::" +
 94+ mw.log( "getElementsForTimeRecurse::" +
4795 ' time: ' + time +
4896 ' nodeName: ' + $j( $node ).get(0).nodeName +
4997 ' nodeType: ' + nodeType +
@@ -67,7 +115,7 @@
68116 if( $node.children().length ) {
69117 $node.children().each( function( inx, childNode ){
70118 mw.log(" recurse:: startOffset:" + nodeType + ' start offset:' + startOffset );
71 - var childDur = _this.getElementForTimeRecurse( $j( childNode ), time, startOffset);
 119+ var childDur = _this.getElementsForTimeRecurse( $j( childNode ), time, startOffset);
72120 // If element parent is a 'seq' increment startOffset:
73121 if( nodeType == 'seq' ) {
74122 mw.log(" Parent Seq:: add child dur: " + childDur );
@@ -77,15 +125,14 @@
78126 }
79127 }
80128
81 - // If the nodeType is "ref" find the its associated transformations
82 - // add to this.elementsInRange array
 129+ // If the nodeType is "ref" add to this.elementsInRange array
83130 if( nodeType == 'ref' || nodeType == 'smilText' ) {
84131 // Ref type get the
85132 this.elementsInRange.push( $node );
86133 mw.log("Add ref to elementsInRange:: " + nodeType + " length:" + this.elementsInRange.length);
87134 }
88135
89 - // Return the node Duration for startOffset updates
 136+ // Return the node Duration for tracking startOffset
90137 return this.getNodeDuration( $node );
91138 },
92139
@@ -93,7 +140,7 @@
94141 * Returns the smil body duration
95142 * ( wraps getDurationRecurse to get top level duration )
96143 */
97 - getDuration: function(){
 144+ getDuration: function(){
98145 this.duration = this.getNodeDuration( this.$dom );
99146 mw.log("smilBody:: getDuration: " + this.duration );
100147 return this.duration;
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilLayout.js
@@ -22,60 +22,61 @@
2323 // Reset the htmlDOM cache
2424 this.$rootLayout = null;
2525 },
 26+
 27+ /**
 28+ * get Html DOM
 29+ */
 30+ getHtml: function(){
 31+ var _this = this;
 32+
 33+ // Setup target Size:
 34+ this.targetWidth = this.smil.embedPlayer.getWidth();
 35+ this.targetHeight = this.smil.embedPlayer.getHeight();
2636
27 - getHtmlDOM: function( size , time, callback ){
 37+ mw.log("SmilLayout:: getHtml:: " + this.targetWidth );
 38+
 39+ return this.getRootLayout();
 40+ },
 41+
 42+ getRootLayout: function(){
2843 var _this = this;
29 - mw.log("SmilLayout:: getHtmlDOM:: " + size.width + ' time: ' + time );
30 - // Setup target Size:
31 - this.targetWidth = size.width;
32 - this.targetHeight = size.height;
33 -
34 - if( !time ) {
35 - time = 0;
 44+ mw.log( "SmilLayout::getRootLayout:" );
 45+ if( !this.$rootLayout ){
 46+ this.$rootLayout = $j('<div />' )
 47+ .attr('rel', 'root-layout' )
 48+ .css( {
 49+ 'position': 'absolute',
 50+ 'width' : '100%',
 51+ 'height' : '100%'
 52+ });
 53+
 54+ // Update the root layout css
 55+ this.$rootLayout.css( _this.getRootLayoutCss() )
 56+ // Update the root layout html
 57+ this.$rootLayout.html( _this.getRootLayoutHtml() );
3658 }
37 -
38 - // Get the root layout HTML and append the html regions
39 - this
40 - .getRootLayoutHtml()
41 - .appendHtmlRegions()
42 -
43 - // Get all the draw elements from the body this time:
44 - var drawElements = this.smil.getBody().getElementForTime( time );
45 -
46 - mw.log(" got " + drawElements.length + " drawElements" );
47 -
48 -
49 - // Reset the media loaded flag
50 - if( _this.mediaLoadingCount != 0 ) {
51 - mw.log( "Error: media still loading, possible stacking seeking requests?" );
52 - _this.mediaLoadingCount = 0;
53 - }
54 -
55 - // Set the media loaded callback
56 - if( callback ) {
57 - _this.mediaLoadedCallback = callback;
58 - }
59 -
60 - // Draw layout
61 - $j.each( drawElements , function(inx, smilElement ) {
62 - _this.drawElement( smilElement, time );
63 - } )
64 -
65 -
66 - return this.$rootLayout;
 59+ return this.$rootLayout;
6760 },
68 -
69 - // Draw the element
70 - drawElement: function( smilElement, time ) {
 61+
 62+ /**
 63+ * drawElement smilElement
 64+ */
 65+ drawElement: function( smilElement, time ) {
7166 var _this = this;
7267 var regionId = $j( smilElement ).attr( 'region');
73 - var nodeName = $j( smilElement ).get(0).nodeName ;
 68+ var nodeName = $j( smilElement ).get(0).nodeName ;
 69+
7470 mw.log("Draw: " + nodeName + ' into ' + regionId );
 71+ var $regionTarget = this.$rootLayout.find( '#' + regionId );
7572 // Check for region target in $rootLayout
76 - if( this.$rootLayout.find( '#' + regionId ).length == 0 ) {
 73+ if( $regionTarget.length == 0 ) {
7774 mw.log( "Error Could not find region:" + regionId + " for " + nodeName);
7875 return ;
7976 }
 77+ // Check that the element does not already exist
 78+ if( $j( smilElement ).attr('id') && $regionTarget.find( '#' + $j( smilElement ).attr('id') ) ){
 79+ mw.log( "Error:: SmilLayout draw element that is already present: " + $j( smilElement ).attr('id') );
 80+ }
8081
8182 // Append the transformed Smil to its target region
8283 this.$rootLayout.find( '#' + regionId ).append(
@@ -85,6 +86,7 @@
8687
8788 /**
8889 * Get the transformed smil element in html format
 90+ * @param
8991 */
9092 getSmilElementHtml: function ( smilElement, time ) {
9193 var nodeName = $j( smilElement ).get(0).nodeName ;
@@ -99,10 +101,34 @@
100102 }
101103 mw.log( "Error: Could not find smil layout transform for element type: " + nodeName );
102104 return $j('<span />')
103 - .text( 'Error: unkown type:' + nodeName );
 105+ .text( 'Error: unknown type:' + nodeName );
104106 },
105107
106108 /**
 109+ * Updates all the active elements for a given time
 110+ * @param time the requested time to be updated.
 111+ * @param deltaTarget if a delta target is supplied we add a css animation transform for that delta
 112+ */
 113+ updateSmilTime: function( time, deltaTarget ){
 114+ // for every active element tranform per time request
 115+
 116+ //
 117+ },
 118+
 119+ /**
 120+ * Update SmilBuffer
 121+ * updates the buffer percentage for the entire clip set
 122+ * ( mw.SmilBuffer )
 123+ */
 124+
 125+ /**
 126+ * buffered callback
 127+ * utility function to run a callback once a given buffer time
 128+ * has been reached.
 129+ * ( mw.SmilBuffer )
 130+ */
 131+
 132+ /**
107133 * Get a text element per given time
108134 * xxx we need to use "relativeTime"
109135 */
@@ -218,7 +244,7 @@
219245 },
220246
221247 /**
222 - * Parse pan zoom attribute string
 248+ * Parse pan zoom attribute string
223249 * @param panZoomString
224250 */
225251 parsePanZoom: function( panZoomString ){
@@ -238,10 +264,11 @@
239265 /**
240266 * Add all the regions to the root layout
241267 */
242 - appendHtmlRegions: function(){
243 - var _this = this;
 268+ getRootLayoutHtml: function(){
 269+ var _this = this;
 270+ var $layoutContainer = $j( '<div />' );
244271 this.$dom.find( 'region' ).each( function( inx, regionElement ) {
245 - _this.$rootLayout.append(
 272+ $layoutContainer.append(
246273 $j( '<div />' )
247274 .attr('rel', 'region' )
248275 .css( 'position', 'absolute' )
@@ -255,22 +282,14 @@
256283 )
257284 );
258285 });
259 - return this;
 286+ return $layoutContainer.children();
260287 },
261288
262289 /**
263290 * Get the root layout object with updated html properties
264291 */
265 - getRootLayoutHtml: function(){
266 - // Set the in
267 - this.$rootLayout = $j('<div />' )
268 - .attr('rel', 'root-layout' )
269 - .css( {
270 - 'position': 'absolute',
271 - 'width' : '100%',
272 - 'height' : '100%'
273 - });
274 -
 292+ getRootLayoutCss: function( ){
 293+
275294 if( this.$dom.find( 'root-layout').length ) {
276295 if( this.$dom.find( 'root-layout').length > 1 ) {
277296 mw.log( "Error document should only contain one root-layout element" );
@@ -292,10 +311,10 @@
293312 $j.extend( rootLayoutCss, this.transformSizeToTarget() );
294313
295314 // Update the layout css
296 - this.$rootLayout.css( rootLayoutCss );
 315+ return rootLayoutCss;
297316 }
298 -
299 - return this;
 317+ mw.log("Error: SmilLayout, could not find root-layout element " ) ;
 318+ return {};
300319 },
301320
302321 /**
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/loader.js
@@ -8,6 +8,7 @@
99 "mw.Smil" : "mw.Smil.js",
1010 "mw.SmilLayout" : "mw.SmilLayout.js",
1111 "mw.SmilBody" : "mw.SmilBody.js",
 12+ "mw.SmilBuffer" : "mw.SmilBuffer.js",
1213
1314 "mw.EmbedPlayerSmil" : "mw.EmbedPlayerSmil.js"
1415 } );
@@ -20,6 +21,7 @@
2122 "mw.Smil",
2223 "mw.SmilLayout",
2324 "mw.SmilBody",
 25+ "mw.SmilBuffer",
2426 "mw.EmbedPlayerSmil"
2527 ];
2628
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.Smil.js
@@ -21,9 +21,6 @@
2222 return this.init( options );
2323 }
2424 mw.Smil.prototype = {
25 -
26 - // If smil is being loaded lazy init
27 - loadingSmil: null ,
2825
2926 // Store the mw.SmilLayout object
3027 layout : null,
@@ -31,16 +28,22 @@
3229 // Stores the mw.SmilBody object
3330 body : null,
3431
 32+ // Handles buffer information display elements
 33+ buffer: null,
 34+
3535 // Stores the smil document for this object ( for relative image paths )
3636 smilUrl: null,
3737
 38+ // The abstract emebed player parent
 39+ embedPlayer: null,
3840
3941 /**
4042 * Constructor
41 - * @param {Object} options Set of options for the smil interface
 43+ * @param {Object} embedPlayer Refrence to the embedPlayer driving the smil object
4244 */
43 - init: function( options ) {
44 -
 45+ init: function( embedPlayer ) {
 46+ mw.log(" Smil:: init with player: " + embedPlayer.id );
 47+ this.embedPlayer = embedPlayer;
4548 },
4649
4750 /**
@@ -51,12 +54,10 @@
5255 loadFromUrl: function( url , callback ) {
5356 var _this = this;
5457 this.smilUrl = url;
55 - mw.log( 'Smil: loadFromUrl : ' + url );
56 - // Set the loading flag to true:
57 - this.loadingSmil = true;
 58+ mw.log( 'Smil::loadFromUrl : ' + url );
5859
5960 // Try for direct load ( api cross domain loading is handled outside of SmilInterface
60 - $j.get( url, function( data ) {
 61+ $j.get( url, function( data ) {
6162 _this.loadFromString( data );
6263 // XXX check success or failure
6364 callback();
@@ -71,6 +72,8 @@
7273 // Load the parsed string into the local "dom"
7374 this.$dom = $j( smilXmlString );
7475
 76+ mw.log( "Smil::loadFromString: loaded smil dom: " + this.$dom );
 77+
7578 // Clear out the layout
7679 this.layout = null;
7780
@@ -79,6 +82,9 @@
8083
8184 // Clear out the top level duration
8285 this.duration = null;
 86+
 87+ // Clear out the "buffer" object
 88+ this.buffer = null;
8389 },
8490
8591 /**
@@ -101,11 +107,34 @@
102108 */
103109 getHtmlDOM: function ( size, time, callback ){
104110 mw.log("getHtmlDOM:: " + size.width + ' time: ' + time);
105 -
 111+
106112 // Have the layout object return the layout HTML DOM
107113 return this.getLayout().getHtmlDOM( size, time );
108114 },
109115
 116+ renderTime: function( time, callback ) {
 117+ // Get the render target:
 118+ var $renderTarget = this.embedPlayer.getRenderTarget();
 119+
 120+ // Add the core layout ( not time based )
 121+ $renderTarget.append(
 122+ this.getLayout().getHtml()
 123+ )
 124+
 125+ // Update the render target with bodyElements for the requested time
 126+ this.getBody().renderTime( time );
 127+
 128+ // Wait until buffer is ready
 129+ this.checkBufferTimeReady( time, callback );
 130+ },
 131+
 132+ getBuffer: function(){
 133+ if( ! this.buffer ) {
 134+ this.buffer = new mw.SmilBuffer( this ) ;
 135+ }
 136+ return this.buffer;
 137+ },
 138+
110139 /**
111140 * Function called continuously to keep sync smil "in sync"
112141 */
@@ -136,7 +165,7 @@
137166 /**
138167 * Get the duration form the
139168 */
140 - getDuration: function(){
 169+ getDuration: function(){
141170 // return 0 while we don't have the $dom loaded
142171 if( !this.$dom ){
143172 return 0;
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilHooks.js
@@ -31,14 +31,13 @@
3232
3333 // Setup the "embedCode" binding to swap in an updated url
3434 $j( embedPlayer ).bind( 'checkPlayerSourcesEvent', function( event, callback ) {
35 - mw.log(" smil enter checkPlayerSources");
 35+ mw.log( " smil enter checkPlayerSources" );
3636 // Get the first smil source:
37 - mw.log(" SOURCE IS: " + embedPlayer.mediaElement.getSources( 'application/smil' )[0].getSrc() );
38 - embedPlayer.smil = new mw.Smil();
 37+ mw.log( "Source is: " + embedPlayer.mediaElement.getSources( 'application/smil' )[0].getSrc() );
 38+ embedPlayer.smil = new mw.Smil( embedPlayer );
3939
4040 // Load the smil url as part of "source check"
4141 embedPlayer.smil.loadFromUrl( embedPlayer.mediaElement.getSources( 'application/smil' )[0].getSrc(), function(){
42 - mw.log(" DONE LOAING SMIL FROM UDL");
4342 callback();
4443 });
4544 } );
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.EmbedPlayerSmil.js
@@ -11,6 +11,9 @@
1212 // Instance Name
1313 instanceOf: 'Smil',
1414
 15+ // The jQuery target location to render smil html
 16+ $renderTarget: null,
 17+
1518 // Player supported feature set
1619 supports: {
1720 'playHead' : true,
@@ -27,37 +30,54 @@
2831 */
2932 doEmbedPlayer: function() {
3033 var _this = this;
31 - // Set "loading" here:
32 - $j( this ).html(
33 - $j( '<div />')
34 - .attr('id', 'smilCanvas_' + this.id )
35 - .css( {
36 - 'width' : '100%',
37 - 'height' : '100%',
38 - 'position' : 'relative'
39 - })
40 - );
41 -
42 - // Update the embed player
 34+ mw.log("EmbedPlayerSmil::doEmbedPlayer: " + this.id ) ;
 35+
 36+ // Set "loading" spinner here)
 37+
 38+ // Update the embed player by rending time zero:
4339 this.getSmil( function( smil ){
44 - // XXX might want to move this into mw.SMIL
45 - $j( _this ).html(
46 - smil.getHtmlDOM( {
47 - 'width': _this.getWidth(),
48 - 'height': _this.getHeight()
49 - } )
50 - )
51 - });
 40+ mw.log("EmbedPlayer:: smil loaded " );
 41+ // Render the first frame
 42+ smil.renderTime( 0, function(){
 43+ mw.log("EmbedPlayerSmil::doEmbedPlayer:: render callback ready " );
 44+ } );
 45+ });
5246 },
5347
5448 /**
 49+ * Return the render target for output of smil html
 50+ */
 51+ getRenderTarget: function(){
 52+ if( !this.$renderTarget ){
 53+ if( $j('#smilCanvas_' + this.id ).length === 0 ) {
 54+ // if no render target exist create one:
 55+ $j( this ).html(
 56+ $j( '<div />')
 57+ .attr('id', 'smilCanvas_' + this.id )
 58+ .css( {
 59+ 'width' : '100%',
 60+ 'height' : '100%',
 61+ 'position' : 'relative'
 62+ })
 63+ );
 64+ }
 65+ this.$renderTarget = $j('#smilCanvas_' + this.id );
 66+ }
 67+ return this.$renderTarget;
 68+
 69+ },
 70+
 71+ play: function(){
 72+ mw.log("EmbedPlayerSmil::play (not yet supported)" );
 73+ },
 74+ /**
5575 * Get the smil object. If the smil object does not exist create one with the source url:
5676 * @param callback
5777 */
5878 getSmil: function( callback ){
5979 if( !this.smil ) {
6080 // Create the Smil engine object
61 - this.smil = new mw.Smil();
 81+ this.smil = new mw.Smil( this );
6282
6383 // Load the smil
6484 this.smil.loadFromUrl( this.getSrc(), function(){
@@ -71,9 +91,11 @@
7292 /**
7393 * Get the duration of smil document.
7494 */
75 - getDuration: function(){
 95+ getDuration: function(){
7696 if( this.smil ){
7797 return this.smil.getDuration();
 98+ } else {
 99+ return this.parent_getDuration();
78100 }
79101 },
80102
@@ -94,7 +116,7 @@
95117 this.parent_updateThumbnailHTML();
96118 return ;
97119 }
98 - // If no thumb could be generated use the first frame of smil:
 120+ // If no thumb could be found use the first frame of smil:
99121 this.doEmbedPlayer();
100122 },
101123
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBuffer.js
@@ -0,0 +1,28 @@
 2+/**
 3+* Hanndles buffer information for the smilObject
 4+*/
 5+
 6+mw.SmilBuffer = function( smilObject ){
 7+ return this.init( smilObject );
 8+}
 9+
 10+mw.SmilBuffer.prototype = {
 11+ // Constructor:
 12+ init: function( smilObject ) {
 13+ this.smil = smilObject;
 14+ },
 15+
 16+ /**
 17+ * Runs a callback once the buffer time is ready.
 18+ */
 19+ bufferTimeReady: function( time, callback ) {
 20+ // Get active body elements
 21+ var activeElements = this.smil.getBody().getElementsForTime( time );
 22+ // Check load status per temporal offset
 23+
 24+ // setTimeout to call self untill ready
 25+
 26+ // temp hack ( assume ready ):
 27+ callback();
 28+ }
 29+}
\ No newline at end of file
Property changes on: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBuffer.js
___________________________________________________________________
Name: svn:eol-style
130 + native
Index: branches/MwEmbedStandAlone/modules/SwarmTransport/mw.SwarmTransport.js
@@ -78,7 +78,7 @@
7979
8080 mw.log( 'SwarmTransport:: lookup torrent url: ' + mw.getConfig( 'SwarmTransport.torrentLookupUrl' ) );
8181 // Setup function to run in context based on callback result
82 - $j.getJSON(
 82+ $j.getJSON(
8383 mw.getConfig( 'SwarmTransport.torrentLookupUrl' ) + '?jsonp=?',
8484 torrentLookupRequest,
8585 function( data ){
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js
@@ -1707,7 +1707,8 @@
17081708
17091709 // Load the selected player
17101710 this.selectedPlayer.load( function() {
1711 - mw.log( _this.selectedPlayer.library + " player loaded for " + _this.id );
 1711+ mw.log( 'EmbedPlayer:: ' + _this.selectedPlayer.library + " player loaded for " + _this.id );
 1712+
17121713 // Get embed library player Interface
17131714 var playerInterface = mw[ 'EmbedPlayer' + _this.selectedPlayer.library ];
17141715
@@ -1716,13 +1717,15 @@
17171718 _this['parent_' + method] = _this[method];
17181719 }
17191720 _this[ method ] = playerInterface[method];
1720 - }
 1721+ }
 1722+
17211723 // Update feature support
17221724 _this.updateFeatureSupport();
17231725
17241726 _this.getDuration();
 1727+
17251728 _this.showPlayer();
1726 - // Call the global player mannager to inform this video interface is 100% ready:
 1729+ // Call the global player manager to inform this video interface is ready:
17271730 mw.playerManager.playerReady( _this );
17281731
17291732 // Run the callback if provided
@@ -1977,7 +1980,7 @@
19781981 * Show the player
19791982 */
19801983 showPlayer : function () {
1981 - mw.log( 'Show player: ' + this.id );
 1984+ mw.log( 'EmbedPlayer:: Show player: ' + this.id );
19821985 var _this = this;
19831986 // Set-up the local controlBuilder instance:
19841987 this.controlBuilder = new mw.PlayerControlBuilder( this );

Status & tagging log