aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/library_openal.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/library_openal.js b/src/library_openal.js
index 2166a712..992b2557 100644
--- a/src/library_openal.js
+++ b/src/library_openal.js
@@ -288,7 +288,8 @@ var LibraryOpenAL = {
src.buffer = AL.currentContext.src[source - 1].buffer;
src.connect(AL.currentContext.src[source - 1].gain);
src.start(0, offset);
- AL.currentContext.src[source - 1].playTime = AL.currentContext.ctx.currentTime;
+ // Work around Firefox bug 851338
+ AL.currentContext.src[source - 1].playTime = AL.currentContext.ctx.currentTime || 0;
AL.currentContext.src[source - 1].paused = false;
AL.currentContext.src[source - 1]['src'] = src;
},
@@ -320,7 +321,8 @@ var LibraryOpenAL = {
if ("src" in AL.currentContext.src[source - 1] &&
!AL.currentContext.src[source - 1].paused) {
AL.currentContext.src[source - 1].paused = true;
- AL.currentContext.src[source - 1].pausedTime = AL.currentContext.ctx.currentTime;
+ // Work around Firefox bug 851338
+ AL.currentContext.src[source - 1].pausedTime = AL.currentContext.ctx.currentTime || 0;
AL.currentContext.src[source - 1]["src"].stop(0);
delete AL.currentContext.src[source - 1].src;
}