diff options
author | Andréas Livet <andreas.livet@gmail.com> | 2017-12-19 10:45:49 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-19 10:45:49 +0100 |
commit | 7efe153b0bc23e596d5019b9fb3e3e32b6cfeccd (patch) | |
tree | 56116e7e9f8467b78ed6dfc81827288915d31c8c /client/src/app/videos/+video-watch | |
parent | 228077efd73485a2832bb6211c9fa923158c2112 (diff) | |
download | PeerTube-7efe153b0bc23e596d5019b9fb3e3e32b6cfeccd.tar.gz PeerTube-7efe153b0bc23e596d5019b9fb3e3e32b6cfeccd.tar.zst PeerTube-7efe153b0bc23e596d5019b9fb3e3e32b6cfeccd.zip |
Enh #106 : Add an autoPlayVideo user attribute (#159)
Warning : I was not able to run the tests on my machine. It uses a different approach to handle databse connexion and didn't find where to configure it...
- create a migration file to add a boolean column in user table
- add autoPlayVideo attribute everywhere it is needed (both on client and server side)
- add tests
- add a way to configure this attribute in account-settings
- use the attribute in video-watch component to actually autoplay or not the video
Diffstat (limited to 'client/src/app/videos/+video-watch')
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.component.ts | 4 |
1 files changed, 2 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 5e4823c9c..e35b02f3f 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -290,12 +290,12 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
290 | 290 | ||
291 | const videojsOptions = { | 291 | const videojsOptions = { |
292 | controls: true, | 292 | controls: true, |
293 | autoplay: true, | 293 | autoplay: this.user.autoPlayVideo, |
294 | plugins: { | 294 | plugins: { |
295 | peertube: { | 295 | peertube: { |
296 | videoFiles: this.video.files, | 296 | videoFiles: this.video.files, |
297 | playerElement: this.playerElement, | 297 | playerElement: this.playerElement, |
298 | autoplay: true, | 298 | autoplay: this.user.autoPlayVideo, |
299 | peerTubeLink: false | 299 | peerTubeLink: false |
300 | } | 300 | } |
301 | } | 301 | } |