Executing external scripts on Clip events/actions.
support, ws.webtv, clips, developers, scripts, webhooks, callbacks
Since WS.WebTV 2.2.0.2 it is possible to call external scripts on certain Clip events/actions.
How does it works?
If you specify the URLs of the scripts in the WebTV configuration file (config/Config.inc.php), the system will call those scripts when certain User events/actions occur.
This functionality can be complemented with the API extension. For example,
if you are integrating the WebTV with an external system, you can use these script calls (and the API) to synchronize both system.
This script is called when a Clip is created (either from the back-end or through the API).
Data sent by the WebTV as POST variables:
• id (int): The Clip ID.
• type (int): The type of Clip. Possible values: 0 = Standard, 1 = StreamClip VOD, 2 = StreamClip Live, 3 = EmbedClip, 4 = Auto-Encoding.
• id_user (int): The ID of the User (Author/Owner)
Variable in configuration File:
$CLIP_ON_CREATE_SCRIPT_URL = ""; // Must be an absolute URL, starting with http:// or https://
This script is called when a Clip changes its status. For example, it will be called when a Clip has been activated/deactivated. Note that this script won't be called when the status of a Clip have changed after being modified/edited, in this case the "on change" script will be called.
Data sent by the WebTV as POST variables:
• id (int): The Clip ID.
• status (int): The Clip Status. Possible values: 0=Inactive, 1=Active.
Variable in configuration File:
$CLIP_ON_STATUS_CHANGE_SCRIPT_URL = ""; // Must be an absolute URL, starting with http:// or https://
This script is called when a Clip is modified/edited.
Data sent by the WebTV as POST variables:
• id (int): The Clip ID.
• change (string): -Available sin v56pf3- The type of change. Possibles values: edit, media_upload.
Variable in configuration File:
$CLIP_ON_CHANGE_SCRIPT_URL = ""; // Must be an absolute URL, starting with http:// or https://
This script is called when a Clip is deleted.
Data sent by the WebTV as POST variables:
• id (int): The Clip ID.
Variable in configuration File:
$CLIP_ON_DELETE_SCRIPT_URL = ""; // Must be an absolute URL, starting with http:// or https://
(Since WS.WebTV v57pf) This script is called just before a Clip is deleted.
Data sent by the WebTV as POST variables:
• id (int): The Clip ID.
Variable in configuration File:
$CLIP_ON_BEFORE_DELETE_SCRIPT_URL = ""; // Must be an absolute URL, starting with http:// or https://