Web API example ====== Set Timecode Start from Palette fade ====== Set the Timecode start time for versions pre Titan v14. The challenge is that this reqires a TimecodeTime object but the required cast was only implemented in Titan v14. The workaround is to set the palette fade time (as you would do by simply entering a number) and then call a macro which uses this to set the timecode start time. For versions from Titan v14 on you can directly set the Timecode starttime using [[:webapi:requests:Timecode.TimecodeOne.SetStartTime]]. ^ author, date | Gregory Haynes, February 2022 | ^ published | https://www.avosupport.de/downloads/icke_siegen/SetTcStartTime/ | ^ prog. lang./ framework | HTML, JS, CSS; none (wrote everything with a text editor) | ^ description | set the palette fade time, then call a macro to transfer this into timecode start time | ^ other requirements | a way to issue POST requests, e.g. RestMan for Chrome | ===== Screenshots ===== 1. use RestMan (or another way to output a Post request) to set the palette fadetime ^{{:webapi:examples:restman.png?600|}}| 2. call a macro (here: [[macros:example:timecodestarttimefrompalettefade|]] to use the value as Timecode start time) ^ {{:webapi:examples:macrorun.png?600|}}| **In order to call a macro via WebAPI it needs to be in the show library AND needs to be copied/moved to a handle.** 3. the little html page at https://www.avosupport.de/downloads/icke_siegen/SetTcStartTime/: ^ {{:webapi:examples:settc.png?600|}} | ---- ===== How it works ===== ''Set Numeric Value'' the value from the adjacent input field and sends it to Titan as numeric value (as like as used to set a palette fade time). ''Set 0'', ''Set 1'', ''Set 5'' send some predefined values. ''Set TC1 Start'' fires the macro to use the numeric value as timecode 1 start time. **Remember to download and deploy the macro [[macros:example:timecodestarttimefrompalettefade|]].** ---- ===== API Requests ===== * [[:webapi:requests:Palette/Numeric/InputValue]] * [[:webapi:requests:Macros/Run]]