Page 1 of 1

Questions using VLCKit 4.0.0a6

Posted: 01 Oct 2024 16:21
by eleanorsp
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.

Re: Questions using VLCKit 4.0.0a6

Posted: 08 Oct 2024 09:44
by fkuehne
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.

Re: Questions using VLCKit 4.0.0a6

Posted: 10 Oct 2024 19:07
by eleanorsp
Thanks, I feared that was the case. I didn't appreciate how much pre-alpha I was playing with. :-)