MCPcopy
hub / github.com/iuroc/bilidown / initModalEvent

Method initModalEvent

client/src/task/playerModal.ts:88–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

constructorMethod · 0.95

Calls 1

setSrcMethod · 0.80

Tested by

no test coverage detected