@zezosoft/react-player 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -1
- package/dist/VideoPlayer/components/AdOverlayChrome.d.ts +15 -0
- package/dist/VideoPlayer/components/ImaAdOverlay.d.ts +9 -0
- package/dist/VideoPlayer/hooks/index.d.ts +1 -0
- package/dist/VideoPlayer/hooks/useAdManager.d.ts +2 -2
- package/dist/VideoPlayer/hooks/useImaAds.d.ts +8 -0
- package/dist/VideoPlayer/hooks/useOverlayAutoHide.d.ts +6 -0
- package/dist/VideoPlayer/hooks/usePrimaryVideoLifecycle.d.ts +2 -1
- package/dist/VideoPlayer/ima/buildAdTagUrl.d.ts +2 -0
- package/dist/VideoPlayer/ima/createImaAdBreak.d.ts +5 -0
- package/dist/VideoPlayer/ima/createImaRenderingSettings.d.ts +1 -0
- package/dist/VideoPlayer/ima/getImaSlotDimensions.d.ts +4 -0
- package/dist/VideoPlayer/ima/isVmapAdTag.d.ts +3 -0
- package/dist/VideoPlayer/ima/loadImaSdk.d.ts +10 -0
- package/dist/VideoPlayer/ima/suppressImaUi.d.ts +3 -0
- package/dist/VideoPlayer/ima/syncImaAdUi.d.ts +5 -0
- package/dist/VideoPlayer/ima/triggerImaSkip.d.ts +6 -0
- package/dist/VideoPlayer/types/AdTypes.d.ts +47 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1281 -140
- package/dist/store/slices/adsSlice.d.ts +15 -1
- package/dist/store/types/StoreTypes.d.ts +13 -1
- package/package.json +1 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { StateCreator } from "zustand";
|
|
2
|
-
import { AdBreak, AdType } from "../../VideoPlayer/types/AdTypes";
|
|
2
|
+
import { AdBreak, AdProvider, AdType, ImaPlaybackApi } from "../../VideoPlayer/types/AdTypes";
|
|
3
3
|
import { VideoState } from "../types/StoreTypes";
|
|
4
4
|
export interface AdsState {
|
|
5
5
|
isAdPlaying: boolean;
|
|
6
6
|
setIsAdPlaying: (isAdPlaying: boolean) => void;
|
|
7
|
+
adProvider: AdProvider | null;
|
|
8
|
+
setAdProvider: (provider: AdProvider | null) => void;
|
|
7
9
|
currentAd: AdBreak | null;
|
|
8
10
|
setCurrentAd: (ad: AdBreak | null) => void;
|
|
9
11
|
adType: AdType | null;
|
|
@@ -20,5 +22,17 @@ export interface AdsState {
|
|
|
20
22
|
setMidRollQueue: (queue: AdBreak[]) => void;
|
|
21
23
|
adVideoRef: HTMLVideoElement | null;
|
|
22
24
|
setAdVideoRef: (ref: HTMLVideoElement | null) => void;
|
|
25
|
+
imaAdContainerRef: HTMLDivElement | null;
|
|
26
|
+
setImaAdContainerRef: (ref: HTMLDivElement | null) => void;
|
|
27
|
+
imaPlayback: ImaPlaybackApi | null;
|
|
28
|
+
setImaPlayback: (api: ImaPlaybackApi | null) => void;
|
|
29
|
+
imaDestroy: (() => void) | null;
|
|
30
|
+
setImaDestroy: (fn: (() => void) | null) => void;
|
|
31
|
+
/** True when the current IMA ad can become skippable (VAST skip offset). */
|
|
32
|
+
imaSkipEnabled: boolean;
|
|
33
|
+
setImaSkipEnabled: (enabled: boolean) => void;
|
|
34
|
+
/** True once IMA pre-roll finished, failed, or timed out (unblocks content UI). */
|
|
35
|
+
imaPreRollGateComplete: boolean;
|
|
36
|
+
setImaPreRollGateComplete: (complete: boolean) => void;
|
|
23
37
|
}
|
|
24
38
|
export declare const createAdsSlice: StateCreator<VideoState, [], [], AdsState>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Hls from "hls.js";
|
|
2
2
|
import * as dashjs from "dashjs";
|
|
3
|
-
import { AdBreak, AdType } from "../../VideoPlayer/types/AdTypes";
|
|
3
|
+
import { AdBreak, AdProvider, AdType, ImaPlaybackApi } from "../../VideoPlayer/types/AdTypes";
|
|
4
4
|
export type StreamType = "hls" | "dash" | "mp4" | "other";
|
|
5
5
|
export interface VideoRefsState {
|
|
6
6
|
videoRef: HTMLVideoElement | null;
|
|
@@ -108,6 +108,8 @@ export interface VideoErrorState {
|
|
|
108
108
|
export interface AdsState {
|
|
109
109
|
isAdPlaying: boolean;
|
|
110
110
|
setIsAdPlaying: (isAdPlaying: boolean) => void;
|
|
111
|
+
adProvider: AdProvider | null;
|
|
112
|
+
setAdProvider: (provider: AdProvider | null) => void;
|
|
111
113
|
currentAd: AdBreak | null;
|
|
112
114
|
setCurrentAd: (ad: AdBreak | null) => void;
|
|
113
115
|
adType: AdType | null;
|
|
@@ -124,6 +126,16 @@ export interface AdsState {
|
|
|
124
126
|
setMidRollQueue: (queue: AdBreak[]) => void;
|
|
125
127
|
adVideoRef: HTMLVideoElement | null;
|
|
126
128
|
setAdVideoRef: (ref: HTMLVideoElement | null) => void;
|
|
129
|
+
imaAdContainerRef: HTMLDivElement | null;
|
|
130
|
+
setImaAdContainerRef: (ref: HTMLDivElement | null) => void;
|
|
131
|
+
imaPlayback: ImaPlaybackApi | null;
|
|
132
|
+
setImaPlayback: (api: ImaPlaybackApi | null) => void;
|
|
133
|
+
imaDestroy: (() => void) | null;
|
|
134
|
+
setImaDestroy: (fn: (() => void) | null) => void;
|
|
135
|
+
imaSkipEnabled: boolean;
|
|
136
|
+
setImaSkipEnabled: (enabled: boolean) => void;
|
|
137
|
+
imaPreRollGateComplete: boolean;
|
|
138
|
+
setImaPreRollGateComplete: (complete: boolean) => void;
|
|
127
139
|
}
|
|
128
140
|
export interface VideoState extends VideoRefsState, VideoPlaybackState, VideoTimingState, VideoControlsState, VideoQualityState, SubtitlesState, EpisodesState, IntroState, AdsState, VideoErrorState, StoreResetState {
|
|
129
141
|
}
|