Questions using VLCKit 4.0.0a6

iOS, iPad, iPhone, tvOS specific usage questions
eleanorsp
New Cone
New Cone
Posts: 2
Joined: 01 Oct 2024 15:34

Questions using VLCKit 4.0.0a6

Postby eleanorsp » 01 Oct 2024 16:21

Hello, newbie VLC developer here.

I've been using VLCKit 4.0.0a6 (which is probably my first mistake) instead of the last Carthage supported release '3.*.something'.. The main reason was to
get hold of 'useful' error information/status if a stream failed to load as per the available documentation around VLCLibrary->currentErrorMessage.

I have found that if I tried to play a bad stream, the VLCMediaPlayer status goes from: Playing->Stopping->Stopped. i.e. VLEMediaPlayer doesn't drop into an VLCMediaPlayerStateError status.
Using VLCStreamSession appears deprecated so I have avoided using that.

Also I don't think the VLCLibrary->currentErrorMessage ever gets populated so I cannot check that to ascertain why VLCMediaPlayer has Stopped prematurely.

To get around this, I am checking if VLCMediaPlayer drops into Stopped status in the first 3 seconds, that way I can 'assume' something is wrong.
I see VLCPlayer (the App) doesn't show any error messages either so I might be on the right track... But I feel I am missing something obvious in following this approach? What's wrong with a simple Error status and Message?

----

The other issue I have is getting hold of the Stream's metadata.
I see there is a function on VLCMedia called parseWithOptions + associated delegation methods. mediaMetaDataDidChange and mediaDidFinishParsing

I assumed once I get mediaDidFinishParsing I would have to re-call parseWithOptions again (some time in the future) to get the latest streaming metadata.
However, I found the following:

mediaMetaDataDidChange - sometimes never gets called.
mediaDidFinishParsing - never gets called after the first parseWithOptions request.
parseWithOptions + a timeout value - this crashes frequently no matter what timeout value I try to give it.

In other words, I cannot rely on these delegate methods getting me the latest Streaming meta data after the first few seconds...
I have had to set up a 5 sec timer and call prefetch() on the metaData VLCMedia.metaData.prefetch() and then extract from that. This feels incredibly kludgy. What am I doing wrong?

---

Thank you.

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

Re: Questions using VLCKit 4.0.0a6

Postby fkuehne » 08 Oct 2024 09:44

hmm, sorry, but you should be using a stable release of VLCKit and not an alpha that we mainly do for internal tests where especially all the methods you mention will be completely re-written for the next alpha release.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

eleanorsp
New Cone
New Cone
Posts: 2
Joined: 01 Oct 2024 15:34

Re: Questions using VLCKit 4.0.0a6

Postby eleanorsp » 10 Oct 2024 19:07

Thanks, I feared that was the case. I didn't appreciate how much pre-alpha I was playing with. :-)


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

Who is online

Users browsing this forum: No registered users and 6 guests