aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-04-10 09:23:18 +0200
committerChocobozzz <me@florianbigard.com>2019-04-10 09:23:18 +0200
commit31b6ddf86652502e0c96d77fa10861ce4af11aa4 (patch)
treeb94402972945699134b2a504af5d551124f0bf54 /client/src/app/videos
parent22834691abb6e74d31654ffd2ebeaaaa8ef3ac7b (diff)
downloadPeerTube-31b6ddf86652502e0c96d77fa10861ce4af11aa4.tar.gz
PeerTube-31b6ddf86652502e0c96d77fa10861ce4af11aa4.tar.zst
PeerTube-31b6ddf86652502e0c96d77fa10861ce4af11aa4.zip
Add ability to disable tracker
Diffstat (limited to 'client/src/app/videos')
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.scss1
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.ts18
2 files changed, 13 insertions, 6 deletions
diff --git a/client/src/app/videos/+video-watch/video-watch.component.scss b/client/src/app/videos/+video-watch/video-watch.component.scss
index d61a0bc3e..84b9aed39 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.scss
+++ b/client/src/app/videos/+video-watch/video-watch.component.scss
@@ -427,6 +427,7 @@ my-video-comments {
427// If the view is not expanded, take into account the menu 427// If the view is not expanded, take into account the menu
428.privacy-concerns { 428.privacy-concerns {
429 width: calc(100% - #{$menu-width}); 429 width: calc(100% - #{$menu-width});
430 margin-left: -15px;
430} 431}
431 432
432@media screen and (max-width: $small-view) { 433@media screen and (max-width: $small-view) {
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 edc546b28..bce652210 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/videos/+video-watch/video-watch.component.ts
@@ -29,6 +29,7 @@ import { VideoPlaylist } from '@app/shared/video-playlist/video-playlist.model'
29import { VideoPlaylistService } from '@app/shared/video-playlist/video-playlist.service' 29import { VideoPlaylistService } from '@app/shared/video-playlist/video-playlist.service'
30import { ComponentPagination } from '@app/shared/rest/component-pagination.model' 30import { ComponentPagination } from '@app/shared/rest/component-pagination.model'
31import { Video } from '@app/shared/video/video.model' 31import { Video } from '@app/shared/video/video.model'
32import { isWebRTCDisabled } from '../../../assets/player/utils'
32 33
33@Component({ 34@Component({
34 selector: 'my-video-watch', 35 selector: 'my-video-watch',
@@ -71,6 +72,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
71 private currentTime: number 72 private currentTime: number
72 private paramsSub: Subscription 73 private paramsSub: Subscription
73 private queryParamsSub: Subscription 74 private queryParamsSub: Subscription
75 private configSub: Subscription
74 76
75 constructor ( 77 constructor (
76 private elementRef: ElementRef, 78 private elementRef: ElementRef,
@@ -100,12 +102,16 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
100 } 102 }
101 103
102 ngOnInit () { 104 ngOnInit () {
103 if ( 105 this.configSub = this.serverService.configLoaded
104 !!((window as any).RTCPeerConnection || (window as any).mozRTCPeerConnection || (window as any).webkitRTCPeerConnection) === false || 106 .subscribe(() => {
105 peertubeLocalStorage.getItem(VideoWatchComponent.LOCAL_STORAGE_PRIVACY_CONCERN_KEY) === 'true' 107 if (
106 ) { 108 isWebRTCDisabled() ||
107 this.hasAlreadyAcceptedPrivacyConcern = true 109 this.serverService.getConfig().tracker.enabled === false ||
108 } 110 peertubeLocalStorage.getItem(VideoWatchComponent.LOCAL_STORAGE_PRIVACY_CONCERN_KEY) === 'true'
111 ) {
112 this.hasAlreadyAcceptedPrivacyConcern = true
113 }
114 })
109 115
110 this.paramsSub = this.route.params.subscribe(routeParams => { 116 this.paramsSub = this.route.params.subscribe(routeParams => {
111 const videoId = routeParams[ 'videoId' ] 117 const videoId = routeParams[ 'videoId' ]