Page 1 of 1
VLC android disable track
Posted: 26 Jun 2020 14:26
by brbcod1
Hello, I noticed that there's no method on the MediaPlayer for disabling a track.
In particular, I'm looking for a way to disable a subtitle track.
I turn it on with the setSpuTrack method, then, to disable it, I tried with a high value (like 99) and a negative value (like -1) but the subtitles don't get disabled.
Am I missing something or there's no way to disable a track?
Thanks!
Re: VLC android disable track
Posted: 28 Jun 2020 17:45
by Jean-Baptiste Kempf
Are you sure the subtitles are a track (and not burned in)? Because setSputrack should be the right thing to do.
Re: VLC android disable track
Posted: 29 Jun 2020 09:51
by brbcod1
Yes it's a track, not burned in.
In my example, the video starts without subtitles and I turn it on with setSpuTrack(2).
Then, I want to allow the user to disable them again.
Re: VLC android disable track
Posted: 29 Jun 2020 10:11
by Jean-Baptiste Kempf
Track 0?
Re: VLC android disable track
Posted: 29 Jun 2020 11:20
by brbcod1
No, even setSpuTrack(0) doesn't disable them
Re: VLC android disable track
Posted: 29 Jun 2020 12:58
by unidan
Hi,
setSpuTrack(-1) should disable it, according to EsSpuCallback in vlc3 core and the VLC Android code.
Since it doesn't work for you but works for libvlc android, we'll need more information about your setup. What version of libvlc are you linking ?
Re: VLC android disable track
Posted: 29 Jun 2020 15:11
by brbcod1
Hi, I ended up upgrading to the latest version and the problem seems to be fixed now, using setSpuTrack(-1).
Thanks!