From 31b6ddf86652502e0c96d77fa10861ce4af11aa4 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 10 Apr 2019 09:23:18 +0200 Subject: Add ability to disable tracker --- client/src/assets/player/utils.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'client/src/assets/player/utils.ts') diff --git a/client/src/assets/player/utils.ts b/client/src/assets/player/utils.ts index 0966027ac..366689962 100644 --- a/client/src/assets/player/utils.ts +++ b/client/src/assets/player/utils.ts @@ -4,6 +4,10 @@ function toTitleCase (str: string) { return str.charAt(0).toUpperCase() + str.slice(1) } +function isWebRTCDisabled () { + return !!((window as any).RTCPeerConnection || (window as any).mozRTCPeerConnection || (window as any).webkitRTCPeerConnection) === false +} + // https://github.com/danrevah/ngx-pipes/blob/master/src/pipes/math/bytes.ts // Don't import all Angular stuff, just copy the code with shame const dictionaryBytes: Array<{max: number, type: string}> = [ @@ -141,6 +145,7 @@ export { toTitleCase, timeToInt, secondsToTime, + isWebRTCDisabled, buildVideoLink, buildVideoEmbed, videoFileMaxByResolution, -- cgit v1.2.3