diff options
author | Chocobozzz <me@florianbigard.com> | 2019-02-08 16:16:40 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-02-11 09:13:02 +0100 |
commit | c7ca4c8be781753f86d806015b182f1ee5443fcf (patch) | |
tree | a1b7efaa51aee9d1ab5fc9400610efad47d72cc4 /client/src | |
parent | 597a9266d426aa04c2f229168e4285a76bea2c12 (diff) | |
download | PeerTube-c7ca4c8be781753f86d806015b182f1ee5443fcf.tar.gz PeerTube-c7ca4c8be781753f86d806015b182f1ee5443fcf.tar.zst PeerTube-c7ca4c8be781753f86d806015b182f1ee5443fcf.zip |
Fix client with google bot
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.component.ts | 3 | ||||
-rw-r--r-- | client/src/main.ts | 2 |
2 files changed, 2 insertions, 3 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 9f3a43a08..e801f03ad 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -8,7 +8,6 @@ import { MetaService } from '@ngx-meta/core' | |||
8 | import { Notifier, ServerService } from '@app/core' | 8 | import { Notifier, ServerService } from '@app/core' |
9 | import { forkJoin, Subscription } from 'rxjs' | 9 | import { forkJoin, Subscription } from 'rxjs' |
10 | import { Hotkey, HotkeysService } from 'angular2-hotkeys' | 10 | import { Hotkey, HotkeysService } from 'angular2-hotkeys' |
11 | import * as WebTorrent from 'webtorrent' | ||
12 | import { UserVideoRateType, VideoCaption, VideoPrivacy, VideoState } from '../../../../../shared' | 11 | import { UserVideoRateType, VideoCaption, VideoPrivacy, VideoState } from '../../../../../shared' |
13 | import { AuthService, ConfirmService } from '../../core' | 12 | import { AuthService, ConfirmService } from '../../core' |
14 | import { RestExtractor, VideoBlacklistService } from '../../shared' | 13 | import { RestExtractor, VideoBlacklistService } from '../../shared' |
@@ -90,7 +89,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
90 | 89 | ||
91 | ngOnInit () { | 90 | ngOnInit () { |
92 | if ( | 91 | if ( |
93 | WebTorrent.WEBRTC_SUPPORT === false || | 92 | !!((window as any).RTCPeerConnection || (window as any).mozRTCPeerConnection || (window as any).webkitRTCPeerConnection) === false || |
94 | peertubeLocalStorage.getItem(VideoWatchComponent.LOCAL_STORAGE_PRIVACY_CONCERN_KEY) === 'true' | 93 | peertubeLocalStorage.getItem(VideoWatchComponent.LOCAL_STORAGE_PRIVACY_CONCERN_KEY) === 'true' |
95 | ) { | 94 | ) { |
96 | this.hasAlreadyAcceptedPrivacyConcern = true | 95 | this.hasAlreadyAcceptedPrivacyConcern = true |
diff --git a/client/src/main.ts b/client/src/main.ts index dee962180..86fdabba5 100644 --- a/client/src/main.ts +++ b/client/src/main.ts | |||
@@ -34,7 +34,7 @@ const bootstrap = () => platformBrowserDynamic() | |||
34 | // .catch(err => console.error('Cannot register service worker.', err)) | 34 | // .catch(err => console.error('Cannot register service worker.', err)) |
35 | // } | 35 | // } |
36 | 36 | ||
37 | if (navigator.serviceWorker) { | 37 | if (navigator.serviceWorker && typeof navigator.serviceWorker.getRegistrations === 'function') { |
38 | navigator.serviceWorker.getRegistrations() | 38 | navigator.serviceWorker.getRegistrations() |
39 | .then(registrations => { | 39 | .then(registrations => { |
40 | for (const registration of registrations) { | 40 | for (const registration of registrations) { |