[Webkit-unassigned] [Bug 70061] New: Feature request: a way to schedule callbacks without relying on setTimeout
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Oct 13 15:04:21 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=70061
Summary: Feature request: a way to schedule callbacks without
relying on setTimeout
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: Web Audio
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: smus at google.com
CC: crogers at google.com
To do things like scheduling playback of multiple tracks into the future, currently need to rely on setTimeout calls, as in the following example:
var duration = bufferNowPlaying.duration;
ctx.timer = setTimeout(function() {
playNextSong(bufferToPlayNext);
}, duration * 1000);
setTimeout is not precise, especially if dealing with a page that isn't in the foreground. Since Web Audio provides an accurate timing engine, we should use that instead!
For example, we could have a method scheduleCallbackAtTime(time, function) on the AudioContext, that would take a time (in ms) and a callback function to call at that precise time.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list