@Output() videoRemoved = new EventEmitter()
@Output() videoUnblacklisted = new EventEmitter()
@Output() videoBlacklisted = new EventEmitter()
+ @Output() modalOpened = new EventEmitter()
videoActions: DropdownAction<{ video: Video }>[][] = []
/* Show modals */
showDownloadModal () {
+ this.modalOpened.emit()
+
this.videoDownloadModal.show(this.video as VideoDetails)
}
showReportModal () {
+ this.modalOpened.emit()
+
this.videoReportModal.show()
}
showBlacklistModal () {
+ this.modalOpened.emit()
+
this.videoBlacklistModal.show()
}
}
async removeVideo () {
+ this.modalOpened.emit()
+
const res = await this.confirmService.confirm(this.i18n('Do you really want to delete this video?'), this.i18n('Delete'))
if (res === false) return
</div>
<my-video-actions-dropdown
- placement="top" buttonDirection="horizontal" [buttonStyled]="true" [video]="video" (videoRemoved)="onVideoRemoved()"
+ placement="top" buttonDirection="horizontal" [buttonStyled]="true" [video]="video"
+ (videoRemoved)="onVideoRemoved()" (modalOpened)="onModalOpened()"
></my-video-actions-dropdown>
</div>
}
showSupportModal () {
+ this.pausePlayer()
+
this.videoSupportModal.show()
}
showShareModal () {
+ this.pausePlayer()
+
this.videoShareModal.show(this.currentTime)
}
}
}
+ onModalOpened () {
+ this.pausePlayer()
+ }
+
onVideoRemoved () {
this.redirectService.redirectToHomepage()
}
]
if (this.isUserLoggedIn()) this.hotkeysService.add(this.hotkeys)
}
+
+ private pausePlayer () {
+ if (!this.player) return
+
+ this.player.pause()
+ }
}