aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app
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
parent80624154988f6270a353269c5e76f334e631b349 (diff)
downloadPeerTube-e14852b4bf8da29e9c5599b8f57e09480954e832.tar.gz
PeerTube-e14852b4bf8da29e9c5599b8f57e09480954e832.tar.zst
PeerTube-e14852b4bf8da29e9c5599b8f57e09480954e832.zip
Better skin for videojs
Diffstat (limited to 'client/src/app')
-rw-r--r--client/src/app/videos/video-watch/video-watch.component.html2
-rw-r--r--client/src/app/videos/video-watch/video-watch.component.ts11
2 files changed, 10 insertions, 3 deletions
diff --git a/client/src/app/videos/video-watch/video-watch.component.html b/client/src/app/videos/video-watch/video-watch.component.html
index 62f27ba48..58a48ca9c 100644
--- a/client/src/app/videos/video-watch/video-watch.component.html
+++ b/client/src/app/videos/video-watch/video-watch.component.html
@@ -16,7 +16,7 @@
16<div class="row"> 16<div class="row">
17 <!-- We need the video container for videojs so we just hide it --> 17 <!-- We need the video container for videojs so we just hide it -->
18 <div [hidden]="videoNotFound" class="embed-responsive embed-responsive-19by9"> 18 <div [hidden]="videoNotFound" class="embed-responsive embed-responsive-19by9">
19 <video id="video-container" class="video-js vjs-default-skin vjs-big-play-centered"></video> 19 <video id="video-container" class="video-js vjs-sublime-skin"></video>
20 </div> 20 </div>
21 21
22 <div *ngIf="videoNotFound" id="video-not-found">Video not found :'(</div> 22 <div *ngIf="videoNotFound" id="video-not-found">Video not found :'(</div>
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)