Hello,
I was wondering how to obtain the duration of a current playing track and the marker info of that track. For example, I want to run a part of an .MLS-script when the Ramp 1 marker is reached.
Thanks in advance.
Hello,
I was wondering how to obtain the duration of a current playing track and the marker info of that track. For example, I want to run a part of an .MLS-script when the Ramp 1 marker is reached.
Thanks in advance.
Anyone (Torben?) got any idea?
It possible yet difficult. Perhaps you can explain a bit more what you are going to achieve?
I am trying to start a video file in VLC when a certain point in a track is reached. VLC is controlled trough the VLC HTTP protocol.
So, for example, if the Ramp 1 marker is reached, the .MLS-scripts sends a HTTP request to VLC, to play the video.
Only for a particular track, or for any track?
For any track. So if a track has a Ramp 1 marker, the script needs to start the videoclip in VLC.
I will put all videoclips in a folder, and with the HTTP command VLC will play the video.
(Something like http://127.0.0.1:8080/requests/status.xml?command=in_enqueue&input=%a - %b.mp4)
Ok, it was actually much less work for me to just add a hook to the background scripts, than explaining how to poll the information from the players
Please download snapshot 3207, it introduces a new background script procedure, to be used like this:
// Called when playback passes a cue marker
procedure OnItemCueMarker(Item: IPlaylistItem; MarkerType: TCuePositionType);
begin
if MarkerType = ptRamp1 then
SystemLog('Ramp 1 reached for ' + Item.GetTitle);
end;
Works perfect! Thanks. My experiment will continue now…
[quote=“Torben, post:7, topic:10826”]Ok, it was actually much less work for me to just add a hook to the background scripts, than explaining how to poll the information from the players
Please download snapshot 3207, it introduces a new background script procedure, to be used like this:
// Called when playback passes a cue marker
procedure OnItemCueMarker(Item: IPlaylistItem; MarkerType: TCuePositionType);
begin
if MarkerType = ptRamp1 then
SystemLog('Ramp 1 reached for ' + Item.GetTitle);
end;
[/quote]
Any chance you can add this hook to version 4.4? At home I use version 5 for testing purposes, but and the station we use version 4.4.
Thanks.
“Can you please do the double work, so we don’t have to pay you for the upgrade?”
Nope, sorry, no more feature updates for v4.
I understand!
And my second question, how do I get the track duration? I have tried Item.GetDuration, but I want the duration between cue in and cue out. Not the whole track…