@tivio/sdk-react 9.7.1 → 9.8.0
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/CHANGELOG.md +369 -0
- package/README.md +172 -11
- package/README.md.bak +172 -11
- package/dist/index.d.ts +63 -1
- package/dist/index.js +1 -1
- package/dist/sdk-react.d.ts +63 -1
- package/package.json +2 -2
package/dist/sdk-react.d.ts
CHANGED
|
@@ -104,6 +104,7 @@ export declare type AdMetadata = {
|
|
|
104
104
|
isSkippable: boolean;
|
|
105
105
|
order: number | null;
|
|
106
106
|
totalCount: number | null;
|
|
107
|
+
adPlacementStrategy: AdPlacementStrategy;
|
|
107
108
|
customAdMetadata?: Record<string, unknown>;
|
|
108
109
|
skip: () => void;
|
|
109
110
|
} | null;
|
|
@@ -118,7 +119,10 @@ export declare interface AdPackInfo {
|
|
|
118
119
|
total: number;
|
|
119
120
|
}
|
|
120
121
|
|
|
122
|
+
export declare type AdPlacementStrategy = 'preroll' | 'midroll' | 'postroll' | 'replacement';
|
|
123
|
+
|
|
121
124
|
export declare interface AdSegment {
|
|
125
|
+
adPlacementStrategy: AdPlacementStrategy;
|
|
122
126
|
id: string;
|
|
123
127
|
/**
|
|
124
128
|
* @deprecated alias to secondsToEnd * 1000
|
|
@@ -183,6 +187,7 @@ export declare interface AdSourceActions {
|
|
|
183
187
|
*/
|
|
184
188
|
export declare interface AdSourceInterface extends CommonSourceInterface<SourceType.ADVERTISEMENT> {
|
|
185
189
|
adType: AdType;
|
|
190
|
+
adPlacementStrategy: AdPlacementStrategy;
|
|
186
191
|
durationMs: number;
|
|
187
192
|
skipDelayMs: number | null;
|
|
188
193
|
/**
|
|
@@ -233,6 +238,7 @@ export declare interface AdSourceInterface extends CommonSourceInterface<SourceT
|
|
|
233
238
|
*/
|
|
234
239
|
export declare interface AdSourceParams extends CommonSourceParams<SourceType.ADVERTISEMENT> {
|
|
235
240
|
id: string;
|
|
241
|
+
adPlacementStrategy: AdPlacementStrategy;
|
|
236
242
|
adType?: AdType;
|
|
237
243
|
actions?: AdSourceActions | null;
|
|
238
244
|
apiFramework?: VastApiFramework | null;
|
|
@@ -761,6 +767,7 @@ export declare interface ChannelSourceInterface extends PlayerSourceInterface<So
|
|
|
761
767
|
to: Date;
|
|
762
768
|
poster: string | null;
|
|
763
769
|
tvMode: TvMode | 'live' | null;
|
|
770
|
+
clone: (params?: Partial<ChannelSourceParams>) => ChannelSourceInterface;
|
|
764
771
|
}
|
|
765
772
|
|
|
766
773
|
/**
|
|
@@ -1603,6 +1610,9 @@ export declare interface DidomiWindow {
|
|
|
1603
1610
|
* https://developers.didomi.io/cmp/web-sdk/reference/api
|
|
1604
1611
|
*/
|
|
1605
1612
|
didomiOnReady: (() => void)[];
|
|
1613
|
+
Didomi?: {
|
|
1614
|
+
getUserConsentStatusForPurpose: (category: string) => boolean;
|
|
1615
|
+
};
|
|
1606
1616
|
}
|
|
1607
1617
|
|
|
1608
1618
|
/**
|
|
@@ -2154,6 +2164,10 @@ export declare interface GetSourceUrlResponse {
|
|
|
2154
2164
|
* Determines session type generated for source. If no provided it will be considered 'ondemand' session type.
|
|
2155
2165
|
*/
|
|
2156
2166
|
sessionType?: VideoSourceField['sessionType'];
|
|
2167
|
+
/**
|
|
2168
|
+
* Language of the source.
|
|
2169
|
+
*/
|
|
2170
|
+
language?: LangCode;
|
|
2157
2171
|
}
|
|
2158
2172
|
|
|
2159
2173
|
export declare type GetTilesInRowResponse<U extends NextPageParamType = NextPageParamType> = PaginatedResponse<TileData, U>;
|
|
@@ -3582,6 +3596,11 @@ export declare type PlayerConfig = {
|
|
|
3582
3596
|
*/
|
|
3583
3597
|
name: 'IMA SDK' | 'TIVIO AD SERVICE';
|
|
3584
3598
|
};
|
|
3599
|
+
/**
|
|
3600
|
+
* If true, then TV channels are not available for anonymous users and they will be shown an overlay to sign in.
|
|
3601
|
+
* @default false
|
|
3602
|
+
*/
|
|
3603
|
+
disableTvChannelsForAnonymousUsers?: boolean;
|
|
3585
3604
|
};
|
|
3586
3605
|
|
|
3587
3606
|
/**
|
|
@@ -3705,6 +3724,11 @@ export declare interface PlayerEngineInterface {
|
|
|
3705
3724
|
*/
|
|
3706
3725
|
setPlaysInline(value: boolean): void;
|
|
3707
3726
|
setControlsList(value: string[]): void;
|
|
3727
|
+
/** Gets resolution of the video element in pixels - container size, not the actual source quality resolution */
|
|
3728
|
+
getVideoResolution(): {
|
|
3729
|
+
width: number;
|
|
3730
|
+
height: number;
|
|
3731
|
+
};
|
|
3708
3732
|
}
|
|
3709
3733
|
|
|
3710
3734
|
/**
|
|
@@ -3800,6 +3824,11 @@ export declare interface PlayerInterface {
|
|
|
3800
3824
|
*/
|
|
3801
3825
|
setPlaysInline?: (value: boolean) => void;
|
|
3802
3826
|
setControlsList?: (value: string[]) => void;
|
|
3827
|
+
/** Gets resolution of the video element in pixels - container size, not the actual source quality resolution */
|
|
3828
|
+
getVideoResolution(): {
|
|
3829
|
+
width: number;
|
|
3830
|
+
height: number;
|
|
3831
|
+
};
|
|
3803
3832
|
}
|
|
3804
3833
|
|
|
3805
3834
|
/**
|
|
@@ -3902,6 +3931,13 @@ export declare type PlayerState = 'idle' | 'playing' | 'paused';
|
|
|
3902
3931
|
* @public
|
|
3903
3932
|
*/
|
|
3904
3933
|
export declare interface PlayerWrapper {
|
|
3934
|
+
/**
|
|
3935
|
+
* Unique id of the player wrapper instance, set at construction time
|
|
3936
|
+
* (e.g. by `tivio.getPlayerWrapper(id)`). Used to scope DOM ids of
|
|
3937
|
+
* player-owned elements (IMA ad containers, content video element, …)
|
|
3938
|
+
* so multiple players on the same page don't collide.
|
|
3939
|
+
*/
|
|
3940
|
+
readonly id: string;
|
|
3905
3941
|
/**
|
|
3906
3942
|
* Report that playback of video has finished
|
|
3907
3943
|
*/
|
|
@@ -4006,6 +4042,10 @@ export declare interface PlayerWrapper {
|
|
|
4006
4042
|
setCanPlay: (canPlay: boolean) => void;
|
|
4007
4043
|
toggleMuted: () => void;
|
|
4008
4044
|
getQualities: () => Track[];
|
|
4045
|
+
getVideoResolution: () => {
|
|
4046
|
+
width: number;
|
|
4047
|
+
height: number;
|
|
4048
|
+
};
|
|
4009
4049
|
playNativeImaAd: (url: string) => void;
|
|
4010
4050
|
playSourceAfterAdsRun: () => void;
|
|
4011
4051
|
putAd: (ad: AdSourceInterface) => void;
|
|
@@ -5799,6 +5839,18 @@ export declare interface SimplifiedVideoController {
|
|
|
5799
5839
|
*/
|
|
5800
5840
|
setSource(source: WebPlayerProps['source']): void;
|
|
5801
5841
|
setAdsConfig(adsConfig: StaticAdsBreak[]): void;
|
|
5842
|
+
/**
|
|
5843
|
+
* Toggle the minimal OSD mode.
|
|
5844
|
+
*
|
|
5845
|
+
* When enabled, the player shows only a minimal set of controls (play/pause,
|
|
5846
|
+
* volume and fullscreen) and a small center play/pause icon that briefly
|
|
5847
|
+
* flashes when the state changes. Intended for small/pinned containers such
|
|
5848
|
+
* as a scroll-fixed mini player in the corner of the page or a full-width
|
|
5849
|
+
* mobile player pinned to the top of the viewport.
|
|
5850
|
+
*
|
|
5851
|
+
* @param isMinimal - Whether the minimal OSD should be used
|
|
5852
|
+
*/
|
|
5853
|
+
setIsMinimal(isMinimal: boolean): void;
|
|
5802
5854
|
/**
|
|
5803
5855
|
* Destroy the player and clean up all resources
|
|
5804
5856
|
*/
|
|
@@ -6834,6 +6886,8 @@ export declare type TivioReactBundle = {
|
|
|
6834
6886
|
*/
|
|
6835
6887
|
internal: TivioInternalBundle;
|
|
6836
6888
|
analytics: TivioAnalytics;
|
|
6889
|
+
addToFavoritesByPath: (path: string) => Promise<void>;
|
|
6890
|
+
removeFromFavoritesByPath: (path: string) => Promise<void>;
|
|
6837
6891
|
destroy: () => Promise<void>;
|
|
6838
6892
|
} & Pick<TivioSetters, 'setBundleVersion' | 'setUser' | 'setLanguage' | 'setStorageManager'> & Omit<Partial<TivioJsBundleExposedApi>, 'createPlayerWrapper'>;
|
|
6839
6893
|
|
|
@@ -8233,7 +8287,7 @@ export declare interface ViewCountItem {
|
|
|
8233
8287
|
/**
|
|
8234
8288
|
* @public
|
|
8235
8289
|
*/
|
|
8236
|
-
export declare interface VirtualChannelSourceInterface extends ChannelSourceInterface {
|
|
8290
|
+
export declare interface VirtualChannelSourceInterface extends Omit<ChannelSourceInterface, 'clone'> {
|
|
8237
8291
|
tvChannelType: TvChannelType.VIRTUAL;
|
|
8238
8292
|
program?: TvProgram | null;
|
|
8239
8293
|
video?: Video | null;
|
|
@@ -8743,6 +8797,14 @@ export declare interface WebPlayerProps {
|
|
|
8743
8797
|
* If true then OSD is shown based on condition resolved in HidableOsdContainer, e.g. on pause, on mouse move etc.
|
|
8744
8798
|
*/
|
|
8745
8799
|
showOsd?: boolean;
|
|
8800
|
+
/**
|
|
8801
|
+
* If true, then only a minimal set of OSD controls is shown (play/pause, volume, fullscreen)
|
|
8802
|
+
* and the big center play/pause button only flashes briefly on state change.
|
|
8803
|
+
*
|
|
8804
|
+
* Intended for small fixed containers (e.g. a scroll-pinned mini player in the corner
|
|
8805
|
+
* of the page, or a full-width mobile player pinned to the top of the viewport).
|
|
8806
|
+
*/
|
|
8807
|
+
isMinimal?: boolean;
|
|
8746
8808
|
/**
|
|
8747
8809
|
* If false, then buffering spinner is never shown.
|
|
8748
8810
|
* If true then buffering spinner is shown while buffering.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tivio/sdk-react",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.8.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@material-ui/core": "^4.11.2",
|
|
39
39
|
"@material-ui/icons": "^4.11.2",
|
|
40
40
|
"@sentry/browser": "^6.1.0",
|
|
41
|
-
"@tivio/common": "1.1.
|
|
41
|
+
"@tivio/common": "1.1.144",
|
|
42
42
|
"dayjs": "^1.11.0",
|
|
43
43
|
"es7-object-polyfill": "^1.0.1",
|
|
44
44
|
"firebase": "8.10.1",
|