aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/assets/player/utils.ts')
-rw-r--r--client/src/assets/player/utils.ts12
1 files changed, 11 insertions, 1 deletions
diff --git a/client/src/assets/player/utils.ts b/client/src/assets/player/utils.ts
index fa902e1f1..a72bf0123 100644
--- a/client/src/assets/player/utils.ts
+++ b/client/src/assets/player/utils.ts
@@ -8,6 +8,14 @@ function isWebRTCDisabled () {
8 return !!((window as any).RTCPeerConnection || (window as any).mozRTCPeerConnection || (window as any).webkitRTCPeerConnection) === false 8 return !!((window as any).RTCPeerConnection || (window as any).mozRTCPeerConnection || (window as any).webkitRTCPeerConnection) === false
9} 9}
10 10
11function isIOS () {
12 return !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform)
13}
14
15function isSafari () {
16 return /^((?!chrome|android).)*safari/i.test(navigator.userAgent)
17}
18
11// https://github.com/danrevah/ngx-pipes/blob/master/src/pipes/math/bytes.ts 19// https://github.com/danrevah/ngx-pipes/blob/master/src/pipes/math/bytes.ts
12// Don't import all Angular stuff, just copy the code with shame 20// Don't import all Angular stuff, just copy the code with shame
13const dictionaryBytes: Array<{max: number, type: string}> = [ 21const dictionaryBytes: Array<{max: number, type: string}> = [
@@ -192,5 +200,7 @@ export {
192 videoFileMinByResolution, 200 videoFileMinByResolution,
193 copyToClipboard, 201 copyToClipboard,
194 isMobile, 202 isMobile,
195 bytes 203 bytes,
204 isIOS,
205 isSafari
196} 206}