@@ -54,6 +54,8 @@ import type {
5454 CmcdData ,
5555 ReactVideoSource ,
5656 AdConfig ,
57+ AdConfigDAIVod ,
58+ AdConfigDAILive ,
5759} from './types' ;
5860import type { ISO639_1 } from './types/language' ;
5961import type { AdsConfig } from './specs/VideoNativeComponent' ;
@@ -68,18 +70,18 @@ function normalizeAdConfig(
6870 const adType = 'type' in ad ? ad . type : 'csai' ;
6971
7072 if ( adType === 'dai' ) {
73+ const daiAd = ad as AdConfigDAIVod | AdConfigDAILive ;
7174 return {
7275 type : 'dai' ,
73- streamType : 'streamType' in ad ? ad . streamType : undefined ,
74- adLanguage : ad . adLanguage ,
76+ streamType : daiAd . streamType ,
77+ adLanguage : daiAd . adLanguage ,
7578 contentSourceId :
76- 'contentSourceId' in ad ? ad . contentSourceId : undefined ,
77- videoId : 'videoId' in ad ? ad . videoId : undefined ,
78- assetKey : 'assetKey' in ad ? ad . assetKey : undefined ,
79- format : 'format' in ad ? ad . format : undefined ,
80- adTagParameters :
81- 'adTagParameters' in ad ? ad . adTagParameters : undefined ,
82- fallbackUri : 'fallbackUri' in ad ? ad . fallbackUri : undefined ,
79+ 'contentSourceId' in daiAd ? daiAd . contentSourceId : undefined ,
80+ videoId : 'videoId' in daiAd ? daiAd . videoId : undefined ,
81+ assetKey : 'assetKey' in daiAd ? daiAd . assetKey : undefined ,
82+ format : daiAd . format ,
83+ adTagParameters : daiAd . adTagParameters ,
84+ fallbackUri : daiAd . fallbackUri ,
8385 } ;
8486 }
8587
0 commit comments