aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/video-watch/video-watch.component.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-07-06 16:26:18 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-07-06 16:50:02 +0200
commite14852b4bf8da29e9c5599b8f57e09480954e832 (patch)
treec293750132bb33324c5928deff21f0cb36dbb869 /client/src/app/videos/video-watch/video-watch.component.ts
parent80624154988f6270a353269c5e76f334e631b349 (diff)
downloadPeerTube-e14852b4bf8da29e9c5599b8f57e09480954e832.tar.gz
PeerTube-e14852b4bf8da29e9c5599b8f57e09480954e832.tar.zst
PeerTube-e14852b4bf8da29e9c5599b8f57e09480954e832.zip
Better skin for videojs
Diffstat (limited to 'client/src/app/videos/video-watch/video-watch.component.ts')
-rw-r--r--client/src/app/videos/video-watch/video-watch.component.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/client/src/app/videos/video-watch/video-watch.component.ts b/client/src/app/videos/video-watch/video-watch.component.ts
index 34dbc9a88..1284aa033 100644
--- a/client/src/app/videos/video-watch/video-watch.component.ts
+++ b/client/src/app/videos/video-watch/video-watch.component.ts
@@ -74,7 +74,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
74 74
75 const videojsOptions = { 75 const videojsOptions = {
76 controls: true, 76 controls: true,
77 autoplay: false 77 autoplay: true
78 } 78 }
79 79
80 const self = this 80 const self = this
@@ -127,11 +127,18 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
127 this.loading = false 127 this.loading = false
128 128
129 console.log('Added ' + this.video.magnetUri + '.') 129 console.log('Added ' + this.video.magnetUri + '.')
130 torrent.files[0].renderTo(this.playerElement, { autoplay: true }, (err) => { 130 torrent.files[0].renderTo(this.playerElement, (err) => {
131 if (err) { 131 if (err) {
132 this.notificationsService.error('Error', 'Cannot append the file in the video element.') 132 this.notificationsService.error('Error', 'Cannot append the file in the video element.')
133 console.error(err) 133 console.error(err)
134 } 134 }
135
136 // Hack to "simulate" src link in video.js >= 6
137 // If no, we can't play the video after pausing it
138 // https://github.com/videojs/video.js/blob/master/src/js/player.js#L1633
139 (this.player as any).src = () => true
140
141 this.player.play()
135 }) 142 })
136 143
137 this.runInProgress(torrent) 144 this.runInProgress(torrent)