UNPKG

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

Version:

Production-ready React Native OTT video player library for Android & iOS. Features: playlists, seasons, auto-next playback, subtitles (SRT/VTT), custom theming, analytics tracking, fullscreen mode, gesture controls, ads player (pre-roll/mid-roll/post-roll

31 lines (29 loc) 755 B
"use strict"; import { useAdsPlayerStore } from "../store/adsPlayerStore.js"; /** * Reusable function to reset ad state * Consolidates duplicate logic for resetting ad state across components */ export const resetAdState = () => { try { const { setIsAdPlaying, setCurrentAd, setAdCurrentTime, setAdDuration, setShowSkipButton, setIsAdPaused, setIsAdBuffering } = useAdsPlayerStore.getState(); setIsAdPlaying(false); setCurrentAd(null); setAdCurrentTime(0); setAdDuration(0); setShowSkipButton(false); setIsAdPaused(false); setIsAdBuffering(false); } catch (error) { console.error('Error resetting ad state:', error); } }; //# sourceMappingURL=adStateReset.js.map