Skip to content

Commit

Permalink
safari: remove two-form load because it confuses safari
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffkaufman committed Feb 14, 2021
1 parent 0e8e879 commit 5c23723
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
4 changes: 0 additions & 4 deletions html/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ import {
ServerClockReference
} from './audiochunk.js';

// Work around some issues related to caching and error reporting
// by forcing this to load up top, before we try to 'addModule' it.
import './audio-worklet.js';

// We fall back exponentially until we find a good size, but we need a
// place to start that should be reasonably fair.
const INITIAL_MS_PER_BATCH = 600; // XXX 180; // XXX: probably make sure this is a multiple of our opus frame size (60ms), but it should in theory work without
Expand Down
11 changes: 0 additions & 11 deletions html/audio-worklet.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
// This trick allows us to load this file as a regular module, which in turn
// allows us to flush it from the cache when needed, as a workaround for
// https://bugs.chromium.org/p/chromium/issues/detail?id=880784 .
if (typeof AudioWorkletProcessor === "undefined") {
console.info("Audio worklet module preloading");
// If we are loaded as a regular module, skip the entire rest of the file
// (which will not be valid outside the audio worklet context).
} else {

// This gates all the logs that put references to REALLY HUGE objects into the console
// very frequently. When this is on, having the console open eventually causes the
// browser to lag severely and dev tools to lag/hang/crash. Don't use this unless
Expand Down Expand Up @@ -925,5 +916,3 @@ class Player extends AudioWorkletProcessor {
}

registerProcessor('player', Player);

}

0 comments on commit 5c23723

Please sign in to comment.