diff options
author | Chocobozzz <me@florianbigard.com> | 2018-05-22 16:02:29 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-05-22 16:02:29 +0200 |
commit | d1bd87e066633b8a66266b280327ec828980916b (patch) | |
tree | bfb30a565088cbb2675a8ab224b1ae1fc5dbfd16 /client/src/assets/player/utils.ts | |
parent | 293c885b5c6d4d694792cf430c51d73ecd1f3bee (diff) | |
download | PeerTube-d1bd87e066633b8a66266b280327ec828980916b.tar.gz PeerTube-d1bd87e066633b8a66266b280327ec828980916b.tar.zst PeerTube-d1bd87e066633b8a66266b280327ec828980916b.zip |
Make it works with new autoplay policy
Diffstat (limited to 'client/src/assets/player/utils.ts')
-rw-r--r-- | client/src/assets/player/utils.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/client/src/assets/player/utils.ts b/client/src/assets/player/utils.ts index f5407ef60..1df39d4e4 100644 --- a/client/src/assets/player/utils.ts +++ b/client/src/assets/player/utils.ts | |||
@@ -60,6 +60,10 @@ function saveAverageBandwidth (value: number) { | |||
60 | return setLocalStorage('average-bandwidth', value.toString()) | 60 | return setLocalStorage('average-bandwidth', value.toString()) |
61 | } | 61 | } |
62 | 62 | ||
63 | function isMobile () { | ||
64 | return /iPhone|iPad|iPod|Android/i.test(navigator.userAgent) | ||
65 | } | ||
66 | |||
63 | export { | 67 | export { |
64 | toTitleCase, | 68 | toTitleCase, |
65 | getStoredVolume, | 69 | getStoredVolume, |
@@ -68,6 +72,7 @@ export { | |||
68 | getAverageBandwidth, | 72 | getAverageBandwidth, |
69 | saveMuteInStore, | 73 | saveMuteInStore, |
70 | getStoredMute, | 74 | getStoredMute, |
75 | isMobile, | ||
71 | bytes | 76 | bytes |
72 | } | 77 | } |
73 | 78 | ||