player: any
playerElement: HTMLVideoElement
+
theaterEnabled = false
+
userRating: UserVideoRateType = null
- descriptionLoading = false
+
+ playerPlaceholderImgSrc: string
video: VideoDetails = null
videoCaptions: VideoCaption[] = []
playlistPosition: number
playlist: VideoPlaylist = null
+ descriptionLoading = false
completeDescriptionShown = false
completeVideoDescription: string
shortVideoDescription: string
videoHTMLDescription = ''
+
likesBarTooltipText = ''
+
hasAlreadyAcceptedPrivacyConcern = false
remoteServerDown = false
+
hotkeys: Hotkey[] = []
tooltipLike = ''
this.videoCaptions = videoCaptions
// Re init attributes
+ this.playerPlaceholderImgSrc = undefined
this.descriptionLoading = false
this.completeDescriptionShown = false
this.completeVideoDescription = undefined
}
private async buildPlayer (urlOptions: URLOptions) {
- const videoState = this.video.state.id
- if (videoState === VideoState.LIVE_ENDED || videoState === VideoState.WAITING_FOR_LIVE) return
-
// Flush old player if needed
this.flushPlayer()
+ const videoState = this.video.state.id
+ if (videoState === VideoState.LIVE_ENDED || videoState === VideoState.WAITING_FOR_LIVE) {
+ this.playerPlaceholderImgSrc = this.video.previewPath
+ return
+ }
+
// Build video element, because videojs removes it on dispose
const playerElementWrapper = this.elementRef.nativeElement.querySelector('#videojs-wrapper')
this.playerElement = document.createElement('video')