How to change media url while playing dynamically

This forum is about all development around libVLC.
avsuper
Blank Cone
Blank Cone
Posts: 13
Joined: 01 Apr 2018 04:22

How to change media url while playing dynamically

Postby avsuper » 13 May 2018 07:08

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!

mfkl
Developer
Developer
Posts: 739
Joined: 13 Jun 2017 10:41

Re: How to change media url while playing dynamically

Postby mfkl » 10 Jul 2018 05:21

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?
https://mfkl.github.io


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 26 guests