aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/utils.ts
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/assets/player/utils.ts
parent22834691abb6e74d31654ffd2ebeaaaa8ef3ac7b (diff)
downloadPeerTube-31b6ddf86652502e0c96d77fa10861ce4af11aa4.tar.gz
PeerTube-31b6ddf86652502e0c96d77fa10861ce4af11aa4.tar.zst
PeerTube-31b6ddf86652502e0c96d77fa10861ce4af11aa4.zip
Add ability to disable tracker
Diffstat (limited to 'client/src/assets/player/utils.ts')
-rw-r--r--client/src/assets/player/utils.ts5
1 files changed, 5 insertions, 0 deletions
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) {
4 return str.charAt(0).toUpperCase() + str.slice(1) 4 return str.charAt(0).toUpperCase() + str.slice(1)
5} 5}
6 6
7function isWebRTCDisabled () {
8 return !!((window as any).RTCPeerConnection || (window as any).mozRTCPeerConnection || (window as any).webkitRTCPeerConnection) === false
9}
10
7// https://github.com/danrevah/ngx-pipes/blob/master/src/pipes/math/bytes.ts 11// https://github.com/danrevah/ngx-pipes/blob/master/src/pipes/math/bytes.ts
8// Don't import all Angular stuff, just copy the code with shame 12// Don't import all Angular stuff, just copy the code with shame
9const dictionaryBytes: Array<{max: number, type: string}> = [ 13const dictionaryBytes: Array<{max: number, type: string}> = [
@@ -141,6 +145,7 @@ export {
141 toTitleCase, 145 toTitleCase,
142 timeToInt, 146 timeToInt,
143 secondsToTime, 147 secondsToTime,
148 isWebRTCDisabled,
144 buildVideoLink, 149 buildVideoLink,
145 buildVideoEmbed, 150 buildVideoEmbed,
146 videoFileMaxByResolution, 151 videoFileMaxByResolution,