mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-11-09 17:33:08 +03:00
Fix broken player on broken video
This commit is contained in:
parent
4434e78c56
commit
568726e48d
@ -124,7 +124,6 @@ export class PeerTubePlayer {
|
||||
|
||||
setPoster (url: string) {
|
||||
this.player?.poster(url)
|
||||
this.options.playerElement().poster = url
|
||||
}
|
||||
|
||||
enable () {
|
||||
@ -209,7 +208,8 @@ export class PeerTubePlayer {
|
||||
}
|
||||
}
|
||||
|
||||
this.player.one('error', () => handleError())
|
||||
this.player.on('video-change', () => alreadyFallback = false)
|
||||
this.player.on('error', () => handleError())
|
||||
|
||||
this.player.on('network-info', (_, data: PlayerNetworkInfo) => {
|
||||
if (data.source !== 'p2p-media-loader' || isNaN(data.bandwidthEstimate)) return
|
||||
|
@ -187,6 +187,10 @@ class PeerTubePlugin extends Plugin {
|
||||
this.player.removeChild(this.errorModal)
|
||||
this.errorModal.close()
|
||||
this.errorModal = undefined
|
||||
|
||||
if (this.player.loadingSpinner) {
|
||||
this.player.loadingSpinner.show()
|
||||
}
|
||||
}
|
||||
|
||||
private initializePlayer () {
|
||||
|
@ -87,9 +87,6 @@ class WebVideoPlugin extends Plugin {
|
||||
|
||||
const oldAutoplayValue = this.player.autoplay()
|
||||
if (options.isUserResolutionChange) {
|
||||
// Prevent video source element displaying the poster when we change the resolution
|
||||
(this.player.el() as HTMLVideoElement).poster = ''
|
||||
|
||||
this.player.autoplay(false)
|
||||
this.player.addClass('vjs-updating-resolution')
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user