(
url: string,
el: HTMLElement,
options: IPlayerOptions = {}
)
| 73 | public get onStateChanged(): IEvent<IPlayerState> { return this._onStateChanged.onEvent } |
| 74 | |
| 75 | constructor( |
| 76 | url: string, |
| 77 | el: HTMLElement, |
| 78 | options: IPlayerOptions = {} |
| 79 | ) { |
| 80 | this.el = el |
| 81 | this._url = url |
| 82 | this._term = createTerminal(options) |
| 83 | this._audio = new Audio() |
| 84 | this._view = new PlayerView(this) |
| 85 | |
| 86 | el.append(this._view.element) |
| 87 | this._term.open(this._view.videoWrapper) |
| 88 | this._term.focus() |
| 89 | |
| 90 | this._load() |
| 91 | } |
| 92 | |
| 93 | private _load(): void { |
| 94 | this._error = null |
nothing calls this directly
no test coverage detected