Page 1 of 1

How to change media url while playing dynamically

Posted: 13 May 2018 07:08
by avsuper
While playing URL media, is it possible to change the media without stopping?

Regular method is to call media_player_stop and then set new media and then call media_player_play, this would lead to a black screen when switching medias.
Can I call set_media while playing and make it have effect immediately?

I've tried media list and it seems each time it will cause a black screen also when changing items in list....

How to avoid the black screen? Anyone can give a help? Thanks!

Re: How to change media url while playing dynamically

Posted: 10 Jul 2018 05:21
by mfkl
Can I call set_media while playing and make it have effect immediately?
Probably not in reliable way. VLC needs to parse your file, and depending on the size of the file, it may not be instant. Try parsing the next media before the current one finishes playing maybe?