This URL won't work anymore: https://www.googleapis.com/drive/v3/files/<ID>?alt=media&access_token=<TOKEN>.
We have to use simple URL https://www.googleapis.com/drive/v3/files/<ID>?alt=media with Authorization HTTP header: Authorization: Bearer <TOKEN>
I already have draft patch for MobileVLCKit but unfortunately I'm not sure how to create PR in this case, as all patches in VLCKit/Resources/MobileVLCKit/patches have specific structure with patch number. Should I update all numeration in this case or just add a new single file with patch? What branch should be targeted (master or 3.0)? I think it should be released asap, so probably it will be 3.3.10 update.
Can someone guide me? Thanks.
As I said it is a draft, so you can improve it as you like.
Solution:
New "http-token" parameter added to global list of vlc lib parameters;
If "http-token" is not nil add "Authorization: Bearer %s" HTTP header
How to use it:
let media = VLCMedia(url: url)if let token = token { media.addOptions(["http-token" : token])}let vlcPlayer = VLCMediaPlayer(options: ...)vlcPlayer.media = media
Pros / Cons:
if you call vlcPlayer.addPlaybackSlave(url, type: .subtitle, enforce: ...) the authorization header will be added to this URL too. It will be OK if user uses subtitles from Google Drive, but it could be the problem with external subtitles from other HTTP sources as HTTP token will be added to that request too.