aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-22 17:16:48 +0200
committerChocobozzz <me@florianbigard.com>2019-08-22 17:16:48 +0200
commit001ed2d40c8d2c8f494f5dc7f91ed62d56df10fd (patch)
tree9a88235affe49fce4b7ce2df192931cffaec32e9 /client/src/app/videos
parentd5c8932a601c1854db0a2e399ccaf26e17385f1a (diff)
parent60c2bc80b82c71bd63bdb1fcf64d4d49491ce5c8 (diff)
downloadPeerTube-001ed2d40c8d2c8f494f5dc7f91ed62d56df10fd.tar.gz
PeerTube-001ed2d40c8d2c8f494f5dc7f91ed62d56df10fd.tar.zst
PeerTube-001ed2d40c8d2c8f494f5dc7f91ed62d56df10fd.zip
Merge branch 'release/1.4.0' into develop
Diffstat (limited to 'client/src/app/videos')
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.ts6
1 files changed, 4 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 d7c7b7497..21a24113f 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/videos/+video-watch/video-watch.component.ts
@@ -34,6 +34,7 @@ import { VideoWatchPlaylistComponent } from '@app/videos/+video-watch/video-watc
34import { getStoredTheater } from '../../../assets/player/peertube-player-local-storage' 34import { getStoredTheater } from '../../../assets/player/peertube-player-local-storage'
35import { PluginService } from '@app/core/plugins/plugin.service' 35import { PluginService } from '@app/core/plugins/plugin.service'
36import { HooksService } from '@app/core/plugins/hooks.service' 36import { HooksService } from '@app/core/plugins/hooks.service'
37import { PlatformLocation } from '@angular/common'
37 38
38@Component({ 39@Component({
39 selector: 'my-video-watch', 40 selector: 'my-video-watch',
@@ -95,6 +96,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
95 private i18n: I18n, 96 private i18n: I18n,
96 private hotkeysService: HotkeysService, 97 private hotkeysService: HotkeysService,
97 private hooks: HooksService, 98 private hooks: HooksService,
99 private location: PlatformLocation,
98 @Inject(LOCALE_ID) private localeId: string 100 @Inject(LOCALE_ID) private localeId: string
99 ) {} 101 ) {}
100 102
@@ -374,13 +376,13 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
374 this.i18n('This video contains mature or explicit content. Are you sure you want to watch it?'), 376 this.i18n('This video contains mature or explicit content. Are you sure you want to watch it?'),
375 this.i18n('Mature or explicit content') 377 this.i18n('Mature or explicit content')
376 ) 378 )
377 if (res === false) return this.redirectService.redirectToHomepage() 379 if (res === false) return this.location.back()
378 } 380 }
379 381
380 // Flush old player if needed 382 // Flush old player if needed
381 this.flushPlayer() 383 this.flushPlayer()
382 384
383 // Build video element, because videojs remove it on dispose 385 // Build video element, because videojs removes it on dispose
384 const playerElementWrapper = this.elementRef.nativeElement.querySelector('#videojs-wrapper') 386 const playerElementWrapper = this.elementRef.nativeElement.querySelector('#videojs-wrapper')
385 this.playerElement = document.createElement('video') 387 this.playerElement = document.createElement('video')
386 this.playerElement.className = 'video-js vjs-peertube-skin' 388 this.playerElement.className = 'video-js vjs-peertube-skin'