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
Since the IMA sdk code cannot be viewed completely,I can't understand how exoplayer interacts with IMA sdk? Please give me some advices how to custom a AdLoader to support pre_roll, mid_roll,post_roll? thanks!
Our own ad sdk just send a request to server, then server response with informations of ads. The information contains ad uri, duration, timeoffset(when to play ad), ad type(pre/mid/post) and so on.
The text was updated successfully, but these errors were encountered:
The code with which ExoPlayer interacts with the IMA SDK can be viewed here. If you have another SDK, please implement a matching AdsLoader.
In its simplest implementation, the AdsLoader should request the ads in attachPlayer and abandon all requests in detachPlayer. As soon as you have the information about the ads, create a AdPlaybackState and call onAdPlaybackState in the provided listener to inform the player of the ad information. Similarly, you should call onAdLoadError if you fail to load the ad.
You will also need to add a listener to the player and listen to onPositionDiscontinuity to know when an ad has been played and to update the AdPlaybackState accordingly. This prevents that the same ad is played again.
I found issue #4680, @andrewlewis said that will give a implementing like a FixedAdsLoader . I have tried with your advices. It's not easy. Hope you can give a sample code. @tonihei
Yes, #4680 is pretty similar. If you have all the ad information in advance before starting to play the video, such a FixedAdsLoader would help as well. Unfortunately, we don't have an example yet and #4680 is used to track that.
Closing this issue as duplicate. If you think your issue is different, please feel free to reopen.
Since the IMA sdk code cannot be viewed completely,I can't understand how exoplayer interacts with IMA sdk? Please give me some advices how to custom a AdLoader to support pre_roll, mid_roll,post_roll? thanks!
Our own ad sdk just send a request to server, then server response with informations of ads. The information contains ad uri, duration, timeoffset(when to play ad), ad type(pre/mid/post) and so on.
The text was updated successfully, but these errors were encountered: