neekeetab / CachingPlayerItem

Play and cache media content simultaneously on your iOS device
MIT License
520 stars 89 forks source link

How can I specify custom headers? init(asset: AVAsset) not implemented #20

Closed fadizant closed 5 years ago

fadizant commented 5 years ago

how can I use AVAsset with this control, I have to use AVAsset in order to add header to my URL advice please.

neekeetab commented 5 years ago

You can avoid using init(asset: AVAsset) if you just want to add custom headers. What you can do instead is to change ResourceLoaderDelegate's startDataRequest(with:) method and provide the necessary headers to the dataTask.