Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Bug 996410 - [Music] Use fastSeek API in Gaia Music app
Browse files Browse the repository at this point in the history
  • Loading branch information
justindarc committed Oct 2, 2015
1 parent abba7d1 commit 93f89c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/music/js/endpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ function stop() {
}

function seek(time) {
time = parseInt(time, 10);
audio.currentTime = time;
audio.fastSeek(parseInt(time, 10));
}

function startFastSeek(reverse) {
Expand All @@ -160,9 +159,11 @@ function startFastSeek(reverse) {

function fastSeek() {
if (!isFastSeeking) {
audio.volume = 1;
return;
}

audio.volume = 0.5;
seek(audio.currentTime + (reverse ? -2 : 2));
setTimeout(fastSeek, 50);
}
Expand Down

0 comments on commit 93f89c8

Please sign in to comment.