|
@@ -28,7 +28,7 @@ var Player = function(url, options) {
|
28
|
28
|
this.source.connect(this.demuxer);
|
29
|
29
|
|
30
|
30
|
if (!options.disableWebAssembly && JSMpeg.WASMModule.IsSupported()) {
|
31
|
|
- this.wasmModule = new JSMpeg.WASMModule();
|
|
31
|
+ this.wasmModule = JSMpeg.WASMModule.GetModule();
|
32
|
32
|
options.wasmModule = this.wasmModule;
|
33
|
33
|
}
|
34
|
34
|
|
|
@@ -73,7 +73,10 @@ var Player = function(url, options) {
|
73
|
73
|
// loading the source. Otherwise the decoders won't know what to do with
|
74
|
74
|
// the source data.
|
75
|
75
|
if (this.wasmModule) {
|
76
|
|
- if (JSMpeg.WASM_BINARY_INLINED) {
|
|
76
|
+ if (this.wasmModule.ready) {
|
|
77
|
+ this.startLoading();
|
|
78
|
+ }
|
|
79
|
+ else if (JSMpeg.WASM_BINARY_INLINED) {
|
77
|
80
|
var wasm = JSMpeg.Base64ToArrayBuffer(JSMpeg.WASM_BINARY_INLINED);
|
78
|
81
|
this.wasmModule.loadFromBuffer(wasm, this.startLoading.bind(this));
|
79
|
82
|
}
|