Track playback events

You have a question or need an advice about how to do something? Ask it here!
Post Reply
Maartenvn
Posts: 101
Joined: 21 Aug 2022 19:47
Track playback events

Post by Maartenvn »

Hi Bernd

I am looking to use some events in ProppFrexx to trigger some specific external actions. Whenever a track plays in the playlist, inside an embedded container or inside an overlay I need to trigger a specific action.
  • Track plays in the playlist: I can use "OnTrackPlay", so that is already working
  • Track plays in an overlay in the overlay scheduler: I can use "OnOverlayTrackPlay", so that is already working
  • Track plays in an overlay, that has been resolved to the playlist: This doesn't work for some reason. The "OnOverlayPlayTrack" event is not triggered here. Is this a bug or does this event only trigger when an overlay is played in the overlay player? Is there another event that I can use to get the track information here? If not, would it be possible to integrate a new event here?
  • Track plays in an embedded container: As far as I am aware there is no event for this. The "OnTrackPlay" is only triggered on the container itself, not on the entries in the container. Can an event (eg: "OnEmbeddedContainerTrackPlay") be added here?
Thank you in advance
User avatar
radio42
Site Admin
Posts: 8329
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Track playback events

Post by radio42 »

Track plays in an overlay, that has been resolved to the playlist: This doesn't work for some reason. The "OnOverlayPlayTrack" event is not triggered here. Is this a bug or does this event only trigger when an overlay is played in the overlay player? Is there another event that I can use to get the track information here? If not, would it be possible to integrate a new event here?
When an overlay is resolved to the playlist, it doesn't trigger any "OnOverlayPlayTrack" events, as it is not played by the overlay anymore (it is not played by the Overlay Player), so instead the "OnTrackPlay" event would be raised, as this is triggered by the DJ Player of the playlist, as it is now played here.

Track plays in an embedded container: As far as I am aware there is no event for this. The "OnTrackPlay" is only triggered on the container itself, not on the entries in the container. Can an event (eg: "OnEmbeddedContainerTrackPlay") be added here?
I am not sure, if I can add such event, as for embedded containers, a continuous single stream for the entire container tracks is build. But I will take a look, but can not promise anything.
Maartenvn
Posts: 101
Joined: 21 Aug 2022 19:47
Re: Track playback events

Post by Maartenvn »

Thanks for the answers!
When an overlay is resolved to the playlist, it doesn't trigger any "OnOverlayPlayTrack" events, as it is not played by the overlay anymore (it is not played by the Overlay Player), so instead the "OnTrackPlay" event would be raised, as this is triggered by the DJ Player of the playlist, as it is now played here.
The problem is that the OnTrackPlay event is not triggered for the items in the overlay, but rather for the entire overlay itself. I need to know which tracks are played in the overlay.

I assume, as overlays that are resolved to the playlist are also embedded containers, the same solution would be possible here.
User avatar
radio42
Site Admin
Posts: 8329
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Track playback events

Post by radio42 »

Yes, that was explained in the other item and is exactly the same.

Do you (only) need to know which tracks are played or or it also important that it triggered exactly at the time when they are played?
Maartenvn
Posts: 101
Joined: 21 Aug 2022 19:47
Re: Track playback events

Post by Maartenvn »

Do you (only) need to know which tracks are played or or it also important that it triggered exactly at the time when they are played?
I would need to know track information like trackname, mediatype, ... and if possible also the trigger time ${effectivestart}, as I need to synchronise event time between systems.

I need to know at which time the track is played, not just which tracks are available in the overlay, as I am doing some real-time actions.
User avatar
radio42
Site Admin
Posts: 8329
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Track playback events

Post by radio42 »

Okay, here are two options, which are available today - choose yourself, what might better fit to your use case:

1) Use the Streaming.OnSongTitleChanged event (instead of Playlist.OnTrackPlay):
The OnSongTitleChanged event already supports raising the event also for embedded container tracks. Just go to the general settings, section Streaming and set the "Use Embedded Container Tracks" option for the "Streaming Options":
UseEmbeddedContainerTracks.png
And the use the Streaming.OnSongTitleChanged event to trigger your action...
Streaming.OnSongTitleChanged.png

2) Expand the embedded container entries to the LOG files, i.e. the EXEC_WRITE_GLOBAL_LOG and the EXEC_WRITE_PLAYLIST_LOG commands:
ExpandLogging.png
This options writes individual entries of the embedded container to the resp. log file.

Post Reply