i want to build a touchscreen app to draw on a video with control over the video (Play, Pause, Scrubbing). Despite being new to touchdesigner the painting part worked pretty well but now i am a bit stuck with the mediaplayer part.
The Palette:moviePlayer is almost what i want and need but has too many features, and i cannot figure out how to customize the UI. It is difficult for me, because i cannot find where all the mouseover stuff happens, so that i can disable some buttons.
For example i cannot find where the play button get´s its text from. There is a expression in the Textinput: [parent().par.Textoff, parent().par.Texton, parent().par.Textoff, parent().par.Texton][int(math.ceil(op('tstate')[0]))] and i understand that there are 4 conditions (Play, Pay with Mouse-on and -off), but where is the Text defined.
When i try to use the external control the scrubbing is not so smooth and i dont really know where to “plug” the play button. Same problems with the movieEngine.
Unfortunately the help page is not a big helper for me, does anybody know another ressource for info about the moviePlayer, or can point me into the right direction.
The text is on parent().par.Textoff, where parent() is the component /project1/moviePlayer/ui/playControls/play. On that component is a parameter Text Off, Text On etc. These are expressions that contain what you see in the UI: || and > , but the text changes to the word “external” when moviePlayer is externally-controlled and cannot be responsive to manually clicking. So in that python expression you can change || and > to what you want.
What codec files are you scrubbing? Some codecs and settings don’t scrub well (those that have keyframe images). If you can point me to a specific movie file we can look at it.
Maybe you can describe more what touchscreen interactions you need for your application.
(I presume you know you can customize the UI a bit on the Arrange page.)
Hello Greg,
thank you for your response.
With your help I found the node where I can change the text. I thought I searched them all, but obviously not.
The codec is h264, so I know the scrubbing is not super smooth, but I was wondering why the scrubbing is smoother with the “native” GUI of the moviePlayer than with the external control. I was using a simple slider.
The UI of the Player should just contain play/pause, timeline scrubber, +/- 1sec.
The rest of the UI is gonna be for the painting (pen, arrow, size, color) and choosing different clips or a live input (popup for files, single buttons for NDI, SDI in).
I think I will try to use the native GUI of moviePlayer and customize it to my needs.
So it would be easier to implement functions of the player later if I need them, speed for example.
Or would you suggest the external control approach?