UNPKG

@zezosoft/zezo-ott-react-native-video-player

Version:

React Native OTT Video Player for Android & iOS. Supports playlists, seasons, auto-next playback, subtitles, theming, analytics, fullscreen mode, and custom controls. 🚀 Powered by ZezoSoft.

47 lines (46 loc) • 1.13 kB
"use strict"; import { createContext, useContext } from 'react'; import { scale } from 'react-native-size-matters'; import { jsx as _jsx } from "react/jsx-runtime"; const defaultTheme = { colors: { primary: '#ff0000', secondary: '#999999', background: '#000000', onBackground: '#E2E8F0', text: '#ffffff', white: '#ffffff', black: '#000000', track: '#868686f0', buffer: '#ffffffd1' }, metrics: { thumbSize: scale(14), sliderHeight: scale(4), controlSize: scale(28) } }; const VideoPlayerConfigContext = /*#__PURE__*/createContext(defaultTheme); export const VideoPlayerConfigProvider = ({ children, theme }) => { const mergedTheme = { ...defaultTheme, ...theme, colors: { ...defaultTheme.colors, ...theme?.colors }, metrics: { ...defaultTheme.metrics, ...theme?.metrics } }; return /*#__PURE__*/_jsx(VideoPlayerConfigContext.Provider, { value: mergedTheme, children: children }); }; export const useVideoPlayerConfig = () => useContext(VideoPlayerConfigContext); //# sourceMappingURL=VideoPlayerConfig.js.map