mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-18 02:21:20 -08:00
build all packages
This commit is contained in:
1 parent
9c5cbded93
commit
a3a3f01bcc
5 files changed
+6
-5
No files matched your search
@@ -9,6 +9,7 @@ import {
|
||||
escape,
|
||||
removeClass,
|
||||
hasClass,
|
||||
errorHandle,
|
||||
} from './utils';
|
||||
import Component from './utils/component';
|
||||
|
||||
@@ -111,7 +112,7 @@ export default class Subtitle extends Component {
|
||||
return fetch(url)
|
||||
.then((response) => response.arrayBuffer())
|
||||
.then((buffer) => {
|
||||
if (!window.TextDecoder) return;
|
||||
errorHandle(window.TextDecoder, 'TextDecoder not support');
|
||||
const decoder = new TextDecoder(opt.encoding || subtitle.encoding);
|
||||
const text = decoder.decode(buffer);
|
||||
|
||||
|
||||
Reference in new issue
Block a user