aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app')
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.ts48
1 files changed, 10 insertions, 38 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 fda69efab..c7e26fad2 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/videos/+video-watch/video-watch.component.ts
@@ -21,6 +21,7 @@ import { MarkdownService } from '../shared'
21import { VideoDownloadComponent } from './modal/video-download.component' 21import { VideoDownloadComponent } from './modal/video-download.component'
22import { VideoReportComponent } from './modal/video-report.component' 22import { VideoReportComponent } from './modal/video-report.component'
23import { VideoShareComponent } from './modal/video-share.component' 23import { VideoShareComponent } from './modal/video-share.component'
24import { getVideojsOptions } from '../../../assets/player/peertube-player'
24 25
25@Component({ 26@Component({
26 selector: 'my-video-watch', 27 selector: 'my-video-watch',
@@ -341,45 +342,16 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
341 this.playerElement.poster = this.video.previewUrl 342 this.playerElement.poster = this.video.previewUrl
342 } 343 }
343 344
344 const videojsOptions = { 345 const videojsOptions = getVideojsOptions({
345 controls: true,
346 autoplay: this.isAutoplay(), 346 autoplay: this.isAutoplay(),
347 playbackRates: [ 0.5, 1, 1.5, 2 ], 347 inactivityTimeout: 4000,
348 plugins: { 348 videoFiles: this.video.files,
349 peertube: { 349 playerElement: this.playerElement,
350 videoFiles: this.video.files, 350 videoViewUrl: this.videoService.getVideoViewUrl(this.video.uuid),
351 playerElement: this.playerElement, 351 videoDuration: this.video.duration,
352 videoViewUrl: this.videoService.getVideoViewUrl(this.video.uuid), 352 enableHotkeys: true,
353 videoDuration: this.video.duration 353 peertubeLink: false
354 }, 354 })
355 hotkeys: {
356 enableVolumeScroll: false
357 }
358 },
359 controlBar: {
360 children: [
361 'playToggle',
362 'currentTimeDisplay',
363 'timeDivider',
364 'durationDisplay',
365 'liveDisplay',
366
367 'flexibleWidthSpacer',
368 'progressControl',
369
370 'webTorrentButton',
371
372 'playbackRateMenuButton',
373
374 'muteToggle',
375 'volumeControl',
376
377 'resolutionMenuButton',
378
379 'fullscreenToggle'
380 ]
381 }
382 }
383 355
384 this.videoPlayerLoaded = true 356 this.videoPlayerLoaded = true
385 357