Topic: problems with flashplayer.event

Hello!

I'm using the flashplayer.event file to trigger music and nightmode from within a widget and I have some small problems with that:

1) I want to play several mp3s, but the UserPlayer-Event seems to support only single files and no playlists, and after playback it stops and I have no possibility to loop the song(s). Is that right or am I missing something? As workaround I use an alarm that plays my music and trigger that alarm with the AlarmPlayer-event, but that stops after 120 minutes, which is far better, but not perfect.

2) I trigger the nightmode from within a running widget, but when the nightmode is interrupted by the alarmscreen in the morning I see am mixture of the alarmscreen and my widget. Seems like a bug to me, or can I do something about it?

3) I call all my commands (play/stop/volume/nightmode) from within a widget by triggering a cgi-script on the local webserver, which works quite well, but I wonder if there is a smarter way to do that? The widget is loaded from /mnt/usb if that makes a difference.

Thanks for any hints!
Christian

Re: problems with flashplayer.event

No idea? Especially for the first one a solution would be great. All I need is the ability to loop a song endlessly or to run a playlist.

Re: problems with flashplayer.event

1)  This particular interface was designed to play a single file - it was expected that whatever was triggering this event would be monitoring the appropriate system flags in /var/run/btplay.state to see how their track is doing (it will have a '2' if the track is playing), since the Flash Lite event system cannot return any status.  You should be able to add that support to your web service.  However, I'll look into providing some sort of playlist management to the event system.

2) I'll look into that - we are aware of a couple of obscure situations where this peculiar overlay behavior can happen.

3)  This is probably the best way to get around the Flash security sandbox to create this behavior.

Re: problems with flashplayer.event

Duane wrote:

1)  This particular interface was designed to play a single file - it was expected that whatever was triggering this event would be monitoring the appropriate system flags in /var/run/btplay.state to see how their track is doing (it will have a '2' if the track is playing), since the Flash Lite event system cannot return any status.

The problem with monitoring is that I would have to poll the state-file very often to keep the break between two songs small and that doesn't look like a beautiful solution to me.

Duane wrote:

However, I'll look into providing some sort of playlist management to the event system.

Thanks in advance. The easiest solution for my situation would be if you could add a value="loop" to the UserPlayer event which just let the current stream/file loop endlessly.

Re: problems with flashplayer.event

Christian wrote:

The easiest solution for my situation would be if you could add a value="loop" to the UserPlayer event which just let the current stream/file loop endlessly.

Unfortunately, the event system doesn't really work that way - it's limited to the three parameters, type, value and comment.  I'd have to create a different command, something like "playLoop".

Re: problems with flashplayer.event

Yes, that is exactly what I had in mind:

<event type="UserPlayer" value="playLoop" comment="http://path.to.stream"/>

Or something like that. If it's not too much effort it would be great if you could add that.

Re: problems with flashplayer.event

OK, I'll give it a shot - we're on an active release countdown so I'm not sure I can squeeze it in this release.

EDIT -added this in CP 2.8.20

Re: problems with flashplayer.event

Thousand thanks for this - that simplified my scripts allot.