-
-
Notifications
You must be signed in to change notification settings - Fork 308
Expand file tree
/
Copy pathcountdown-overlay.js
More file actions
53 lines (45 loc) · 1.07 KB
/
countdown-overlay.js
File metadata and controls
53 lines (45 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
* @file countdown-overlay.js
* @since 4.5.0
*/
import videojs from 'video.js';
const Component = videojs.getComponent('Component');
/**
* Overlay for displaying the countdown.
*
* @class
* @augments videojs.Component
*/
class CountdownOverlay extends Component {
/**
* Create the `Countdown`s DOM element.
*
* @return {Element}
* The dom element that gets created.
*/
createEl() {
let props = {
className: 'vjs-record-countdown',
dir: 'ltr'
};
let attr = {
};
return super.createEl('div', props, attr);
}
/**
* Show the `CountdownOverlay` element if it is hidden by removing the
* 'vjs-hidden' class name from it.
*/
show() {
if (this.layoutExclude && this.layoutExclude === true) {
// ignore
return;
}
super.show();
}
setCountdownValue(value) {
this.el().innerHTML = value;
}
}
Component.registerComponent('CountdownOverlay', CountdownOverlay);
export default CountdownOverlay;