Commit 28dfed84 authored by liujiangnan's avatar liujiangnan

fix: 模板打不开

parent 4c3da6ad
...@@ -344,13 +344,14 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -344,13 +344,14 @@ export class PlayComponent implements OnInit, OnDestroy {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const audio = new Audio(); const audio = new Audio();
audio.oncanplay = (a) => { audio.oncanplay = (a) => {
resolve();
}; };
audio.onerror = () => { audio.onerror = () => {
reject(); reject();
}; };
audio.src = url; audio.src = url;
audio.load(); audio.load();
resolve();
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment