()
| 86 | } |
| 87 | |
| 88 | initModalEvent() { |
| 89 | this.element.addEventListener('shown.bs.modal', () => { |
| 90 | this.playerComp.player.play() |
| 91 | }) |
| 92 | |
| 93 | this.element.addEventListener('hide.bs.modal', () => { |
| 94 | if (!this.playerComp.player.stopped) { |
| 95 | this.playerComp.player.stop() |
| 96 | this.playerComp.setSrc('') |
| 97 | } |
| 98 | }) |
| 99 | } |
| 100 | |
| 101 | open(src: string, filename: string, type: 'video' | 'audio') { |
| 102 | this.type.val = type |