X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fassets%2Fplayer%2Fwebtorrent%2Fwebtorrent-plugin.ts;h=8b5690cea1a8509689d4cde22ff182a34dc8750f;hb=3a149e9f8b2e99507c72792b80cee3a90df003b2;hp=007fc58cc42693a428d9199936c7b57b2533c98a;hpb=6ad88df896e359e428259ff511f6fca3675cb4af;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/assets/player/webtorrent/webtorrent-plugin.ts b/client/src/assets/player/webtorrent/webtorrent-plugin.ts index 007fc58cc..8b5690cea 100644 --- a/client/src/assets/player/webtorrent/webtorrent-plugin.ts +++ b/client/src/assets/player/webtorrent/webtorrent-plugin.ts @@ -186,15 +186,15 @@ class WebTorrentPlugin extends Plugin { this.player.bigPlayButton.hide() } - // Audio-only (resolutionId == 0) gets special treatment - if (resolutionId > 0) { - // Hide poster to have black background - this.player.removeClass('vjs-playing-audio-only-content') - this.player.posterImage.hide() - } else { + // Audio-only (resolutionId === 0) gets special treatment + if (resolutionId === 0) { // Audio-only: show poster, do not auto-hide controls this.player.addClass('vjs-playing-audio-only-content') this.player.posterImage.show() + } else { + // Hide poster to have black background + this.player.removeClass('vjs-playing-audio-only-content') + this.player.posterImage.hide() } const newVideoFile = this.videoFiles.find(f => f.resolution.id === resolutionId)