DAI with DRM(Fairplay) for iOS

69 views
Skip to first unread message

Hailiang

unread,
Jan 6, 2023, 12:05:12 AM1/6/23
to Google Mobile Ads SDK Developers
Hi Team:

We are trying to implement a feature using google DAI with DRM(Fairplay) on iOS.
We have setup an asset with DRM stream, using SAMPLE-AES to encrypt the streams, 

The m3u8 looks like:
#EXTM3U
#EXT-X-VERSION:5
#EXT-X-TARGETDURATION:6
#EXT-X-MEDIA-SEQUENCE:248572
#EXT-X-DISCONTINUITY-SEQUENCE:22


#EXT-X-KEY:METHOD=SAMPLE-AES,URI="skd://2BA10A268D805ED1FB9047D18342592F",IV=0x2BA10A268D805ED1FB9047D18342592F,KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"
#EXT-X-CUE-IN
#EXTINF:6.000000,
#EXT-X-PROGRAM-DATE-TIME:2023-01-06T03:41:33.059Z
#EXTINF:6.000000,

When trying to play it with the latest google ads ima sdk, we got an error says 
"The operation couldn’t be completed. (kCFErrorDomainCFNetwork error -1002 - unsupported URL”.
The unsupported URL in the error is ’skd://2BA10A268D805ED1FB9047D18342592F'. 

Main codes as below:
    // Create an ad display container for ad rendering.
    let adDisplayContainer = IMAAdDisplayContainer(adContainer: videoView, viewController: self, companionSlots: nil)
    // Create an IMAAVPlayerVideoDisplay to give the SDK access to your video player.
    let imaVideoDisplay = IMAAVPlayerVideoDisplay(avPlayer: avPlayer)
    // Create a stream request. Use one of "Live stream request" or "VOD request".
    // Live stream request.
    let request = IMALiveStreamRequest(assetKey: Constants.assetKey, adDisplayContainer: adDisplayContainer, videoDisplay: imaVideoDisplay)
    self.adsLoader.requestStream(with: request)

We do have a license server for the client to get the data to decrypt the streams when the player trying to load the url asset with prefix ’skd://', but we can’t find a way to set the license server url to the ima sdk, or something else to make this.

We have tried `IMAAVPlayerVideoDisplayDelegate`, but this is just an async callback, it can not block the original asset loading request, so we can not get the data from our license server and pass it to the resource loader.

So for this case, how can I do to implement this feature with google ima sdk? Any help is appreciated.

Thanks, 
Hailiang

Mobile Ads SDK Forum Advisor

unread,
Jan 6, 2023, 3:09:41 AM1/6/23
to shl8...@gmail.com, google-adm...@googlegroups.com

Hi Hailiang,

 

Thank you for reaching out to us.

 

In looking into your concern, it seems that your concern is much related to the IMA SDK than Mobile Ads SDK. With that, we recommend reaching out to them using this forum link for them to assist you better on the errors you've encountered using the IMA DAI SDK.

 

Regards,

Google Logo
Princess Pamela
Mobile Ads SDK Team
 



ref:_00D1U1174p._5004Q2haKiu:ref
Reply all
Reply to author
Forward
0 new messages