summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
17384fd)
* Resume video playback on close of support modal #2995
* Fix lint issues
- this.modalService.open(this.modal, { centered: true })
+ const modalRef = this.modalService.open(this.modal, { centered: true })
this.markdownService.enhancedMarkdownToHTML(this.video.support)
.then(r => this.videoHTMLSupport = r)
this.markdownService.enhancedMarkdownToHTML(this.video.support)
.then(r => this.videoHTMLSupport = r)
+ // Check video was playing before opening support modal
+ const isVideoPlaying = this.isPlaying()
+
- this.videoSupportModal.show()
+ const modalRef = this.videoSupportModal.show()
+
+ modalRef.result.then(() => {
+ if (isVideoPlaying) {
+ this.resumePlayer()
+ }
+ })
+ private resumePlayer () {
+ if (!this.player) return
+
+ this.player.play()
+ }
+
+ private isPlaying () {
+ if (!this.player) return
+
+ return !this.player.paused()
+ }
+
private initHotkeys () {
this.hotkeys = [
// These hotkeys are managed by the player
private initHotkeys () {
this.hotkeys = [
// These hotkeys are managed by the player