VLCMedia.storeCookie appears to have no effect on outgoing HTTP requests.
audioPlayer!.media = VLCMedia(url: url)
audioPlayer!.media!.storeCookie("auth=token", forHost: "127.0.0.1:6060", path: "/")
print("URL: '\(url.absoluteString)'")
...
// Play started somewhere here.
Log:
URL: 'http://127.0.0.1:6060/v0/file/s/M1uGaBJeOGQ.webm'
Here is HTTP dump on the server side:
GET /v0/file/s/M1uGaBJeOGQ.webm HTTP/1.0
Host: 127.0.0.1:6060
Connection: close
Icy-Metadata: 1
User-Agent: VLC/3.0.18 LibVLC/3.0.18
The Cookie:
header is not present.