Skip to content

Commit 84cbab9

Browse files
authored
fix(VAST-69): Fix error this.player is null (#66)
* fix(VAST-69): fix this.player is null * compiled
1 parent 4d4e5bc commit 84cbab9

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

docs/demo.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/demo.js.map

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.js

+4
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,10 @@ class Vast extends Plugin {
455455
this.player.el().appendChild(skipButtonDiv);
456456
// update time
457457
this.skipInterval = setInterval(() => {
458+
if (!this.player) {
459+
this.clearSkipInterval();
460+
return;
461+
}
458462
skipRemainingTime = Math.round(skipDelay - this.player.currentTime());
459463
isSkippable = skipRemainingTime < 1;
460464
if (isSkippable) {

0 commit comments

Comments
 (0)