vlc-x-callback not working properly with errors
Hi, im using x-callback with my app to open URLs in VLC iOS app.
x-success callbacks works fine.
but x-error is never called (instead the success callback is called) when the _mediaPlayer.state == VLCMediaPlayerStateStopped
(see below), this state is very common when VLCKit can't open an url (i already faced this behaviour in my app with MobileVLCKit).
i checked out the VLC iOS app source code, in VLCPlaybackService.m
file line 324:
if (_playbackCompletion) {
BOOL finishedPlaybackWithError = _mediaPlayer.state == VLCMediaPlayerStateError && !_sessionWillRestart;
_playbackCompletion(!finishedPlaybackWithError);
}
when i change the test to _mediaPlayer.state == VLCMediaPlayerStateStopped
the error callback is called fine.
In my opinion the sate of the player is wrong and it should be VLCMediaPlayerStateError
not stopped
but this is the way it works now.
can you please fix this or give as a workarround?
i need this feature to update the state (success/failure) of my video item in my DB.
Thank you