aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/support.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/support.js')
-rw-r--r--src/js/support.js20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/js/support.js b/src/js/support.js
index 4681f5c7..6395293f 100644
--- a/src/js/support.js
+++ b/src/js/support.js
@@ -25,13 +25,9 @@ const support = {
// Check for support
// Basic functionality vs full UI
check(type, provider, playsinline) {
- const canPlayInline =
- browser.isIPhone && playsinline && support.playsinline;
+ const canPlayInline = browser.isIPhone && playsinline && support.playsinline;
const api = support[type] || provider !== 'html5';
- const ui =
- api &&
- support.rangeInput &&
- (type !== 'video' || !browser.isIPhone || canPlayInline);
+ const ui = api && support.rangeInput && (type !== 'video' || !browser.isIPhone || canPlayInline);
return {
api,
@@ -41,9 +37,7 @@ const support = {
// Picture-in-picture support
// Safari only currently
- pip: (() =>
- !browser.isIPhone &&
- is.function(createElement('video').webkitSetPresentationMode))(),
+ pip: (() => !browser.isIPhone && is.function(createElement('video').webkitSetPresentationMode))(),
// Airplay support
// Safari only currently
@@ -75,9 +69,7 @@ const support = {
}
try {
- return Boolean(
- type && this.media.canPlayType(type).replace(/no/, ''),
- );
+ return Boolean(type && this.media.canPlayType(type).replace(/no/, ''));
} catch (err) {
return false;
}
@@ -102,9 +94,7 @@ const support = {
// Reduced motion iOS & MacOS setting
// https://webkit.org/blog/7551/responsive-design-for-motion/
- reducedMotion:
- 'matchMedia' in window &&
- window.matchMedia('(prefers-reduced-motion)').matches,
+ reducedMotion: 'matchMedia' in window && window.matchMedia('(prefers-reduced-motion)').matches,
};
export default support;