diff options
-rw-r--r-- | client/src/assets/player/shared/bezels/bezels-plugin.ts | 5 | ||||
-rw-r--r-- | client/src/assets/player/shared/upnext/end-card.ts | 2 | ||||
-rw-r--r-- | client/src/assets/player/shared/upnext/upnext-plugin.ts | 7 |
3 files changed, 10 insertions, 4 deletions
diff --git a/client/src/assets/player/shared/bezels/bezels-plugin.ts b/client/src/assets/player/shared/bezels/bezels-plugin.ts index 6afb2c6a3..cf07dbd2c 100644 --- a/client/src/assets/player/shared/bezels/bezels-plugin.ts +++ b/client/src/assets/player/shared/bezels/bezels-plugin.ts | |||
@@ -12,7 +12,10 @@ class BezelsPlugin extends Plugin { | |||
12 | player.addClass('vjs-bezels') | 12 | player.addClass('vjs-bezels') |
13 | }) | 13 | }) |
14 | 14 | ||
15 | player.addChild(new PauseBezel(player, options)) | 15 | const component = new PauseBezel(player, options) |
16 | player.addChild(component) | ||
17 | |||
18 | this.on('dispose', () => player.removeChild(component)) | ||
16 | } | 19 | } |
17 | } | 20 | } |
18 | 21 | ||
diff --git a/client/src/assets/player/shared/upnext/end-card.ts b/client/src/assets/player/shared/upnext/end-card.ts index 16883603e..798a88db1 100644 --- a/client/src/assets/player/shared/upnext/end-card.ts +++ b/client/src/assets/player/shared/upnext/end-card.ts | |||
@@ -31,7 +31,7 @@ export interface EndCardOptions extends videojs.ComponentOptions, UpNextPluginOp | |||
31 | } | 31 | } |
32 | 32 | ||
33 | const Component = videojs.getComponent('Component') | 33 | const Component = videojs.getComponent('Component') |
34 | class EndCard extends Component { | 34 | export class EndCard extends Component { |
35 | options_: EndCardOptions | 35 | options_: EndCardOptions |
36 | 36 | ||
37 | dashOffsetTotal = 586 | 37 | dashOffsetTotal = 586 |
diff --git a/client/src/assets/player/shared/upnext/upnext-plugin.ts b/client/src/assets/player/shared/upnext/upnext-plugin.ts index 0badcd68c..45688978c 100644 --- a/client/src/assets/player/shared/upnext/upnext-plugin.ts +++ b/client/src/assets/player/shared/upnext/upnext-plugin.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import videojs from 'video.js' | 1 | import videojs from 'video.js' |
2 | import { UpNextPluginOptions } from '../../types' | 2 | import { UpNextPluginOptions } from '../../types' |
3 | import { EndCardOptions } from './end-card' | 3 | import { EndCard, EndCardOptions } from './end-card' |
4 | 4 | ||
5 | const Plugin = videojs.getPlugin('plugin') | 5 | const Plugin = videojs.getPlugin('plugin') |
6 | 6 | ||
@@ -24,7 +24,10 @@ class UpNextPlugin extends Plugin { | |||
24 | player.addClass('vjs-upnext') | 24 | player.addClass('vjs-upnext') |
25 | }) | 25 | }) |
26 | 26 | ||
27 | player.addChild('EndCard', settings) | 27 | const component = new EndCard(player, settings) |
28 | |||
29 | player.addChild(component) | ||
30 | this.on('dispose', () => player.removeChild(component)) | ||
28 | } | 31 | } |
29 | } | 32 | } |
30 | 33 | ||