-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathGoogleDAIConfiguration.ts
136 lines (121 loc) · 4.05 KB
/
GoogleDAIConfiguration.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
import type { TypedSource } from '../../SourceDescription';
import type { ServerSideAdInsertionConfiguration } from './ServerSideAdInsertionConfiguration';
/**
* The identifier of the Google DAI integration.
*
* @public
*/
export type GoogleDAISSAIIntegrationID = 'google-dai';
/**
* The type of the stream requested from Google DAI, represented by a value from the following list:
* <br/> - `'live'`: The requested stream is a live stream.
* <br/> - `'vod'`: The requested stream is a video-on-demand stream.
*
* @public
*/
export type DAIAvailabilityType = 'vod' | 'live';
/**
* Represents a configuration for server-side ad insertion with the Google DAI pre-integration.
*
* @public
*/
export interface GoogleDAIConfiguration extends ServerSideAdInsertionConfiguration {
/**
* The type of the requested stream.
*/
readonly availabilityType?: DAIAvailabilityType;
/**
* The identifier for the SSAI pre-integration.
*/
integration: GoogleDAISSAIIntegrationID;
/**
* The authorization token for the stream request.
*
* @remarks
* <br/> - If present, this token is used instead of the API key for stricter content authorization.
* <br/> - The publisher can control individual content streams authorizations based on this token.
*/
authToken?: string;
/**
* The API key for the stream request.
*
* @remarks
* <br/> - This key is used to verify applications that are attempting to access the content.
* <br/> - This key is configured through the Google Ad Manager UI.
*/
apiKey: string;
/**
* The ad tag parameters added to stream request.
*
* @remarks
* <br/> - Each entry contains the parameter name with associated value.
*
* Valid parameters:
* <br/> - {@link https://support.google.com/admanager/answer/7320899 | Supply targeting parameters to your stream}
* <br/> - {@link https://support.google.com/admanager/answer/7320898 | Override stream variant parameters}
*/
adTagParameters?: Record<string, string>;
/**
* The identifier for a stream activity monitor session.
*/
streamActivityMonitorID?: string;
}
/**
* Represents a configuration for server-side ad insertion with the Google DAI pre-integration for a Live media stream.
*
* @public
*/
export interface GoogleDAILiveConfiguration extends GoogleDAIConfiguration {
/**
* The type of the requested stream.
*/
readonly availabilityType: 'live';
/**
* The identifier for the video content source for live streams.
*
* @remarks
* <br/> - This property is required for live streams.
* <br/> - The asset key can be found in the Google Ad Manager UI.
*/
assetKey: string;
}
/**
* Represents a configuration for server-side ad insertion with the Google DAI pre-integration for a VOD media stream.
*
* @public
*/
export interface GoogleDAIVodConfiguration extends GoogleDAIConfiguration {
/**
* The type of the requested stream.
*/
readonly availabilityType: 'vod';
/**
* The identifier for the publisher content for on-demand streams.
*
* @remarks
* <br/> - The publisher content comes from a CMS.
* <br/> - This property is required for on-demand streams.
*/
contentSourceID: string;
/**
* The identifier for the video content source for on-demand streams.
*
* @remarks
* <br/> - This property is required for on-demand streams.
*/
videoID: string;
}
/**
* Represents a media resource with a Google DAI server-side ad insertion request.
*
* @public
*/
export interface GoogleDAITypedSource extends TypedSource {
/**
* The content type (MIME type) of the media resource, represented by a value from the following list:
* <br/> - `'application/dash+xml'`: The media resource is an MPEG-DASH stream.
* <br/> - `'application/x-mpegURL'` or `'application/vnd.apple.mpegurl'`: The media resource is an HLS stream.
*/
type: string;
ssai: GoogleDAIVodConfiguration | GoogleDAILiveConfiguration;
}