Update -(void)setCurrentVideoSubTitleIndex:(int)index in VLCMediaPlayer to allow passing -1 to disable subtitles.
libvlc_video_set_spu does not handle -1 as a call to turn off subtitles, this handles turning them off properly when -1 is passed as a parameter to match the documentation.
fixes #585 (closed)
Merge request reports
Activity
mentioned in issue #585 (closed)
- Resolved by Felix Paul Kühne
@bubu returning -1 on failure without doing the additional check for -1 being passed through (not whether or not it is returned from libvlc) means theres literally no way for VLCKit to turn subtitles off. Im not sure how you want me to change the PR title to be more compliant, the README is a little vague about that.
Edited by Kevin Bradley
@bubu index 0 shows up for me as "Closed Captions 2", also, the default value is -1 for the selected subtitle index. if we set it to 0 itll stay as 0 meaning depending on the situation either -1 or 0 will need to be checked for in any client of VLCKit which is pretty ugly and counterintuitive in my opinion.
Edited by Kevin Bradley- Resolved by Felix Paul Kühne
Please note that for this merge request I do not mind this change.
I was arguing that we should handle the return values correctly.
That is, once the commit message is changed.
This setter needs updating for VLCKit to cover the support of showing more than one subtitle track at the same time. I added #586 (closed) so we do not forget about it.
changed title from {-fixes #585 (closed)-} to Update -(void)setCurrentVideoSubTitleIndex:(int)index in VLCMediaPlayer to allow passing -1 to disable subtitles.
@bubu let me know if that MR title is more along the lines of what you were looking for. @fkuehne good point on #586 (closed), I honestly didn't even know multiple subtitles could be displayed at once, I know its kind of off-topic, but is there any way through libVLC to adjust the subtitle horizontal/vertical placement that could be utilized in VLCKit? Thats one of the last holdouts for what I really need to get proper support into the project I'm utilizing it in.
changed milestone to %4.0
mentioned in merge request !186 (closed)
mentioned in merge request !189 (closed)
MR superseded by !189 (closed) for the 3.0 branch and !187 (merged) for the master branch. Closing.