Question / Help VLC Force Refresh of Playlist AND Only Play Video Once

WolfMerrik

New Member
Hello there,

I am wanting to use the VLC plugin to display videos with chromakey as well as simply for intermissions, etc. However, I am having some issues with getting things to work the way I would like.

After realizing the playlist would not simply be able to play a single file at random without proceeding to the next, I wrote a simple BASH script that created a simple playlist of a single media file at random. This works fine, as the m3u file only contains a single randomized entry. The playlist however inside the plugin does not refresh/update, even upon switching scenes.

Is there any way to force the VLC to re-read/refresh the playlist file?
Also, They are relatively short videos, and I would like them to simply play once and then stop. Are there a means to do this as well?

Thank you very much
 

WolfMerrik

New Member
Well, I have somewhat moved on from using VLC as a video source for this, as I can essentially just create a random playlist using javascript and play it. Something like:

<script>
var vids = ["event_pb_1.mkv", "event_pb_2.mkv", "event_pb_3.mkv"];
var wolfVid = document.getElementById("WolfVid");
wolfVid.src = vids[Math.floor(Math.random()*vids.length)];
wolfVid.play();
</script>

This works just fine for selecting and playing a random video... What I did not expect was for the video to play even if the browser plugin is not in the active scene -- when both starting up OBS and when switching to a different scene.

I have tried using both JS and JQuery as a means for checking if the browser window is active/visible and it seems to always return true in OBS, despite working in an actual web browser.

Is there a simple means or variable to check if the OBS scene is active to either stop the video in JS, or simply a plugin variable to not play if not visible?

Thank you
 

ooftv

New Member
When you view the properties of your VLC source, do you see the drop down box that says

1) Stop when not visible...
2) Pause when not visible
3) Always play

If you uncheck loop playlist and choose option 1 does that do what you want?
 
Hello, I am having the same issue. I have three playlists and I want to be able to change to a different playlist. The music changes but the album cover and the name of the song do not update in my display. Any ideas what I am doing wrong?
 
Top