I'm trying to create a REALLY simple player that is completely controlled by backend code. I have a serial port connection that is firing in playlist items and the code for all this works fine, I can add items (from a directory on the pc) to the playlist and then play them all via my serial command line. No problems.
However, where I've now run into problems is when I want to simply append items to the playlist. All my code does is sit there waiting for an item reference to be passed. It then uses the passed filename and adds it to the playlist via vlc.playlist.add(item filename...). First problem I then ran into was that if I try to do a "if vlc.playlist.isplaying" check, I get an error, so I got around this by putting in a "first time" flag that does a "playlist.play()" command on the first item arriving and not again thereafter.
Basically then:
Code: Select all
dim firsttime as boolean = true
vlc.playlist.add(filename...)
if (firsttime) then
vlc.playlist.play()
firsttime=false
end if
This seems such a basic and simple thing to do, I can only assume I've done something wrong in my coding, although I really cannot see what!