x-callback-url method and using URLs to stream on iOS

iOS, iPad, iPhone, tvOS specific usage questions
mvan231
New Cone
New Cone
Posts: 5
Joined: 14 Apr 2016 23:32

x-callback-url method and using URLs to stream on iOS

Postby mvan231 » 25 May 2023 13:42

I'm trying to find a way to open a video stream URL via URL scheme on iOS. I saw a discussion on stackoverflow and it led me here now.

I'd like to be able to open one or many video URLs via the URL scheme, but for some reason I cannot get it to work with the method mentioned in the iOS documentation for VLC using the x-callback-url. I always get a playback error for some reason using a webhosted video.

I have found that I can use "vlc://{url here}", to open the app and load the stream, but it always asks whether to download or play the url. I'd like to automatically choose an option and thought the x-callback-url would help with this since it directly mentions the ability to do this in the iOS documentation for VLC

Does this work for anybody else?

Any ideas or tips would be greatly appreciated!

Edit: this appears to be working with simple URLs like "https://i.imgur.com/3u1p23S.mp4" but a more complex url like a YouTube video source url doesn't. Is this because it is having to process other information and VLC times out before it can do it? Loading the URL via the other method I mentioned seems to work without issue but I would like to have it automatically stream

fkuehne
Developer
Developer
Posts: 7264
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: x-callback-url method and using URLs to stream on iOS

Postby fkuehne » 01 Jun 2023 07:01

VLC on iOS does not support youtube urls as we don't bundle the lua script needed to parse the html. If you do that in your app, it should work. However, you might need to encode the URL to make it work.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

mvan231
New Cone
New Cone
Posts: 5
Joined: 14 Apr 2016 23:32

Re: x-callback-url method and using URLs to stream on iOS

Postby mvan231 » 01 Jun 2023 13:03

VLC on iOS does not support youtube urls as we don't bundle the lua script needed to parse the html. If you do that in your app, it should work. However, you might need to encode the URL to make it work.
Thanks so much for your input about this. I was guessing that might be the case. Though it seems to work if I use the vlc://{url} method as I mentioned. I just have to select Download or Play. It also works to manually paste the url into the VLC stream / network input box in the app.

fkuehne
Developer
Developer
Posts: 7264
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: x-callback-url method and using URLs to stream on iOS

Postby fkuehne » 02 Jun 2023 01:31

Probably an encoding problem. Try to url-encode the URL before giving it to x-callback-url
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

mvan231
New Cone
New Cone
Posts: 5
Joined: 14 Apr 2016 23:32

Re: x-callback-url method and using URLs to stream on iOS

Postby mvan231 » 02 Jun 2023 14:03

Oh that's a great idea!

I tried and it still has the same issue unfortunately


Return to “VLC for iOS, iPadOS and Apple TV”

Who is online

Users browsing this forum: No registered users and 15 guests