Skip to content

Commit adcadb3

Browse files
committed
code refactoring
1 parent c6c455b commit adcadb3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

app/public/js/common/playerService.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -242,24 +242,24 @@ app.factory('playerService', function($rootScope, $log, $timeout, notificationFa
242242
*/
243243
$(player.elPlayer).bind('timeupdate', function() {
244244

245-
var rem = parseInt(player.elPlayer.duration - player.elPlayer.currentTime, 10),
246-
pos = (player.elPlayer.currentTime / player.elPlayer.duration) * 100,
247-
mins = Math.floor(rem / 60,10),
248-
secs = rem - mins * 60;
245+
var rem = parseInt(player.elPlayer.duration - player.elPlayer.currentTime, 10);
246+
var pos = (player.elPlayer.currentTime / player.elPlayer.duration) * 100
247+
var mins = Math.floor(rem / 60,10);
248+
var secs = rem - mins * 60;
249249

250250
if ( !isNaN(mins) || !isNaN(secs) ) {
251251
$(player.elPlayerTimeLeft).text('-' + mins + ':' + (secs > 9 ? secs : '0' + secs));
252252
}
253253

254-
mins = Math.floor(player.elPlayer.currentTime / 60,10);
255-
secs = Math.floor(player.elPlayer.currentTime, 10) - mins * 60;
254+
mins = Math.floor(player.elPlayer.currentTime / 60,10);
255+
secs = Math.floor(player.elPlayer.currentTime, 10) - mins * 60;
256256

257257
if ( !isNaN(mins) || !isNaN(secs) ) {
258258
$(player.elPlayerTimeCurrent).text(mins + ':' + (secs >= 9 ? secs : '0' + secs));
259259
}
260260

261-
var mins = Math.floor(player.elPlayer.duration / 60,10),
262-
secs = Math.floor(player.elPlayer.duration, 10) - mins * 60;
261+
mins = Math.floor(player.elPlayer.duration / 60,10);
262+
secs = Math.floor(player.elPlayer.duration, 10) - mins * 60;
263263

264264
if ( !isNaN(mins) || !isNaN(secs) ) {
265265
$(player.elPlayerDuration).text(mins + ':' + (secs > 9 ? secs : '0' + secs));

0 commit comments

Comments
 (0)