aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
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
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')
-rw-r--r--client/package.json1
-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
-rw-r--r--client/yarn.lock4
6 files changed, 14 insertions, 3 deletions
diff --git a/client/package.json b/client/package.json
index efdd5711b..407ce930c 100644
--- a/client/package.json
+++ b/client/package.json
@@ -78,6 +78,7 @@
78 "uglifyjs-webpack-plugin": "^1.1.2", 78 "uglifyjs-webpack-plugin": "^1.1.2",
79 "video.js": "^6.2.0", 79 "video.js": "^6.2.0",
80 "videojs-dock": "^2.0.2", 80 "videojs-dock": "^2.0.2",
81 "videojs-hotkeys": "^0.2.20",
81 "webpack": "^3.3.0", 82 "webpack": "^3.3.0",
82 "webpack-bundle-analyzer": "^2.9.1", 83 "webpack-bundle-analyzer": "^2.9.1",
83 "webtorrent": "^0.98.0", 84 "webtorrent": "^0.98.0",
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 () {
diff --git a/client/yarn.lock b/client/yarn.lock
index a0bfa789d..4196a3674 100644
--- a/client/yarn.lock
+++ b/client/yarn.lock
@@ -7203,6 +7203,10 @@ videojs-font@2.0.0:
7203 version "2.0.0" 7203 version "2.0.0"
7204 resolved "https://registry.yarnpkg.com/videojs-font/-/videojs-font-2.0.0.tgz#af7461ef9d4b95e0334bffb78b2f2ff0364a9034" 7204 resolved "https://registry.yarnpkg.com/videojs-font/-/videojs-font-2.0.0.tgz#af7461ef9d4b95e0334bffb78b2f2ff0364a9034"
7205 7205
7206videojs-hotkeys@^0.2.20:
7207 version "0.2.20"
7208 resolved "https://registry.yarnpkg.com/videojs-hotkeys/-/videojs-hotkeys-0.2.20.tgz#1dce9d42c29da392cf1742b89ba292c6706c8973"
7209
7206videojs-ie8@1.1.2: 7210videojs-ie8@1.1.2:
7207 version "1.1.2" 7211 version "1.1.2"
7208 resolved "https://registry.yarnpkg.com/videojs-ie8/-/videojs-ie8-1.1.2.tgz#a23d3d8608ad7192b69c6077fc4eb848998d35d9" 7212 resolved "https://registry.yarnpkg.com/videojs-ie8/-/videojs-ie8-1.1.2.tgz#a23d3d8608ad7192b69c6077fc4eb848998d35d9"