diff options
Diffstat (limited to 'client/src/app/videos')
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.component.ts | 8 |
1 files changed, 6 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 b60e58fb0..fda69efab 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | import { Component, ElementRef, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core' | 1 | import { Component, ElementRef, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core' |
2 | import { ActivatedRoute, Router } from '@angular/router' | 2 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { RedirectService } from '@app/core/routing/redirect.service' | 3 | import { RedirectService } from '@app/core/routing/redirect.service' |
4 | import { peertubeLocalStorage } from '@app/shared/misc/peertube-local-storage' | ||
4 | import { VideoSupportComponent } from '@app/videos/+video-watch/modal/video-support.component' | 5 | import { VideoSupportComponent } from '@app/videos/+video-watch/modal/video-support.component' |
5 | import { MetaService } from '@ngx-meta/core' | 6 | import { MetaService } from '@ngx-meta/core' |
6 | import { NotificationsService } from 'angular2-notifications' | 7 | import { NotificationsService } from 'angular2-notifications' |
@@ -75,7 +76,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
75 | } | 76 | } |
76 | 77 | ||
77 | ngOnInit () { | 78 | ngOnInit () { |
78 | if (WebTorrent.WEBRTC_SUPPORT === false || localStorage.getItem(VideoWatchComponent.LOCAL_STORAGE_PRIVACY_CONCERN_KEY) === 'true') { | 79 | if ( |
80 | WebTorrent.WEBRTC_SUPPORT === false || | ||
81 | peertubeLocalStorage.getItem(VideoWatchComponent.LOCAL_STORAGE_PRIVACY_CONCERN_KEY) === 'true' | ||
82 | ) { | ||
79 | this.hasAlreadyAcceptedPrivacyConcern = true | 83 | this.hasAlreadyAcceptedPrivacyConcern = true |
80 | } | 84 | } |
81 | 85 | ||
@@ -262,7 +266,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
262 | } | 266 | } |
263 | 267 | ||
264 | acceptedPrivacyConcern () { | 268 | acceptedPrivacyConcern () { |
265 | localStorage.setItem(VideoWatchComponent.LOCAL_STORAGE_PRIVACY_CONCERN_KEY, 'true') | 269 | peertubeLocalStorage.setItem(VideoWatchComponent.LOCAL_STORAGE_PRIVACY_CONCERN_KEY, 'true') |
266 | this.hasAlreadyAcceptedPrivacyConcern = true | 270 | this.hasAlreadyAcceptedPrivacyConcern = true |
267 | } | 271 | } |
268 | 272 | ||