aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
Diffstat (limited to 'client/src')
-rw-r--r--client/src/assets/player/peertube-videojs-plugin.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/client/src/assets/player/peertube-videojs-plugin.ts b/client/src/assets/player/peertube-videojs-plugin.ts
index 0a7651a81..5ccfdce36 100644
--- a/client/src/assets/player/peertube-videojs-plugin.ts
+++ b/client/src/assets/player/peertube-videojs-plugin.ts
@@ -56,7 +56,8 @@ class ResolutionMenuItem extends MenuItem {
56 } 56 }
57 57
58 handleClick (event) { 58 handleClick (event) {
59 MenuItem.prototype.handleClick.call(this, event) 59 super.handleClick(event)
60
60 this.player_.peertube().updateResolution(this.options_.id) 61 this.player_.peertube().updateResolution(this.options_.id)
61 } 62 }
62} 63}
@@ -279,14 +280,14 @@ class PeerTubePlugin extends Plugin {
279 if (err) return this.handleError(err) 280 if (err) return this.handleError(err)
280 281
281 this.renderer = renderer 282 this.renderer = renderer
282 this.player.play().then(done) 283 if (!this.player.paused()) this.player.play().then(done)
283 }) 284 })
284 }) 285 })
285 286
286 this.torrent.on('error', err => this.handleError(err)) 287 this.torrent.on('error', err => this.handleError(err))
287 this.torrent.on('warning', (err: any) => { 288 this.torrent.on('warning', (err: any) => {
288 // We don't support HTTP tracker but we don't care -> we use the web socket tracker 289 // We don't support HTTP tracker but we don't care -> we use the web socket tracker
289 if (err.message.indexOf('Unsupported tracker protocol: http') !== -1) return 290 if (err.message.indexOf('Unsupported tracker protocol') !== -1) return
290 // Users don't care about issues with WebRTC, but developers do so log it in the console 291 // Users don't care about issues with WebRTC, but developers do so log it in the console
291 if (err.message.indexOf('Ice connection failed') !== -1) { 292 if (err.message.indexOf('Ice connection failed') !== -1) {
292 console.error(err) 293 console.error(err)
@@ -304,6 +305,9 @@ class PeerTubePlugin extends Plugin {
304 const currentTime = this.player.currentTime() 305 const currentTime = this.player.currentTime()
305 const isPaused = this.player.paused() 306 const isPaused = this.player.paused()
306 307
308 // Remove poster to have black background
309 this.playerElement.poster = ''
310
307 // Hide bigPlayButton 311 // Hide bigPlayButton
308 if (!isPaused) { 312 if (!isPaused) {
309 this.player.bigPlayButton.hide() 313 this.player.bigPlayButton.hide()