Hi Kemal,
Thanks for your query.
Here is what I found for you!.
I have attached an example DashBoard Custom Panel, that can display Clip ID and Time remaining once you connect to VDCP client successfully.
Basic Set-ups that need to be there before you run this panel
- Start Xpression media control gateway(clip server to feed) in order to run clips
- Configure and VDCP port number and start it
- Make sure Clip Store has been set up
- Start clip server chanel on xpression
- Open clip browser to view clips
- Now open up the example panel on the DashBoard
- Enter the Host number. If you are running it locally then you can add as localhost
- Enter the port number
- Enter the valid clip name that currently exists in the clip browser
- Hit button cue and play
- It should display the time remaining which will matches time remaining for clip running on XPression .
Example Panel Code (You can paste this into note pad and name it as .grid and then open it through DashBoard)
Note: I have also highlighted the code snippet in Bold that you may interested.
Panel Code:
<abs contexttype="opengear" keepalive="true">
<meta>
<params>
<param access="1" maxlength="0" name="Time Remaining" oid="timeremaining" stateless="true" type="STRING" value="" widget="label"/>
<param access="1" maxlength="0" name="bvs-host" oid="bvs-host" type="STRING" value="172.16.9.112" widget="text"/>
<param access="1" constrainttype="INT_NULL" name="bvs-channel" oid="bvs-channel" precision="0" type="INT32" value="1" widget="spinner"/>
<param access="1" constrainttype="INT_NULL" name="bvs-port" oid="bvs-port" precision="0" type="INT32" value="9091" widget="spinner"/>
<param access="1" maxlength="0" name="Clip Name" oid="clipname" stateless="true" type="STRING" value="" widget="label"/>
<param access="1" maxlength="0" name="Cue ID" oid="cueid" type="STRING" value="000226_VTXHD" widget="label"/>
</params>
<api>var myVDCP = ogscript.createVDCPSender();
myVDCP.setSessionKeepAlive(true);
function updateActiveClip(success, cmd, result, exception)
{
if (success && result != null)
{
var clipName = result.getClipID();
params.setValue('clipname', 0, clipName);
var currentClip = ogscript.getObject('active-clip');
if (currentClip != clipName)
{
ogscript.putObject('active-clip', clipName);
ogscript.putObject('oldTime', result.getClipPosition());
var time = ogscript.getTimerManager().getTimer('time-display');
time.stopTimer(true);
time.setStart(result.getClipDuration());
time.setTime(result.getClipPosition());
time.startTimer(false);
}
else
{
var time = ogscript.getTimerManager().getTimer('time-display');
if (result.getClipPosition() != ogscript.getObject('oldTime'))
{
time.setTime(result.getClipPosition());
if (!time.isRunning())
{
time.startTimer(false);
}
ogscript.putObject('oldTime', result.getClipPosition());
}
else
{
time.stopTimer(false);
time.setTime(result.getClipPosition());
}
}
}
}
function checkCurrentClip()
{
vdcp.activeClipInfo(params.getValue('bvs-host', 0), params.getValue('bvs-port', 0), params.getValue('bvs-channel', 0), updateActiveClip);
}</api>
</meta>
<timer autostart="false" id="time-display" pattern="HH:mm:ss:SSS" rate="29" start="10:00:00:000" stop="00:00:00:000">
<timertask tasktype="ogparamset">params.setValue('timeremaining', 0, event.getDisplay());</timertask>
</timer>
<timer id="clip-checker" pattern="HH:mm:ss:SSS" rate="100">
<timertask tasktype="ogscript"/>
<timertask tasktype="ogscript">checkCurrentClip();</timertask>
</timer>
<param expand="true" height="92" left="21" oid="timeremaining" style="style:timerLabel" top="121" width="392"/>
<table height="185" left="416" style="bg#dark;bdr:etched;" top="27" width="324">
<tr>
<label colspan="1" fill="both" insets="2,2,2,2" name="Host: " rowspan="1" style="txt-align:east" weightx="1.0" weighty="1.0"/>
<param colspan="1" expand="true" fill="both" insets="2,2,2,2" oid="bvs-host" rowspan="1" showlabel="false" weightx="1.0" weighty="1.0"/>
</tr>
<tr>
<label colspan="1" fill="both" insets="2,2,2,2" name="Port: " rowspan="1" style="txt-align:east;" weightx="1.0" weighty="1.0"/>
<param colspan="1" expand="true" fill="both" insets="2,2,2,2" oid="bvs-port" rowspan="1" showlabel="false" weightx="1.0" weighty="1.0"/>
</tr>
<tr>
<label colspan="1" fill="both" insets="2,2,2,2" name="Channel: " rowspan="1" style="txt-align:east;" weightx="1.0" weighty="1.0"/>
<param colspan="1" expand="true" fill="both" insets="2,2,2,2" oid="bvs-channel" rowspan="1" showlabel="false" weightx="1.0" weighty="1.0"/>
</tr>
</table>
<param expand="true" height="92" left="20" oid="clipname" style="style:timerLabel;" top="27" width="392"/>
<simplegrid height="76" left="20" rows="1" top="282" width="711">
<button buttontype="push" name="Cue">
<task tasktype="ogscript">/*
var clipID = params.getIdentifiedConstraint('ClipListChoices').getStringOf(params.getValue(0x3, 0)); //Get the String we're showing in the button for the selected clip parameter
ogscript.debug('CUE: ' + clipID);
*/
var clipID = params.getValue('cueid', 0);
vdcp.cueClip(params.getValue('bvs-host', 0), params.getValue('bvs-port', 0), params.getValue('bvs-channel', 0), clipID, false);</task>
</button>
<button buttontype="push" name="Continue">
<task tasktype="vdcp">vdcp.continuePlay(params.getValue('bvs-host', 0), params.getValue('bvs-port', 0), params.getValue('bvs-channel', 0));</task>
</button>
<button buttontype="push" name="Play">
<task tasktype="vdcp">vdcp.play(params.getValue('bvs-host', 0), params.getValue('bvs-port', 0), params.getValue('bvs-channel', 0));</task>
</button>
<button buttontype="push" name="Pause">
<task tasktype="vdcp">vdcp.pause(params.getValue('bvs-host', 0), params.getValue('bvs-port', 0), params.getValue('bvs-channel', 0));</task>
</button>
<button buttontype="push" name="Rewind">
<task tasktype="vdcp">vdcp.rewind(params.getValue('bvs-host', 0), params.getValue('bvs-port', 0), params.getValue('bvs-channel', 0));</task>
</button>
<button buttontype="push" name="Fast Forward">
<task tasktype="vdcp">vdcp.fastForward(params.getValue('bvs-host', 0), params.getValue('bvs-port', 0), params.getValue('bvs-channel', 0));</task>
</button>
<button buttontype="push" name="STOP">
<task tasktype="ogscript">vdcp.stop(params.getValue('bvs-host', 0), params.getValue('bvs-port', 0), params.getValue('bvs-channel', 0));</task>
</button>
</simplegrid>
<param expand="true" height="56" left="20" oid="cueid" top="217" widget="3" width="392"/>
</abs>
I hope this will help you.
Regards,
Anand
#DashBoard