Hello Ventuzians!
THE FORUMS ARE CLOSED!

Please join our discord server HERE!! << click me :D

We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server

Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!

Director Api

All other topics about Ventuz Director here.
Post Reply
mofo7777

Director Api

Post by mofo7777 » 05 Dec 2014, 17:14

Hello.

Here (http://www.ventuz.com/support/help/late ... ugIns.html), the documentation says :

Code: Select all

DirectorTemplateData templateData = new DirectorTemplateData(template);
templateData.Data.FirstLine = "Test";
FirstLine is a dynamic type. But what if i don't know the name of the type and his type ?

Code: Select all

using (StreamReader reader = File.OpenText("C:\\Users\\Public\\Documents\\Ventuz4\\Projects\\DirectorSlideShow\\pages\\LineChart3_20141205_150309.vpg"))
{
  // Get the data from page (not the Template).
  TemplateData data = TemplateData.Deserialize(reader, false, null);

  // data.DataModel is always null...
  // data.Template is alwals null...

  // Get the Template from the uri of the page
  Template template = this.plugin.Application.Show.Templates.GetTemplate(data.Namespace);

  // Problem the Template has no data associated, so CueAsync just cue the Template, not the Page.
  DirectorTemplateData templateData = new DirectorTemplateData(template);
  this.plugin.Application.Show.Channels[0].CueAsync(templateData);

  // templateData.Data is readonly so this can't be use :
  // templateData.Data = data.Data;  
}
So having only this information :
C:\\Users\\Public\\Documents\\Ventuz4\\Projects\\DirectorSlideShow\\pages\\LineChart3_20141205_150309.vpg
, how can i make a CueAsync on this page ?

mofo7777

Re: Director Api

Post by mofo7777 » 05 Dec 2014, 18:29

Also what is CueAsSubTemplateAsync(...) from the IChannel documentation ?

mofo7777

Re: Director Api

Post by mofo7777 » 08 Dec 2014, 18:44

Thank you.

CueAsync(new Uri("ventuz://pages/LineChart3_20141205_150309.vpg")) was just what i was looking for. And it works perfect.

The problem with CueasSubTemplateAsync, is that i only see it in the documentation. I can't find it anywhere in Ventuz.Director.Shared, nor in Ventuz.Kernel.Remoting4... IChannel doesn't implement CueasSubTemplateAsync. So where is it ?

mofo7777

Re: Director Api

Post by mofo7777 » 09 Dec 2014, 18:55

Re.

I Wonder if i really need to use AddSubTemplateAsync. I don't really understand the purpose of this (CueAsync seems to be enough).

Now i can Cue, Take and TakeOut. I can TakeOut a Template/Page, after this one is Take.

But if i only Cue a Template/Page, i don't know how to Clear it without doing a Take.

Could you clarify this, thank you.

mofo7777

Re: Director Api

Post by mofo7777 » 11 Dec 2014, 17:25

Ok.

Another question.

Ventuz.Director.Shared

CueAsync(...)

By calling Task.Wait() or Task.Result, the caller can wait for the task to complete setting up the TimelineItem for the TemplateData. However, this does not mean that the cue on the rendering machine has actually been performed, only that the channel/timeline has created a TimelineItem for this cue operation. The actually cueing on the rendering machine may have to wait for previous or running cue/take operations. To wait for a cue to be complete, listener for TimelineItem's Status property to change to Cued.
http://www.ventuz.com/support/help/late ... ugIns.html

Once the cueing is done and we have been returned the ITimelineItem instance, we might use it to present some further information to the user but that has been omitted for brevity.
I would like to know when a Cue or a Take operation is really finished. I just see that ITimelineItem has only one property (DisplayName). Can you give me more information about that, thank you.

mofo7777

Re: Director Api

Post by mofo7777 » 11 Dec 2014, 17:46

Re.

I can see the property Status Inside the debugger (after subscribe PropertyChanged from the ITimelineItem). So it seems not to be exposed...

mofo7777

Re: Director Api

Post by mofo7777 » 12 Dec 2014, 12:54

Hello.

Yes it seems to work.

Another question. The plugin loose focus when Director application takes focus. I need to get all keydown event, even if plugin doesn't have focus. I'm searching for some kind of AddHandler or other technique, but for now i can't figure out on how to do this, because of the nature of the plugin. Any idea ?

mofo7777

Re: Director Api

Post by mofo7777 » 12 Dec 2014, 16:31

Thank you.

I was thinking that Application.Current.MainWindow would return the plugin handle, not the director handle. This solution seems to work.

Post Reply