Utils

Platform

Utility functions for detecting the platform the player runs on, such as web, TV or a tablet.

PlatformUtils

An object containing utility functions for platform detection.

Usage

import { PlatformUtils } from 'react-native-video-toolkit';

const isWeb = PlatformUtils.isWeb();

Properties

PropertyTypeDescription
isTV() => booleanReturns true if the platform is a TV.
isWeb() => booleanReturns true if the platform is the web.
isMobile() => booleanReturns true if the platform is mobile (not a TV or the web).
isTVOS() => booleanReturns true if the platform is tvOS.
isAndroidTV() => booleanReturns true if the platform is Android TV.
isTablet() => booleanReturns true if the screen's shorter side is at least 600 dp.

Example

import { PlatformUtils } from 'react-native-video-toolkit';

const isWeb = PlatformUtils.isWeb();
// isWeb will be true if the platform is web

On this page