fixed race condition that could cause two episodes to play simultaneously
This commit is contained in:
parent
5e14db0db0
commit
319d09708e
|
@ -120,6 +120,8 @@ var Player = /** @class */ (function () {
|
|||
return [4 /*yield*/, res.json()];
|
||||
case 1:
|
||||
link = _a.sent();
|
||||
if (this.howl)
|
||||
this.howl.unload();
|
||||
this.howl = new Howl({
|
||||
src: "".concat(link.url, "?Authorization=").concat(link.token),
|
||||
html5: true,
|
||||
|
|
|
@ -126,6 +126,7 @@ class Player {
|
|||
return;
|
||||
}
|
||||
const link = <UrlResponse>await res.json();
|
||||
if (this.howl) this.howl.unload();
|
||||
this.howl = new Howl({
|
||||
src: `${link.url}?Authorization=${link.token}`,
|
||||
html5: true,
|
||||
|
|
Loading…
Reference in New Issue