mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 17:01:20 -08:00
Fix some ie bug
This commit is contained in:
1 parent
b6d3bb505b
commit
105608ee25
4 files changed
+6
-4
No files matched your search
@@ -13,7 +13,7 @@ export default function playMix(art, player) {
|
||||
value() {
|
||||
const promise = $video.play();
|
||||
|
||||
if (promise.then) {
|
||||
if (promise && promise.then) {
|
||||
promise.then().catch((err) => {
|
||||
notice.show = err;
|
||||
throw err;
|
||||
|
||||
@@ -111,6 +111,7 @@ export default class Subtitle extends Component {
|
||||
return fetch(url)
|
||||
.then((response) => response.arrayBuffer())
|
||||
.then((buffer) => {
|
||||
if (!window.TextDecoder) return;
|
||||
const decoder = new TextDecoder(opt.encoding || subtitle.encoding);
|
||||
const text = decoder.decode(buffer);
|
||||
|
||||
|
||||
Reference in new issue
Block a user