r60045 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60044‎ | r60045 | r60046 >
Date:20:27, 14 December 2009
Author:dale
Status:deferred
Tags:
Comment:
* updates to vlcEmbed
* fix small video thumbnail in commons embed overlay issue
* some IE fallbacks for vlc play
Modified paths:
  • /branches/js2-work/phase3/js2/mwEmbed/example_usage/Player_Themable.html (modified) (history)
  • /branches/js2-work/phase3/js2/mwEmbed/libEmbedPlayer/embedPlayer.js (modified) (history)
  • /branches/js2-work/phase3/js2/mwEmbed/libEmbedPlayer/nativeEmbed.js (modified) (history)
  • /branches/js2-work/phase3/js2/mwEmbed/libEmbedPlayer/vlcEmbed.js (modified) (history)
  • /branches/js2-work/phase3/js2/mwEmbed/libTimedText/mw.timedText.js (modified) (history)
  • /branches/js2-work/phase3/js2/mwEmbed/mwEmbed.js (modified) (history)
  • /branches/js2-work/phase3/js2/mwEmbed/php/languages/mwEmbed.i18n.php (modified) (history)
  • /branches/js2-work/phase3/js2/mwEmbed/skins/ctrlBuilder.js (modified) (history)
  • /branches/js2-work/phase3/js2/mwEmbed/skins/kskin/kskinConfig.js (modified) (history)
  • /branches/js2-work/phase3/js2/mwEmbed/skins/kskin/playerSkin.css (modified) (history)

Diff [purge]

Index: branches/js2-work/phase3/js2/mwEmbed/example_usage/Player_Themable.html
@@ -3,8 +3,8 @@
44 <html>
55 <head>
66 <title>Sample Themed Player</title>
7 - <script type="text/javascript" src="../jsScriptLoader.php?class=mwEmbed&debug=true"></script>
8 - <!-- <script type="text/javascript" src="../mwEmbed.js?debug=true"></script> -->
 7+ <!--<script type="text/javascript" src="../jsScriptLoader.php?class=mwEmbed&debug=true"></script> -->
 8+ <script type="text/javascript" src="../mwEmbed.js?debug=true"></script>
99 </head>
1010 <script type="text/javascript">
1111 </script>
Index: branches/js2-work/phase3/js2/mwEmbed/libEmbedPlayer/embedPlayer.js
@@ -370,16 +370,19 @@
371371 }
372372 }
373373
374 - // Firefox gives bogus css values if video has not loaded metadata yet:
375 - // But it does set attr to -1 so we check that and delay
376 - // swaping in the player interface which calls playerSize
 374+ // Firefox gives 300x150 css values OR -1 if video has not loaded metadata yet:
 375+ // We check that and delay swaping in the player interface
377376 var waitForMeta = (
378377 (
379 - $j(element).attr('width') == -1 ||
380 - $j(element).attr('height') == -1
381 - )
 378+ (
 379+ $j(element).attr('width') == -1 ||
 380+ $j(element).attr('height') == -1
 381+ )
 382+ ||
 383+ ( this.height == 150 && this.width == 300 )
 384+ )
382385 &&
383 - // If media has video/audio "sources" wait for meta
 386+ // If media has video/audio "sources" wait for meta:
384387 (
385388 $j(element).attr('src') ||
386389 $j(element).find("source[src]").filter('[type^=video],[type^=audio]').length != 0
@@ -619,9 +622,9 @@
620623
621624 /**
622625 * Update Source title via Element
623 - * @param Element:
 626+ * @param {Element} element Source element to update attributes from
624627 */
625 - updateSource:function( element ) {
 628+ updateSource: function( element ) {
626629 // for now just update the title:
627630 if ( $j( element ).attr( "title" ) )
628631 this.title = $j( element ).attr( "title" );
@@ -632,7 +635,7 @@
633636 * @param {String} start_time: in NPT format
634637 * @param {String} end_time: in NPT format
635638 */
636 - updateSrcTime:function ( start_npt, end_npt ) {
 639+ updateSrcTime: function ( start_npt, end_npt ) {
637640 // mw.log("f:updateSrcTime: "+ start_npt+'/'+ end_npt + ' from org: ' + this.start_npt+ '/'+this.end_npt);
638641 // mw.log("pre uri:" + this.src);
639642 // if we have time we can use:
@@ -722,8 +725,8 @@
723726 },
724727
725728 /** Index accessor function.
726 - @return the source's index within the enclosing mediaElement container.
727 - @type Integer
 729+ * @return the source's index within the enclosing mediaElement container.
 730+ * @type Integer
728731 */
729732 getIndex : function() {
730733 return this.index;
@@ -803,8 +806,7 @@
804807 * @param {element} video_element <video> element used for initialization.
805808 * @constructor
806809 */
807 -function mediaElement( element )
808 -{
 810+function mediaElement( element ){
809811 this.init( element );
810812 };
811813
@@ -1277,16 +1279,10 @@
12781280 *
12791281 * @param {Element} element Source element to grab size from
12801282 */
1281 - setPlayerSize:function( element ){
 1283+ setPlayerSize:function( element ){
12821284 this['height'] = parseInt( $j(element).css( 'height' ).replace( 'px' , '' ) );
1283 - this['width'] = parseInt( $j(element).css( 'width' ).replace( 'px' , '' ) );
 1285+ this['width'] = parseInt( $j(element).css( 'width' ).replace( 'px' , '' ) );
12841286
1285 - // Special case of default mozilla video tag size (use our default instead of 150x300 )
1286 - if( this.height == 150 && this.width == 300 ){
1287 - this.height = null;
1288 - this.width = null;
1289 - }
1290 -
12911287 if( ! this['height'] && ! this['width'] ){
12921288 this['height'] = parseInt( $j(element).attr( 'height' ) );
12931289 this['width'] = parseInt( $j(element).attr( 'width' ) );
@@ -1304,9 +1300,9 @@
13051301 }
13061302
13071303 // On load sometimes attr is temporally -1 as we don't have video metadata yet.
1308 - // NOTE: this edge case should be hanndled by waiting for metadata
1309 - // in browsers that support metadata for the selected video type.
1310 - if( this['height'] == -1 || this['width'] == -1 ){
 1304+ // NOTE: this edge case should be handled by waiting for metadata see: "waitForMeta" in addElement
 1305+ if( ( !this['height'] || !this['width'] ) ||
 1306+ ( this['height'] == -1 || this['width'] == -1 ) ){
13111307 var defaultSize = mw.getConfig( 'video_size' ).split( 'x' );
13121308 this['width'] = defaultSize[0];
13131309 // Special height default for audio tag ( if not set )
@@ -2327,7 +2323,7 @@
23282324 'top' : ( loc.top + playerHeight + 4) + 'px',
23292325 'left' : ( parseInt( loc.left ) + parseInt( _this.width ) - 200) + 'px',
23302326 'height' : '200px',
2331 - 'width' : '200px',
 2327+ 'width' : '200px'
23322328 } ).hide()
23332329 );
23342330 }
@@ -2575,8 +2571,9 @@
25762572 * seeking =false
25772573 * paused = false
25782574 * Updates pause button
 2575+ * Starts the "monitor"
25792576 */
2580 - play : function() {
 2577+ play: function() {
25812578 var eid = ( this.pc != null ) ? this.pc.pp.id:this.id;
25822579
25832580 // check if thumbnail is being displayed and embed html
@@ -2599,8 +2596,7 @@
26002597 $j( '#' + eid + ' .play-btn span' ).removeClass( 'ui-icon-play' ).addClass( 'ui-icon-pause' );
26012598 $j( '#' + eid + ' .play-btn' ).unbind().btnBind().click( function() {
26022599 $j( '#' + eid ).get( 0 ).pause();
2603 - } ).attr( 'title', gM( 'mwe-pause_clip' ) );
2604 -
 2600+ } ).attr( 'title', gM( 'mwe-pause_clip' ) );
26052601 },
26062602
26072603 /**
Index: branches/js2-work/phase3/js2/mwEmbed/libEmbedPlayer/vlcEmbed.js
@@ -4,7 +4,11 @@
55 * assume version > 0.8.5.1
66 */
77 var vlcEmbed = {
 8+
 9+ //Instance Name:
810 instanceOf : 'vlcEmbed',
 11+
 12+ //What the vlc player / plug-in supports:
913 supports : {
1014 'play_head':true,
1115 'pause':true,
@@ -16,18 +20,30 @@
1721 'playlist_driver':true, // if the object supports playlist functions
1822 'overlay':false
1923 },
20 - // init vars:
21 - monitorTimerId : 0,
 24+
 25+ // The previus state of the player instance
2226 prevState : 0,
23 - pejs_count:0, // post embed js count
24 -
 27+
 28+ // Counter for waiting for vlc embed to be ready
 29+ waitForVlcCount:0,
 30+
 31+ /**
 32+ * Get embed HTML
 33+ */
2534 getEmbedHTML: function() {
 35+ var _this = this;
2636 // give VLC 150ms to initialize before we start playback
2737 // @@todo should be able to do this as an ready event
28 - this.pejs_count = 0;
29 - setTimeout( 'document.getElementById(\'' + this.id + '\').postEmbedJS()', 150 );
 38+ this.waitForVlcCount = 0;
 39+ setTimeout( function(){
 40+ _this.postEmbedJS();
 41+ }, 150 );
3042 return this.getEmbedObj();
3143 },
 44+
 45+ /**
 46+ * Function to get embed object code
 47+ */
3248 getEmbedObj:function() {
3349 var embed_code = '<object classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" ' +
3450 'codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab#Version=0,8,6,0" ' +
@@ -50,73 +66,84 @@
5167 return embed_code;
5268 },
5369
54 - /*
55 - * some java script to start vlc playback after the embed:
 70+ /**
 71+ * Javascript to run post vlc embedding
 72+ * Inserts the requested src to the embed instance
5673 */
5774 postEmbedJS: function() {
58 - // load a pointer to the vlc into the object (this.vlc)
59 - this.getVLC();
60 - if ( this.vlc.log ) {
 75+ var _this = this;
 76+ // load a pointer to the vlc into the object (this.playerElement)
 77+ this.getPlayerElement();
 78+ if ( this.playerElement.log ) {
6179 // manipulate the dom object to make sure vlc has the correct size:
62 - this.vlc.style.width = this.width;
63 - this.vlc.style.height = this.height;
64 - this.vlc.playlist.items.clear();
 80+ this.playerElement.style.width = this.width;
 81+ this.playerElement.style.height = this.height;
 82+ this.playerElement.playlist.items.clear();
6583 var src = mw.absoluteUrl( this.getSrc() ) ;
6684 // @@todo if client supports seeking no need to send seek_offset to URI
6785 mw.log( 'vlc play::' + src );
68 - var itemId = this.vlc.playlist.add( src );
 86+ var itemId = this.playerElement.playlist.add( src );
6987 if ( itemId != -1 ) {
70 - // play
71 - this.vlc.playlist.playItem( itemId );
 88+ // Play
 89+ this.playerElement.playlist.playItem( itemId );
7290 } else {
7391 mw.log( "error:cannot play at the moment !" );
74 - }
75 - // if controls enabled start up javascript interface and monitor:
76 - if ( this.controls ) {
77 - // activate the slider: scriptaculus based)
78 - // this.activateSlider();
79 - // start doing status updates every 1/10th of a second
80 - }
81 - setTimeout( '$j(\'#' + this.id + '\').get(0).monitor()', 100 );
 92+ }
 93+ setTimeout( function(){
 94+ _this.monitor();
 95+ }, 100 );
8296 } else {
8397 mw.log( 'postEmbedJS:vlc not ready' );
84 - this.pejs_count++;
85 - if ( this.pejs_count < 10 ) {
86 - setTimeout( 'document.getElementById(\'' + this.id + '\').postEmbedJS()', 100 );
 98+ this.waitForVlcCount++;
 99+ if ( this.waitForVlcCount < 10 ) {
 100+ setTimeout( function(){
 101+ _this.postEmbedJS();
 102+ }, 100 );
87103 } else {
88104 mw.log( 'vlc never ready' );
89105 }
90106 }
91107 },
92 - // disable local seeking (while we don't know what we have avaliable)
93 - doSeek : function( perc ) {
94 - this.getVLC();
 108+
 109+ /**
 110+ * Handles seek requests based on temporal media source type support
 111+ *
 112+ * @param {Float} percent Seek to this percent of the stream
 113+ */
 114+ doSeek : function( percent ) {
 115+ this.getPlayerElement();
95116 if ( this.supportsURLTimeEncoding() ) {
96 - this.parent_doSeek( perc );
97 - } else if ( this.vlc ) {
 117+ this.parent_doSeek( percent );
 118+ } else if ( this.playerElement ) {
98119 this.seeking = true;
99 - mw.log( "do vlc http seek to: " + perc )
100 - if ( ( this.vlc.input.state == 3 ) && ( this.vlc.input.position != perc ) )
 120+ mw.log( "do vlc http seek to: " + percent )
 121+ if ( ( this.playerElement.input.state == 3 ) && ( this.playerElement.input.position != percent ) )
101122 {
102 - this.vlc.input.position = perc;
 123+ this.playerElement.input.position = percent;
103124 this.setStatus( 'seeking...' );
104125 }
105126 } else {
106 - this.doPlayThenSeek( perc );
 127+ this.doPlayThenSeek( percent );
107128 }
108129 this.parent_monitor();
109130 },
110 - doPlayThenSeek:function( perc ) {
 131+
 132+ /**
 133+ * Issues a play request then seeks to a given time
 134+ *
 135+ * @param {Float} percent Seek to this percent of the stream after playing
 136+ */
 137+ doPlayThenSeek:function( percent ) {
111138 mw.log( 'doPlayThenSeekHack' );
112139 var _this = this;
113140 this.play();
114141 var rfsCount = 0;
115142 var readyForSeek = function() {
116 - _this.getVLC();
117 - var newState = _this.vlc.input.state;
 143+ _this.getPlayerElement();
 144+ var newState = _this.playerElement.input.state;
118145 // if playing we are ready to do the
119146 if ( newState == 3 ) {
120 - _this.doSeek( perc );
 147+ _this.doSeek( percent );
121148 } else {
122149 // try to get player for 10 seconds:
123150 if ( rfsCount < 200 ) {
@@ -128,25 +155,22 @@
129156 }
130157 }
131158 readyForSeek();
132 - },
133 - playMovieAt: function ( order ) {
134 - // @@todo add clips to playlist after (order) and then play
135 - this.play();
136 - },
137 - /*
138 - * updates the status time
 159+ },
 160+
 161+ /**
 162+ * Updates the status time and player state
139163 */
140164 monitor: function() {
141 - this.getVLC();
142 - if ( !this.vlc )
 165+ this.getPlayerElement();
 166+ if ( !this.playerElement )
143167 return ;
144 - if ( this.vlc.log ) {
145 - // mw.log( 'state:' + this.vlc.input.state);
146 - // mw.log('time: ' + this.vlc.input.time);
147 - // mw.log('pos: ' + this.vlc.input.position);
148 - if ( this.vlc.log.messages.count > 0 ) {
 168+ if ( this.playerElement.log ) {
 169+ // mw.log( 'state:' + this.playerElement.input.state);
 170+ // mw.log('time: ' + this.playerElement.input.time);
 171+ // mw.log('pos: ' + this.playerElement.input.position);
 172+ if ( this.playerElement.log.messages.count > 0 ) {
149173 // there is one or more messages in the log
150 - var iter = this.vlc.log.messages.iterator();
 174+ var iter = this.playerElement.log.messages.iterator();
151175 while ( iter.hasNext ) {
152176 var msg = iter.next();
153177 var msgtype = msg.type.toString();
@@ -156,9 +180,9 @@
157181 }
158182 }
159183 // clear the log once finished to avoid clogging
160 - this.vlc.log.messages.clear();
 184+ this.playerElement.log.messages.clear();
161185 }
162 - var newState = this.vlc.input.state;
 186+ var newState = this.playerElement.input.state;
163187 if ( this.prevState != newState ) {
164188 if ( newState == 0 )
165189 {
@@ -180,8 +204,7 @@
181205 // current media is now playing
182206 this.onPlay();
183207 }
184 - else if ( this.vlc.input.state == 4 )
185 - {
 208+ else if ( this.playerElement.input.state == 4 ){
186209 // current media is now paused
187210 this.onPause();
188211 }
@@ -194,7 +217,11 @@
195218 // update the status and check timmer via universal parent monitor
196219 this.parent_monitor();
197220 },
198 - /* events */
 221+
 222+ /**
 223+ * Events:
 224+ * @@note: should be localized:
 225+ */
199226 onOpen: function() {
200227 this.setStatus( "Opening..." );
201228 },
@@ -203,17 +230,16 @@
204231 },
205232 onPlay: function() {
206233 this.onPlaying();
207 - },
208 - liveFeedRoll: 0,
 234+ },
209235 onPlaying: function() {
210236 this.seeking = false;
211237 // for now trust the duration from url over vlc input.length
212 - if ( !this.getDuration() && this.vlc.input.length > 0 )
 238+ if ( !this.getDuration() && this.playerElement.input.length > 0 )
213239 {
214 - // mw.log('setting duration to ' + this.vlc.input.length /1000);
215 - this.duration = this.vlc.input.length / 1000;
 240+ // mw.log('setting duration to ' + this.playerElement.input.length /1000);
 241+ this.duration = this.playerElement.input.length / 1000;
216242 }
217 - this.currentTime = this.vlc.input.time / 1000;
 243+ this.currentTime = this.playerElement.input.time / 1000;
218244 },
219245 onPause: function() {
220246 this.parent_pause(); // update the inteface if paused via native control
@@ -223,75 +249,91 @@
224250 if ( !this.seeking )
225251 this.onClipDone();
226252 },
227 - /* js hooks/controls */
 253+
 254+ /**
 255+ * Handles play requests
 256+ */
228257 play : function() {
229 - mw.log( 'f:vlcPlay' );
230 - this.getVLC();
231 - // call the parent
 258+ mw.log( 'f:vlcPlay' );
 259+ // Call the parent
232260 this.parent_play();
233 - if ( this.vlc ) {
 261+ if ( this.getPlayerElement() ) {
234262 // plugin is already being present send play call:
235263 // clear the message log and enable error logging
236 - if ( this.vlc.log ) {
237 - this.vlc.log.messages.clear();
 264+ if ( this.playerElement.log ) {
 265+ this.playerElement.log.messages.clear();
238266 }
239 - if ( this.vlc.playlist )
240 - this.vlc.playlist.play();
 267+ if ( this.playerElement.playlist && typeof this.playerElement.playlist.play == 'function')
 268+ this.playerElement.playlist.play();
241269
 270+ if( typeof this.playerElement.play == 'function' )
 271+ this.playerElement.play();
 272+
 273+ this.paused = false;
 274+
 275+ // re-start the monitor:
242276 this.monitor();
243 - this.paused = false;
244277 }
245278 },
246 - stop : function() {
247 - if ( this.vlc ) {
248 - if ( typeof this.vlc != 'undefined' ) {
249 - if ( typeof this.vlc.playlist != 'undefined' ) {
250 - // dont' stop (issues all the plugin-stop actions)
251 - // this.vlc.playlist.stop();
252 - if ( this.monitorTimerId != 0 )
253 - {
254 - clearInterval( this.monitorTimerId );
255 - this.monitorTimerId = 0;
256 - }
257 - }
258 - }
259 - }
260 - // this.onStop();
261 - // do parent stop
262 - this.parent_stop();
263 - },
 279+
 280+ /**
 281+ * Passes the Pause request to the plugin.
 282+ * calls parent "pause" to update interface
 283+ */
264284 pause : function() {
265285 this.parent_pause(); // update the interface if paused via native control
266 - if ( this.vlc ) {
267 - this.vlc.playlist.togglePause();
 286+ if ( this.getPlayerElement() ) {
 287+ this.playerElement.playlist.togglePause();
268288 }
269289 },
 290+
 291+ /**
 292+ * Mutes the video
 293+ * calls parent "toggleMute" to update interface
 294+ */
270295 toggleMute:function() {
271296 this.parent_toggleMute();
272 - this.getVLC();
273 - if ( this.vlc )
274 - this.vlc.audio.toggleMute();
 297+ if ( this.getPlayerElement() )
 298+ this.playerElement.audio.toggleMute();
275299 },
276 - // @@ Support UpDateVolumen
277 - updateVolumen:function( perc ) {
278 - this.getVLC();
279 - if ( this.vlc )
280 - this.vlc.audio.volume = perc * 100;
 300+
 301+ /**
 302+ * Update the player volume
 303+ * @pram {Float} percent Percet of total volume
 304+ */
 305+ updateVolumen:function( percent ) {
 306+ if ( this.getPlayerElement() )
 307+ this.playerElement.audio.volume = percent * 100;
281308 },
282 - // @@ Get Volumen
283 - getVolumen:function() {
284 - this.getVLC();
285 - if ( this.vlc )
286 - return this.vlc.audio.volume / 100;
 309+
 310+ /**
 311+ * Gets the current volume
 312+ * @return percent Percet of total volume
 313+ * @type {Float}
 314+ */
 315+ getVolumen:function() {
 316+ if ( this.getPlayerElement() )
 317+ return this.playerElement.audio.volume / 100;
287318 },
 319+
 320+ /**
 321+ * Passes fullscreen request to plugin
 322+ */
288323 fullscreen : function() {
289 - if ( this.vlc ) {
290 - if ( this.vlc.video )
291 - this.vlc.video.toggleFullscreen();
 324+ if ( this.playerElement ) {
 325+ if ( this.playerElement.video )
 326+ this.playerElement.video.toggleFullscreen();
292327 }
293 - },
294 - // get the embed vlc object
295 - getVLC : function() {
296 - this.vlc = $j('#' + this.pid ).get(0);
 328+ },
 329+
 330+ /**
 331+ * Get the embed vlc object
 332+ */
 333+ getPlayerElement : function() {
 334+ this.playerElement = $j('#' + this.pid ).get(0);
 335+ if( this.playerElement )
 336+ return true;
 337+ else
 338+ return false;
297339 }
298340 };
Index: branches/js2-work/phase3/js2/mwEmbed/libEmbedPlayer/nativeEmbed.js
@@ -21,7 +21,7 @@
2222 // NOTE: this bug workaround may no longer be applicable
2323 urlAppend:'',
2424
25 - // The previus "currentTime" to snif seek actions
 25+ // The previous "currentTime" to sniff seek actions
2626 // NOTE the bug where onSeeked does not seem fire consistently may no longer be applicable
2727 prevCurrentTime: -1,
2828
@@ -36,6 +36,7 @@
3737 'overlays':true,
3838 'playlist_swap_loader':true // if the object supports playlist functions
3939 },
 40+
4041 /**
4142 * Wraps the embed object and returns the output
4243 */
@@ -47,7 +48,7 @@
4849 },
4950
5051 /**
51 - * Get the native embeed code
 52+ * Get the native embed code
5253 */
5354 getEmbedObj:function() {
5455 // We want to let mwEmbed handle the controls so notice the absence of control attribute
Index: branches/js2-work/phase3/js2/mwEmbed/php/languages/mwEmbed.i18n.php
@@ -340,6 +340,7 @@
341341 * js file: /skins/kskin/kskin.js
342342 */
343343 'mwe-credit-title' => 'Title: $1',
 344+ 'mwe-kaltura-platform-title' => 'Kaltura open source video platform',
344345
345346 /*
346347 * js file: /libEmbedPlayer/embedPlayer.js
Index: branches/js2-work/phase3/js2/mwEmbed/skins/kskin/kskinConfig.js
@@ -53,6 +53,11 @@
5454 var menuOffset = ( embedObj.getPlayerHeight() < ctrlObj.getOverlayHeight() ) ?
5555 'top:' + ( embedObj.getPlayerHeight() + ctrlObj.getControlBarHeight() ) + 'px;' : '';
5656
 57+ // Special common overflow hack:
 58+ // NOTE: should refactor to just append menu to top body when it does not "fit" in the player
 59+ if( menuOffset != '' )
 60+ $j( embedObj ).parents( '.thumbinner' ).css( 'overflow', 'visible' );
 61+
5762 var o = '' +
5863 '<div class="k-menu ui-widget-content" ' +
5964 'style="width:' + ctrlObj.getOverlayWidth() + 'px; height:' + ctrlObj.getOverlayHeight() + 'px;' + menuOffset + '">' +
@@ -126,8 +131,8 @@
127132 } );
128133 $tp.find( '.play-btn-large' ).fadeOut( 'fast' );
129134 }
130 - } );
131 -
 135+ } );
 136+
132137 },
133138
134139 /**
@@ -140,11 +145,13 @@
141146 var embedObj = this.embedObj;
142147 if ( $j( '#' + embedObj.id + ' .k-menu' ).length != 0 )
143148 return false;
144 -
 149+
 150+
145151 $tp.find( '.' + _this.parentClass ).prepend(
146152 _this.components[ 'options_menu' ].o( _this )
147 - );
 153+ );
148154
 155+
149156 // By default its hidden:
150157 $tp.find( '.k-menu' ).hide();
151158
Index: branches/js2-work/phase3/js2/mwEmbed/skins/kskin/playerSkin.css
@@ -60,8 +60,10 @@
6161 background-position: -16px -17px;
6262 }
6363
64 -.k-player .control-bar {
65 - border: 0px;
 64+.k-player .control-bar {
 65+ border:1px solid #c8c8c8;
 66+ border-top: 0px;
 67+ border-right: 0px;
6668 height: 21px;
6769 padding: 2px 0 0 6px;
6870 margin-top: 0px;
@@ -123,7 +125,7 @@
124126 cursor: pointer;
125127 float: right;
126128 list-style: none outside none;
127 - margin: 2px;
 129+ margin: 1px;
128130 padding: 0px 0;
129131 width: 23px;
130132 height: 16px;
Index: branches/js2-work/phase3/js2/mwEmbed/skins/ctrlBuilder.js
@@ -19,7 +19,7 @@
2020 // Parent css Class name
2121 parentClass : 'mv-player',
2222
23 - // Long string dsipaly of time value
 23+ // Long string display of time value
2424 long_time_disp: true,
2525
2626 // If the options menu outside of player
@@ -303,7 +303,7 @@
304304 }
305305
306306 // If the resolution is too small don't display the warning
307 - if( this.embedObj.getPlayerHeight < 199 )
 307+ if( this.embedObj.getPlayerHeight() < 199 )
308308 return false;
309309
310310 // See if we have native support for ogg:
@@ -484,6 +484,18 @@
485485 },
486486
487487 /**
 488+ * The options button, invokes display of the options menu
 489+ */
 490+ 'options': {
 491+ 'w':26,
 492+ 'o':function( ctrlObj ) {
 493+ return '<div title="' + gM( 'mwe-player_options' ) + '" class="ui-state-default ui-corner-all ui-icon_link rButton options-btn">' +
 494+ '<span class="ui-icon ui-icon-wrench"></span>' +
 495+ '</div>';
 496+ }
 497+ },
 498+
 499+ /**
488500 * The fullscreen button for displaying the video fullscreen
489501 */
490502 'fullscreen': {
@@ -495,17 +507,6 @@
496508 }
497509 },
498510
499 - /**
500 - * The options button, invokes display of the options menu
501 - */
502 - 'options': {
503 - 'w':26,
504 - 'o':function( ctrlObj ) {
505 - return '<div title="' + gM( 'mwe-player_options' ) + '" class="ui-state-default ui-corner-all ui-icon_link rButton options-btn">' +
506 - '<span class="ui-icon ui-icon-wrench"></span>' +
507 - '</div>';
508 - }
509 - },
510511
511512 /**
512513 * The pause button
Index: branches/js2-work/phase3/js2/mwEmbed/mwEmbed.js
@@ -2222,8 +2222,10 @@
22232223 }
22242224 // Preserve any existing window.onload binding:
22252225 var mwOriginalOnLoad;
2226 -if ( window.onload && typeof window.onload == 'function' ) {
 2226+var mwOrgLoadCheck = false;
 2227+if ( window.onload && typeof window.onload == 'function' && !mwOrgLoadCheck) {
22272228 mwOriginalOnLoad = window.onload;
 2229+ mwOrgLoadCheck = true;
22282230 }
22292231 // Use the onload method as a backup:
22302232 window.onload = function () {
Index: branches/js2-work/phase3/js2/mwEmbed/libTimedText/mw.timedText.js
@@ -44,8 +44,8 @@
4545 mw.log("TimedText:ShowMenu");
4646 // Get local refrence to all timed text sources
4747 var cat = this.embedPlayer;
48 - //var sources = this.embedPlayer.mediaElement.getSources( 'text' );
49 - //
 48+ var sources = this.embedPlayer.mediaElement.getSources( 'text' );
 49+ debugger;
5050 }
5151
5252 }

Status & tagging log