Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js |
— | — | @@ -617,7 +617,7 @@ |
618 | 618 | /** |
619 | 619 | * Get a time range from the media start and end time |
620 | 620 | * |
621 | | - * @return start_npt and end_npt time if present |
| 621 | + * @return startNpt and endNpt time if present |
622 | 622 | */ |
623 | 623 | getTimeRange: function() { |
624 | 624 | var end_time = (this.controlBuilder.longTimeDisp)? '/' + mw.seconds2npt( this.getDuration() ) : ''; |
— | — | @@ -628,10 +628,10 @@ |
629 | 629 | if ( !this.mediaElement.selectedSource ){ |
630 | 630 | return default_time_range; |
631 | 631 | } |
632 | | - if ( !this.mediaElement.selectedSource.end_npt ){ |
| 632 | + if ( !this.mediaElement.selectedSource.endNpt ){ |
633 | 633 | return default_time_range; |
634 | 634 | } |
635 | | - return this.mediaElement.selectedSource.start_npt + this.mediaElement.selectedSource.end_npt; |
| 635 | + return this.mediaElement.selectedSource.startNpt + this.mediaElement.selectedSource.endNpt; |
636 | 636 | }, |
637 | 637 | |
638 | 638 | /** |
— | — | @@ -698,7 +698,7 @@ |
699 | 699 | this.stop(); |
700 | 700 | this.didSeekJump = true; |
701 | 701 | // Make sure this.serverSeekTime is up-to-date: |
702 | | - this.serverSeekTime = mw.npt2seconds( this.start_npt ) + parseFloat( percent * this.getDuration() ); |
| 702 | + this.serverSeekTime = mw.npt2seconds( this.startNpt ) + parseFloat( percent * this.getDuration() ); |
703 | 703 | // Update the slider |
704 | 704 | this.updatePlayHead( percent ); |
705 | 705 | } |
— | — | @@ -961,27 +961,28 @@ |
962 | 962 | * Update the video time request via a time request string |
963 | 963 | * |
964 | 964 | * @param {String} |
965 | | - * time_req |
| 965 | + * timeRequest video time to be updated |
966 | 966 | */ |
967 | | - updateVideoTimeReq: function( time_req ) { |
968 | | - mw.log( 'EmbedPlayer::updateVideoTimeReq:' + time_req ); |
969 | | - var time_parts = time_req.split( '/' ); |
970 | | - this.updateVideoTime( time_parts[0], time_parts[1] ); |
| 967 | + updateVideoTimeReq: function( timeRequest ) { |
| 968 | + mw.log( 'EmbedPlayer::updateVideoTimeReq:' + timeRequest ); |
| 969 | + var timeParts = timeRequest.split( '/' ); |
| 970 | + this.updateVideoTime( timeParts[0], timeParts[1] ); |
971 | 971 | }, |
972 | 972 | |
973 | 973 | /** |
974 | | - * Update Video time from provided start_npt and end_npt values |
| 974 | + * Update Video time from provided startNpt and endNpt values |
975 | 975 | * |
976 | 976 | * @param {String} |
977 | | - * start_npt the new start time in npt format |
978 | | - * @pamra {String} end_npt the new end time in npt format |
| 977 | + * startNpt the new start time in npt format ( hh:mm:ss.ms ) |
| 978 | + * @pamra {String} |
| 979 | + * endNpt the new end time in npt format ( hh:mm:ss.ms ) |
979 | 980 | */ |
980 | | - updateVideoTime: function( start_npt, end_npt ) { |
| 981 | + updateVideoTime: function( startNpt, endNpt ) { |
981 | 982 | // update media |
982 | | - this.mediaElement.updateSourceTimes( start_npt, end_npt ); |
| 983 | + this.mediaElement.updateSourceTimes( startNpt, endNpt ); |
983 | 984 | |
984 | 985 | // update mv_time |
985 | | - this.controlBuilder.setStatus( start_npt + '/' + end_npt ); |
| 986 | + this.controlBuilder.setStatus( startNpt + '/' + endNpt ); |
986 | 987 | |
987 | 988 | // reset slider |
988 | 989 | this.updatePlayHead( 0 ); |
— | — | @@ -990,7 +991,7 @@ |
991 | 992 | if ( this.mediaElement.selectedSource.URLTimeEncoding ) { |
992 | 993 | this.serverSeekTime = 0; |
993 | 994 | } else { |
994 | | - this.serverSeekTime = mw.npt2seconds( start_npt ); |
| 995 | + this.serverSeekTime = mw.npt2seconds( startNpt ); |
995 | 996 | } |
996 | 997 | }, |
997 | 998 | |
— | — | @@ -1014,18 +1015,18 @@ |
1015 | 1016 | updateThumbTime:function( floatSeconds ) { |
1016 | 1017 | // mw.log('updateThumbTime:'+floatSeconds); |
1017 | 1018 | var _this = this; |
1018 | | - if ( typeof this.org_thum_src == 'undefined' ) { |
1019 | | - this.org_thum_src = this.poster; |
| 1019 | + if ( typeof this.orgThumSrc == 'undefined' ) { |
| 1020 | + this.orgThumSrc = this.poster; |
1020 | 1021 | } |
1021 | | - if ( this.org_thum_src.indexOf( 't=' ) !== -1 ) { |
1022 | | - this.last_thumb_url = mw.replaceUrlParams( this.org_thum_src, |
| 1022 | + if ( this.orgThumSrc.indexOf( 't=' ) !== -1 ) { |
| 1023 | + this.lastThumbUrl = mw.replaceUrlParams( this.orgThumSrc, |
1023 | 1024 | { |
1024 | 1025 | 't' : mw.seconds2npt( floatSeconds + parseInt( this.startOffset ) ) |
1025 | 1026 | } |
1026 | 1027 | ); |
1027 | 1028 | if ( !this.thumbnail_updating ) { |
1028 | | - this.updatePoster( this.last_thumb_url , false ); |
1029 | | - this.last_thumb_url = null; |
| 1029 | + this.updatePoster( this.lastThumbUrl , false ); |
| 1030 | + this.lastThumbUrl = null; |
1030 | 1031 | } |
1031 | 1032 | } |
1032 | 1033 | }, |
— | — | @@ -1095,9 +1096,9 @@ |
1096 | 1097 | _this.thumbnail_updating = false; |
1097 | 1098 | |
1098 | 1099 | // if we have a thumb queued update to that |
1099 | | - if ( _this.last_thumb_url ) { |
1100 | | - var src_url = _this.last_thumb_url; |
1101 | | - _this.last_thumb_url = null; |
| 1100 | + if ( _this.lastThumbUrl ) { |
| 1101 | + var src_url = _this.lastThumbUrl; |
| 1102 | + _this.lastThumbUrl = null; |
1102 | 1103 | _this.updatePosterSrc( src_url ); |
1103 | 1104 | } |
1104 | 1105 | } ); |
Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.MediaElement.js |
— | — | @@ -60,14 +60,14 @@ |
61 | 61 | * request argument (ie &t=start_time/end_time) |
62 | 62 | * |
63 | 63 | * @param {String} |
64 | | - * start_npt Start time in npt format |
| 64 | + * startNpt Start time in npt format |
65 | 65 | * @param {String} |
66 | | - * end_npt End time in npt format |
| 66 | + * endNpt End time in npt format |
67 | 67 | */ |
68 | | - updateSourceTimes: function( start_npt, end_npt ) { |
| 68 | + updateSourceTimes: function( startNpt, endNpt ) { |
69 | 69 | var _this = this; |
70 | 70 | $.each( this.sources, function( inx, mediaSource ) { |
71 | | - mediaSource.updateSrcTime( start_npt, end_npt ); |
| 71 | + mediaSource.updateSrcTime( startNpt, endNpt ); |
72 | 72 | } ); |
73 | 73 | }, |
74 | 74 | |
Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.MediaSource.js |
— | — | @@ -88,10 +88,10 @@ |
89 | 89 | id: null, |
90 | 90 | |
91 | 91 | // Start time in npt format |
92 | | - start_npt: null, |
| 92 | + startNpt: null, |
93 | 93 | |
94 | 94 | // End time in npt format |
95 | | - end_npt: null, |
| 95 | + endNpt: null, |
96 | 96 | |
97 | 97 | // Language of the file |
98 | 98 | srclang: null, |
— | — | @@ -189,23 +189,23 @@ |
190 | 190 | * @param {String} |
191 | 191 | * end_time: in NPT format |
192 | 192 | */ |
193 | | - updateSrcTime: function ( start_npt, end_npt ) { |
194 | | - // mw.log("f:updateSrcTime: "+ start_npt+'/'+ end_npt + ' from org: ' + |
195 | | - // this.start_npt+ '/'+this.end_npt); |
| 193 | + updateSrcTime: function ( startNpt, endNpt ) { |
| 194 | + // mw.log("f:updateSrcTime: "+ startNpt+'/'+ endNpt + ' from org: ' + |
| 195 | + // this.startNpt+ '/'+this.endNpt); |
196 | 196 | // mw.log("pre uri:" + this.src); |
197 | 197 | // if we have time we can use: |
198 | 198 | if ( this.URLTimeEncoding ) { |
199 | 199 | // make sure its a valid start time / end time (else set default) |
200 | | - if ( !mw.npt2seconds( start_npt ) ) { |
201 | | - start_npt = this.start_npt; |
| 200 | + if ( !mw.npt2seconds( startNpt ) ) { |
| 201 | + startNpt = this.startNpt; |
202 | 202 | } |
203 | 203 | |
204 | | - if ( !mw.npt2seconds( end_npt ) ) { |
205 | | - end_npt = this.end_npt; |
| 204 | + if ( !mw.npt2seconds( endNpt ) ) { |
| 205 | + endNpt = this.endNpt; |
206 | 206 | } |
207 | 207 | |
208 | 208 | this.src = mw.replaceUrlParams( this.src, { |
209 | | - 't': start_npt + '/' + end_npt |
| 209 | + 't': startNpt + '/' + endNpt |
210 | 210 | }); |
211 | 211 | |
212 | 212 | // update the duration |
— | — | @@ -221,8 +221,8 @@ |
222 | 222 | */ |
223 | 223 | setDuration: function ( duration ) { |
224 | 224 | this.duration = duration; |
225 | | - if ( !this.end_npt ) { |
226 | | - this.end_npt = mw.seconds2npt( this.startOffset + duration ); |
| 225 | + if ( !this.endNpt ) { |
| 226 | + this.endNpt = mw.seconds2npt( this.startOffset + duration ); |
227 | 227 | } |
228 | 228 | }, |
229 | 229 | |
— | — | @@ -252,8 +252,8 @@ |
253 | 253 | return this.src; |
254 | 254 | } |
255 | 255 | var endvar = ''; |
256 | | - if ( this.end_npt ) { |
257 | | - endvar = '/' + this.end_npt; |
| 256 | + if ( this.endNpt ) { |
| 257 | + endvar = '/' + this.endNpt; |
258 | 258 | } |
259 | 259 | return mw.replaceUrlParams( this.src, |
260 | 260 | { |
— | — | @@ -331,17 +331,17 @@ |
332 | 332 | var annoURL = new mw.Uri( mw.absoluteUrl( this.getSrc() ) ); |
333 | 333 | if ( annoURL.query.t ) { |
334 | 334 | var times = annoURL.query.t.split( '/' ); |
335 | | - this.start_npt = times[0]; |
336 | | - this.end_npt = times[1]; |
337 | | - this.startOffset = mw.npt2seconds( this.start_npt ); |
338 | | - this.duration = mw.npt2seconds( this.end_npt ) - this.startOffset; |
| 335 | + this.startNpt = times[0]; |
| 336 | + this.endNpt = times[1]; |
| 337 | + this.startOffset = mw.npt2seconds( this.startNpt ); |
| 338 | + this.duration = mw.npt2seconds( this.endNpt ) - this.startOffset; |
339 | 339 | } else { |
340 | 340 | // look for this info as attributes |
341 | 341 | if ( this.startOffset ) { |
342 | | - this.start_npt = mw.seconds2npt( this.startOffset ); |
| 342 | + this.startNpt = mw.seconds2npt( this.startOffset ); |
343 | 343 | } |
344 | 344 | if ( this.duration ) { |
345 | | - this.end_npt = mw.seconds2npt( parseInt( this.duration ) + parseInt( this.startOffset ) ); |
| 345 | + this.endNpt = mw.seconds2npt( parseInt( this.duration ) + parseInt( this.startOffset ) ); |
346 | 346 | } |
347 | 347 | } |
348 | 348 | } |