aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-09 15:40:46 +0100
committerChocobozzz <me@florianbigard.com>2018-01-09 15:40:46 +0100
commitd77014491b339b4dcfab95c05507dd5f579a6d7d (patch)
treed239ecf48f5ad9d3dcfdaf1a237fe974273e2409 /client/src
parenta22bfc3ebc9f80088035774c6cfca4bd5707acd3 (diff)
downloadPeerTube-d77014491b339b4dcfab95c05507dd5f579a6d7d.tar.gz
PeerTube-d77014491b339b4dcfab95c05507dd5f579a6d7d.tar.zst
PeerTube-d77014491b339b4dcfab95c05507dd5f579a6d7d.zip
Add hotkeys in video player
Double click for full screen
Diffstat (limited to 'client/src')
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.ts4
-rw-r--r--client/src/assets/player/peertube-videojs-plugin.ts1
-rw-r--r--client/src/sass/video-js-custom.scss4
-rw-r--r--client/src/standalone/videos/embed.ts3
4 files changed, 9 insertions, 3 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 6f5fe0b97..7929c1fa1 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/videos/+video-watch/video-watch.component.ts
@@ -5,6 +5,7 @@ import { NotificationsService } from 'angular2-notifications'
5import { Observable } from 'rxjs/Observable' 5import { Observable } from 'rxjs/Observable'
6import { Subscription } from 'rxjs/Subscription' 6import { Subscription } from 'rxjs/Subscription'
7import * as videojs from 'video.js' 7import * as videojs from 'video.js'
8import 'videojs-hotkeys'
8import { UserVideoRateType, VideoRateType } from '../../../../../shared' 9import { UserVideoRateType, VideoRateType } from '../../../../../shared'
9import '../../../assets/player/peertube-videojs-plugin' 10import '../../../assets/player/peertube-videojs-plugin'
10import { AuthService, ConfirmService } from '../../core' 11import { AuthService, ConfirmService } from '../../core'
@@ -327,7 +328,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
327 videoFiles: this.video.files, 328 videoFiles: this.video.files,
328 playerElement: this.playerElement, 329 playerElement: this.playerElement,
329 peerTubeLink: false 330 peerTubeLink: false
330 } 331 },
332 hotkeys: {}
331 } 333 }
332 } 334 }
333 335
diff --git a/client/src/assets/player/peertube-videojs-plugin.ts b/client/src/assets/player/peertube-videojs-plugin.ts
index 25e65abd8..34c993f3c 100644
--- a/client/src/assets/player/peertube-videojs-plugin.ts
+++ b/client/src/assets/player/peertube-videojs-plugin.ts
@@ -3,7 +3,6 @@
3import * as videojs from 'video.js' 3import * as videojs from 'video.js'
4import * as WebTorrent from 'webtorrent' 4import * as WebTorrent from 'webtorrent'
5import { VideoFile } from '../../../../shared/models/videos/video.model' 5import { VideoFile } from '../../../../shared/models/videos/video.model'
6
7import { renderVideo } from './video-renderer' 6import { renderVideo } from './video-renderer'
8 7
9interface VideoJSComponentInterface { 8interface VideoJSComponentInterface {
diff --git a/client/src/sass/video-js-custom.scss b/client/src/sass/video-js-custom.scss
index 715464ce8..bc1496d70 100644
--- a/client/src/sass/video-js-custom.scss
+++ b/client/src/sass/video-js-custom.scss
@@ -111,6 +111,7 @@ $control-bar-height: 34px;
111 } 111 }
112 112
113 .vjs-play-control { 113 .vjs-play-control {
114 outline: 0;
114 font-size: $font-size; 115 font-size: $font-size;
115 padding: 0 17px; 116 padding: 0 17px;
116 margin-right: 5px; 117 margin-right: 5px;
@@ -191,6 +192,8 @@ $control-bar-height: 34px;
191 } 192 }
192 193
193 .vjs-mute-control { 194 .vjs-mute-control {
195 outline: 0;
196
194 .vjs-icon-placeholder { 197 .vjs-icon-placeholder {
195 display: inline-block; 198 display: inline-block;
196 width: 22px; 199 width: 22px;
@@ -274,6 +277,7 @@ $control-bar-height: 34px;
274 277
275 .vjs-fullscreen-control { 278 .vjs-fullscreen-control {
276 width: 37px; 279 width: 37px;
280 outline: 0;
277 281
278 .vjs-icon-placeholder { 282 .vjs-icon-placeholder {
279 display: inline-block; 283 display: inline-block;
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts
index f44aca9c3..e27eadc8b 100644
--- a/client/src/standalone/videos/embed.ts
+++ b/client/src/standalone/videos/embed.ts
@@ -42,7 +42,8 @@ loadVideoInfo(videoId, (err, videoInfo) => {
42 videoFiles: videoInfo.files, 42 videoFiles: videoInfo.files,
43 playerElement: videoElement, 43 playerElement: videoElement,
44 peerTubeLink: true 44 peerTubeLink: true
45 } 45 },
46 hotkeys: {}
46 } 47 }
47 } 48 }
48 videojs('video-container', videojsOptions, function () { 49 videojs('video-container', videojsOptions, function () {