Setting a custom UserAgent string for an audio app - AVPlayer

I have a swift app that uses streaming audio (AVPlayer) and I need to set the UserAgent string to something custom, for the sake of this question the custom string is "StreamApp4.0". I've seen a number of articles that address setting the useragent string for a web view but not AVplayer. Could someone please let me know how to set it for AVplayer?

Replies

I have the same problem too. Did anyone find a solution for customising the user agent of an AVURLAsset? Thanks!
You may need to use AVAssetResourceLoader.