You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I am using the PlayKit_IMA plugin to play pre-roll ads in our React Native TVos. The first time I open the video player the ad loads as expected, however if I then exit the player and open it again the ad does not load anymore. AdEvents.AD_REQUESTED is fired, but AdEvents.STARTED is not.
Setup
player.setup(PLAYER_TYPE.OTT,JSON.stringify(playerOptions),partnerId).then(()=>{// ... Check if component is already mounted and destroy the player if it isplayer.loadMedia(assetId,JSON.stringify(mediaAsset)).then(()=>{// ...}).catch((error: KalturaError)=>{// ... Set the error to a global redux state})}).catch((error)=>{// ... Set the error to a global redux state})
Observation
As far as I can tell the issue is that in IMAPlugin.swift when the ad is loaded it is immediately discarded as well, but I haven't been able to figure out why.
case .LOADED:
// This if condition triggers when the player is opened for the second time
ifshouldDiscard(ad: event.ad, currentState: currentState){self.discardAdBreak(adsManager: adsManager)}else{varadEvent=AdEvent.AdLoaded()iflet ad = event.ad {letadInfo=PKAdInfo(ad: ad,
podCount: adsManager.adCuePoints.count,
adPlayHead:.nan)self.pkAdInfo = adInfo
adEvent =AdEvent.AdLoaded(adInfo: adInfo)}self.notify(event: adEvent)
// if we have more than one ad don't start the manager, it will be handled in `AD_BREAK_READY`
guard adsManager.adCuePoints.count ==0else{return}guardcanPlayAd(forState: currentState)else{return}self.start(adsManager: adsManager)}
Any suggestion would be highly appreciated.
Thank you!
The text was updated successfully, but these errors were encountered:
Description
I am using the PlayKit_IMA plugin to play pre-roll ads in our React Native TVos. The first time I open the video player the ad loads as expected, however if I then exit the player and open it again the ad does not load anymore.
AdEvents.AD_REQUESTED
is fired, butAdEvents.STARTED
is not.Setup
Where the initial config looks like this:
Not sure if it is relevant for the config, but we are playing DRM protected videos.
Versions
Gemfile:
Observation
As far as I can tell the issue is that in
IMAPlugin.swift
when the ad is loaded it is immediately discarded as well, but I haven't been able to figure out why.Any suggestion would be highly appreciated.
Thank you!
The text was updated successfully, but these errors were encountered: