Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "utils/constants"

Index

Variables

Const HAS_MSE

HAS_MSE: boolean = ('MediaSource' in (window as any))

Check if current browser supports MediaSource API.

see

https://developer.mozilla.org/en-US/docs/Web/API/MediaSource

type

boolean

default

Const IS_ANDROID

IS_ANDROID: boolean = /android/i.test(UA)

Check if browser's user agent is related to an Android device.

type

boolean

default

Const IS_CHROME

IS_CHROME: boolean = /chrome/i.test(UA)

Check if current browser is Chrome (any version).

type

boolean

default

Const IS_EDGE

IS_EDGE: boolean = ('msLaunchUri' in NAV && !('documentMode' in document))

Check if current browser is Microsoft Edge (any version).

type

boolean

default

Const IS_FIREFOX

IS_FIREFOX: boolean = /firefox/i.test(UA)

Check if current browser is Mozilla Firefox (any version).

type

boolean

default

Const IS_IE

IS_IE: boolean = /(trident|microsoft)/i.test(NAV.appName)

Check if current browser is Internet Explorer (any version).

type

boolean

default

Const IS_IOS

IS_IOS: boolean = /ipad|iphone|ipod/i.test(UA) && !(window as any).MSStream

Check if browser's user agent is related to an iOS device (iPhone, iPad, iPod).

type

boolean

default

Const IS_IPAD

IS_IPAD: boolean = /ipad/i.test(UA) && !(window as any).MSStream

Check if browser's user agent is related to an iPad.

type

boolean

default

Const IS_IPHONE

IS_IPHONE: boolean = /iphone/i.test(UA) && !(window as any).MSStream

Check if browser's user agent is related to an iPhone.

type

boolean

default

Const IS_IPOD

IS_IPOD: boolean = /ipod/i.test(UA) && !(window as any).MSStream

Check if browser's user agent is related to an iPod.

type

boolean

default

Const IS_SAFARI

IS_SAFARI: boolean = /safari/i.test(UA) && !IS_CHROME

Check if current browser is WebKit Safari (any version).

type

boolean

default

Const IS_STOCK_ANDROID

IS_STOCK_ANDROID: boolean = /^mozilla\/\d+\.\d+\s\(linux;\su;/i.test(UA)

Check if current browser is Android's Stock browser (any version).

type

boolean

default

Const NAV

NAV: any = (window as any).navigator

Reference of Window.Navigator to obtain browser's information.

type

Navigator

default

Const SUPPORTS_NATIVE_HLS

SUPPORTS_NATIVE_HLS: boolean = (IS_SAFARI || (IS_ANDROID && (IS_CHROME || IS_STOCK_ANDROID)) || (IS_IE && /edge/i.test(UA)))

Check if current browser supports natively HLS streaming.

see

https://developer.jwplayer.com/articles/html5-report/adaptive-streaming/hls.html

type

boolean

default

Const UA

UA: any = NAV.userAgent.toLowerCase()

Browser's user agent.

type

string

default

Generated using TypeDoc