diff options
author | William Lahti <wilahti@gmail.com> | 2018-07-10 08:47:56 -0700 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-07-10 17:47:56 +0200 |
commit | 999417328bde0e60cd59318fc1c18672356254ce (patch) | |
tree | 22673fcbd4dc333e3362912b2c813e97a41c765f /client/src/assets/player | |
parent | 0b755f3b27190ea4d9c301ede0955b2736605f4c (diff) | |
download | PeerTube-999417328bde0e60cd59318fc1c18672356254ce.tar.gz PeerTube-999417328bde0e60cd59318fc1c18672356254ce.tar.zst PeerTube-999417328bde0e60cd59318fc1c18672356254ce.zip |
Ability to programmatically control embeds (#776)
* first stab at jschannel based player api
* semicolon purge
* more method-level docs; consolidate definitions
* missing definitions
* better match peertube's class conventions
* styling for embed tester
* basic docs
* add `getVolume`
* document the test-embed feature
Diffstat (limited to 'client/src/assets/player')
-rw-r--r-- | client/src/assets/player/peertube-player.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/client/src/assets/player/peertube-player.ts b/client/src/assets/player/peertube-player.ts index 7e339990c..baae740fe 100644 --- a/client/src/assets/player/peertube-player.ts +++ b/client/src/assets/player/peertube-player.ts | |||
@@ -29,10 +29,15 @@ function getVideojsOptions (options: { | |||
29 | peertubeLink: boolean, | 29 | peertubeLink: boolean, |
30 | poster: string, | 30 | poster: string, |
31 | startTime: number | 31 | startTime: number |
32 | theaterMode: boolean | 32 | theaterMode: boolean, |
33 | controls?: boolean, | ||
34 | muted?: boolean, | ||
35 | loop?: boolean | ||
33 | }) { | 36 | }) { |
34 | const videojsOptions = { | 37 | const videojsOptions = { |
35 | controls: true, | 38 | controls: options.controls !== undefined ? options.controls : true, |
39 | muted: options.controls !== undefined ? options.muted : false, | ||
40 | loop: options.loop !== undefined ? options.loop : false, | ||
36 | poster: options.poster, | 41 | poster: options.poster, |
37 | autoplay: false, | 42 | autoplay: false, |
38 | inactivityTimeout: options.inactivityTimeout, | 43 | inactivityTimeout: options.inactivityTimeout, |