import { Notifier, ServerService } from '@app/core'
import { forkJoin, Subscription } from 'rxjs'
import { Hotkey, HotkeysService } from 'angular2-hotkeys'
-import * as WebTorrent from 'webtorrent'
import { UserVideoRateType, VideoCaption, VideoPrivacy, VideoState } from '../../../../../shared'
import { AuthService, ConfirmService } from '../../core'
import { RestExtractor, VideoBlacklistService } from '../../shared'
ngOnInit () {
if (
- WebTorrent.WEBRTC_SUPPORT === false ||
+ !!((window as any).RTCPeerConnection || (window as any).mozRTCPeerConnection || (window as any).webkitRTCPeerConnection) === false ||
peertubeLocalStorage.getItem(VideoWatchComponent.LOCAL_STORAGE_PRIVACY_CONCERN_KEY) === 'true'
) {
this.hasAlreadyAcceptedPrivacyConcern = true
return this.video && this.video.state.id === VideoState.TO_TRANSCODE
}
+ isVideoDownloadable () {
+ return this.video && this.video.downloadEnabled
+ }
+
isVideoToImport () {
return this.video && this.video.state.id === VideoState.TO_IMPORT
}