Hello Hailiang,
Michael here from IMA SDK Support team. Thank you for reaching out to us.
The IMA DAI SDK supports only video streams rendered by Ad Manager 360's Ad Insertion servers. For specific implementation questions about the capabilities of these streams, I would recommend contacting your Ad Manager support representative.
Regards,
|
||||||
Hello Hailiang,
Thank you for responding back to us. Would you be able to share with us the below information so we can raise this concern to the rest of our team?
If the file(s) you are looking to share are less than 25mb in total you can attach them to this case privately via "Reply To Author" button on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files with me by performing the following steps:
1. Navigate to
2. Fill out all fields, and attach your file(s).
3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.
Regards,
Play asset: cAbVVJKiTLu60LtXzSSZFw Stream created with: ed3b8eef-111e-4e7f-b351-3c6974612272:SIN2 playerVideoDisplay willLoadStreamAsset <AVURLAsset: 0x6000036814c0, URL = https://nldsmsltest01.akamaized.net/hls/live/2011713/2022120801-87261/playlist.m3u8?hdnea=st=1673444659~exp=1673444959~acl=*~id=7a523bcd-5908-4725-95ec-7de80d8ef016~hmac=55fd06d702c1cf1bd48657608eba202ea8fcbd53bc4267a0811bbe4e05f3de44&originpath=/linear/hls/pb/event/cAbVVJKiTLu60LtXzSSZFw/stream/ed3b8eef-111e-4e7f-b351-3c6974612272:SIN2/master.m3u8>; StreamManager event (Stream Loaded) playerVideoDisplay didLoad <AVPlayerItem: 0x6000034127e0, asset = <AVURLAsset: 0x6000036814c0, URL = https://nldsmsltest01.akamaized.net/hls/live/2011713/2022120801-87261/playlist.m3u8?hdnea=st=1673444659~exp=1673444959~acl=*~id=7a523bcd-5908-4725-95ec-7de80d8ef016~hmac=55fd06d702c1cf1bd48657608eba202ea8fcbd53bc4267a0811bbe4e05f3de44&originpath=/linear/hls/pb/event/cAbVVJKiTLu60LtXzSSZFw/stream/ed3b8eef-111e-4e7f-b351-3c6974612272:SIN2/master.m3u8>>; Playback finished Playback Error: Error Domain=CoreMediaErrorDomain Code=1718449215 "See -[AVPlayerItem errorLog] for 2 events" UserInfo={NSDebugDescription=See -[AVPlayerItem errorLog] for 2 events} StreamManager error with type: IMAErrorType(rawValue: 2) code: IMAErrorCode(rawValue: 400) message:The operation couldn’t be completed. (CoreMediaErrorDomain error 1718449215.)Regards,
|
||||||
Play asset: cAbVVJKiTLu60LtXzSSZFw
Stream created with: f126c0c4-427b-4eef-b568-9cec4c582873:SIN
playerVideoDisplay willLoadStreamAsset <AVURLAsset: 0x280f2fc80, URL = https://nldsmsltest01.akamaized.net/hls/live/2011713/2022120801-87261/playlist.m3u8?hdnea=st=1673835552~exp=1673835852~acl=*~id=e4cd110b-20c1-4c15-bf6c-dec9c2411d4a~hmac=951530434d68776a4eb9ac2a8ca698a9f5378aca16d0f0a2e9f5b01243170db8&originpath=/linear/hls/pb/event/cAbVVJKiTLu60LtXzSSZFw/stream/f126c0c4-427b-4eef-b568-9cec4c582873:SIN/master.m3u8>
StreamManager event (Stream Loaded)
playerVideoDisplay didLoad <AVPlayerItem: 0x280d04e30, asset = <AVURLAsset: 0x280f2fc80, URL = https://nldsmsltest01.akamaized.net/hls/live/2011713/2022120801-87261/playlist.m3u8?hdnea=st=1673835552~exp=1673835852~acl=*~id=e4cd110b-20c1-4c15-bf6c-dec9c2411d4a~hmac=951530434d68776a4eb9ac2a8ca698a9f5378aca16d0f0a2e9f5b01243170db8&originpath=/linear/hls/pb/event/cAbVVJKiTLu60LtXzSSZFw/stream/f126c0c4-427b-4eef-b568-9cec4c582873:SIN/master.m3u8>>
2023-01-16 10:19:14.996763+0800 GoogleDAIDemo[11399:21602444] NSURLConnection finished with error - code -1002
2023-01-16 10:19:15.710941+0800 GoogleDAIDemo[11399:21602446] NSURLConnection finished with error - code -1002
2023-01-16 10:19:16.320800+0800 GoogleDAIDemo[11399:21602507] NSURLConnection finished with error - code -1002
2023-01-16 10:19:19.332653+0800 GoogleDAIDemo[11399:21602507] NSURLConnection finished with error - code -1002
2023-01-16 10:19:23.351330+0800 GoogleDAIDemo[11399:21602507] NSURLConnection finished with error - code -1002
2023-01-16 10:19:23.490031+0800 GoogleDAIDemo[11399:21602447] NSURLConnection finished with error - code -1002
2023-01-16 10:19:28.500894+0800 GoogleDAIDemo[11399:21602447] NSURLConnection finished with error - code -1002
2023-01-16 10:19:33.514677+0800 GoogleDAIDemo[11399:21602507] NSURLConnection finished with error - code -1002
2023-01-16 10:19:33.731590+0800 GoogleDAIDemo[11399:21602443] NSURLConnection finished with error - code -1002
2023-01-16 10:19:38.750385+0800 GoogleDAIDemo[11399:21602443] NSURLConnection finished with error - code -1002
2023-01-16 10:19:43.775620+0800 GoogleDAIDemo[11399:21602447] NSURLConnection finished with error - code -1002
2023-01-16 10:19:44.052062+0800 GoogleDAIDemo[11399:21602507] NSURLConnection finished with error - code -1002
2023-01-16 10:19:49.084767+0800 GoogleDAIDemo[11399:21602447] NSURLConnection finished with error - code -1002
Playback finished
Playback Error: Error Domain=NSURLErrorDomain Code=-1002 "See -[AVPlayerItem errorLog] for 12 events" UserInfo={NSDebugDescription=See -[AVPlayerItem errorLog] for 12 events, NSLocalizedDescription=unsupported URL, NSUnderlyingError=0x2801a89c0 {Error Domain=kCFErrorDomainCFNetwork Code=-1002 "The operation couldn’t be completed. (kCFErrorDomainCFNetwork error -1002 - unsupported URL)" UserInfo={NSDescription=The operation couldn’t be completed. (kCFErrorDomainCFNetwork error -1002 - unsupported URL)}}}
StreamManager error with type: IMAErrorType(rawValue: 2)
code: IMAErrorCode(rawValue: 400)
message:unsupported URL
If you look into the m3u8:
You may find something like this:
#EXTM3U
#EXT-X-VERSION:5
#EXT-X-TARGETDURATION:6
#EXT-X-MEDIA-SEQUENCE:394796
#EXT-X-DISCONTINUITY-SEQUENCE:39
#EXT-X-KEY:METHOD=SAMPLE-AES,URI="skd://2BA10A268D805ED1FB9047D18342592F",IV=0x2BA10A268D805ED1FB9047D18342592F,KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"
#EXTINF:6.000000,
I think this is becuase the URI started with `skd://` is not correctly handled in ima sdk.
In my understanding, the expected behavior should be:
When detective that the URI is started with `skd://`, the ima sdk should call the DRM license server (should be passed by the client app) to get the data, and put the data into the asset request to decrypt the stream content for playback.
- (void)avPlayerVideoDisplay:(IMAAVPlayerVideoDisplayDelegate *)avPlayerVideoDisplay willLoadStreamAsset:(AVURLAsset *)avUrlAsset { AVContentKeySession *keySession; id<AVAssetResourceLoaderDelegate> resourceLoaderDelegate; dispatch_queue_t delegateQueue; ... asset.resourceLoader.preloadsEligibleContentKeys = true; [asset.resourceLoader setDelegate:resourceLoaderDelegate queue:delegateQueue]; [keySession addContentKeyRecipient: asset]; }