mirror of https://github.com/Chocobozzz/PeerTube
parent
64f943c1cb
commit
b8cb1d8e87
|
@ -317,13 +317,12 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||||
private loadVideo (options: {
|
private loadVideo (options: {
|
||||||
videoId: string
|
videoId: string
|
||||||
forceAutoplay: boolean
|
forceAutoplay: boolean
|
||||||
|
liveRefresh?: boolean
|
||||||
videoPassword?: string
|
videoPassword?: string
|
||||||
}) {
|
}) {
|
||||||
const { videoId, forceAutoplay, videoPassword } = options
|
const { videoId, liveRefresh, forceAutoplay, videoPassword } = options
|
||||||
|
|
||||||
if (this.isSameElement(this.video, videoId)) return
|
if (!liveRefresh && this.isSameElement(this.video, videoId)) return
|
||||||
|
|
||||||
this.video = undefined
|
|
||||||
|
|
||||||
const videoObs = this.hooks.wrapObsFun(
|
const videoObs = this.hooks.wrapObsFun(
|
||||||
this.videoService.getVideo.bind(this.videoService),
|
this.videoService.getVideo.bind(this.videoService),
|
||||||
|
@ -895,9 +894,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
const videoUUID = this.video.uuid
|
const videoUUID = this.video.uuid
|
||||||
|
|
||||||
// Reset to force refresh the video
|
this.loadVideo({ videoId: videoUUID, forceAutoplay: true, liveRefresh: true })
|
||||||
this.video = undefined
|
|
||||||
this.loadVideo({ videoId: videoUUID, forceAutoplay: true })
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private handleLiveViewsChange (newViewers: number) {
|
private handleLiveViewsChange (newViewers: number) {
|
||||||
|
|
Loading…
Reference in New Issue