()
| 364 | } |
| 365 | |
| 366 | initSubtitleButton() { |
| 367 | this.player.events.on('subtitle_show', () => { |
| 368 | this.player.template.subtitleButton.dataset.balloon = this.player.tran('hide-subs'); |
| 369 | this.player.template.subtitleButtonInner.style.opacity = ''; |
| 370 | this.player.user.set('subtitle', 1); |
| 371 | }); |
| 372 | this.player.events.on('subtitle_hide', () => { |
| 373 | this.player.template.subtitleButton.dataset.balloon = this.player.tran('show-subs'); |
| 374 | this.player.template.subtitleButtonInner.style.opacity = '0.4'; |
| 375 | this.player.user.set('subtitle', 0); |
| 376 | }); |
| 377 | |
| 378 | this.player.template.subtitleButton.addEventListener('click', () => { |
| 379 | this.player.subtitle.toggle(); |
| 380 | }); |
| 381 | } |
| 382 | |
| 383 | setAutoHide() { |
| 384 | this.show(); |
no test coverage detected