extract asset id from playlist (fairplay)

I'm trying to implement FairPlay audio playback in an mobile app, and wondering how I can extract asset id from a HLS playlist used to request FPS keys using AVContentKeySession? IMHO, asset id is defined by #EXT-X-KEY:METHOD=SAMPLE-AES,URI="skd://token" in HLS playlist.


Currently, I send an extra request to my server to determine asset id. There must be easier way.

I place mine in the key uri. For example, "skd://token?assetid=23asdf"

Hi,


The 'Host' parameter of the URI atrribute (in this example:- 'token'), can be retrirevd via the 'identifier' property of AVContentKeyRequest.

This will work for Just In Time acquisition of the key(s).


If you need to prefetch the keys, you will need to carry the assetId out of band or parse it from the playlist (EXT-X-KEY...)

extract asset id from playlist (fairplay)
 
 
Q