File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ $(DIST_DIR)/lib/libexpat.a: build/lib/expat/configured
70
70
emmake make install
71
71
72
72
build/lib/brotli/js/decode.js : build/lib/brotli/configured
73
+ build/lib/brotli/js/polyfill.js : build/lib/brotli/configured
73
74
build/lib/brotli/configured : lib/brotli $(wildcard $(BASE_DIR ) build/patches/brotli/* .patch)
74
75
rm -rf build/lib/brotli
75
76
cp -r lib/brotli build/lib/brotli
@@ -325,10 +326,11 @@ dist/js/subtitles-octopus-worker.js: src/subtitles-octopus-worker.bc src/pre-wor
325
326
-s WASM=1 \
326
327
$(EMCC_COMMON_ARGS )
327
328
328
- dist/js/subtitles-octopus-worker-legacy.js : src/subtitles-octopus-worker.bc src/polyfill.js src/pre-worker.js src/SubOctpInterface.js src/post-worker.js build/lib/brotli/js/decode.js
329
+ dist/js/subtitles-octopus-worker-legacy.js : src/subtitles-octopus-worker.bc src/polyfill.js src/pre-worker.js src/SubOctpInterface.js src/post-worker.js build/lib/brotli/js/decode.js build/lib/brotli/js/polyfill.js
329
330
mkdir -p dist/js
330
331
emcc src/subtitles-octopus-worker.bc $(OCTP_DEPS ) \
331
332
--pre-js src/polyfill.js \
333
+ --pre-js build/lib/brotli/js/polyfill.js \
332
334
--pre-js src/pre-worker.js \
333
335
--pre-js build/lib/brotli/js/decode.js \
334
336
--post-js src/SubOctpInterface.js \
Original file line number Diff line number Diff line change @@ -22,6 +22,33 @@ if (!String.prototype.includes) {
22
22
} ;
23
23
}
24
24
25
+ if ( ! ArrayBuffer . isView ) {
26
+ var typedArrays = [
27
+ Int8Array ,
28
+ Uint8Array ,
29
+ Uint8ClampedArray ,
30
+ Int16Array ,
31
+ Uint16Array ,
32
+ Int32Array ,
33
+ Uint32Array ,
34
+ Float32Array ,
35
+ Float64Array
36
+ ] ;
37
+
38
+ ArrayBuffer . isView = function ( obj ) {
39
+ return obj && obj . constructor && typedArrays . indexOf ( obj . constructor ) !== - 1 ;
40
+ } ;
41
+ }
42
+
43
+ if ( ! Int8Array . prototype . slice ) {
44
+ Object . defineProperty ( Int8Array . prototype , 'slice' , {
45
+ value : function ( begin , end )
46
+ {
47
+ return new Int8Array ( this . subarray ( begin , end ) ) ;
48
+ }
49
+ } ) ;
50
+ }
51
+
25
52
if ( ! Uint8Array . prototype . slice ) {
26
53
Object . defineProperty ( Uint8Array . prototype , 'slice' , {
27
54
value : function ( begin , end )
You can’t perform that action at this time.
0 commit comments