When you publish an On Demand Campaign to Android and Windows Players, it is possible to trigger it by clicking the “Play" icon on the Player in your OnSign TV account, or through an HTTP request.
Don’t you know what is an On Demand Campaign? Check out the tutorial How to publish On Demand Campaigns
In this tutorial, we explain how to obtain the Campaign On Demand URL and trigger it on screen to desired parameters:
- Open the Player or Player Group in which you have published the On Demand Campaign.
- Go to the "Campaigns in Player" tab.
- The published Campaign will be marked as "Play On Demand". Right click on the blue "Play" button and choose "Copy Link Address" to get a
Playback URLcan be used to automate playback of the Campaign on that specific Player, through a regular
- When doing so, there are some parameters to be used to control the playback behavior:
A number from 0 to 999 to specify for how long the Campaign should be played. The special value
||Controls the On Demand Queue. Read more below.|
Any other parameter added to the
Requesting the URL below will cause the Player to play an item indefinitely (
repeat=0), having the parameter
info available for the Campaign.
$ curl 'https://app.onsign.tv/play/VL3GR4qlL7ZcdHLOF4O0?repeat=0&info=1234'
Using the On Demand Queue
By default, the Campaign playback starts as soon as the
Playback URL is accessed, interrupting whatever is currently playing, be it either scheduled or other on demand content.
The OnSign TV Android Player version 7.0.3 or greater adds new ways of playing a Campaign on demand, through the
Interrupts the currently playing Campaign and starts playing the new content. Any existing queued content is discarded. This is the default if
||Queues the new content to be played as soon as the currently playing Campaign is over. If there is other content in queue, they will be played first.|
||Queues the new content. If the currently playing Campaign is from a scheduled loop (meaning not played on demand), this interrupts it and starts playing the queue.|
Those three actions allow for a myriad of interactions.
Assume a Player has the Campaigns "A", "B" and "C" published on demand, while having two Campaigns playing through the scheduled loop: "X", "Y".
- Trigger three Campaigns on demand in a sequence: If the player is playing "X" and you call:
https://app.onsign.tv/play/token_A?action=playqueue https://app.onsign.tv/play/token_B?action=playqueue https://app.onsign.tv/play/token_C?action=playqueue
The Player would immediately interrupt the Campaign "X" and start playing Campaign "A", followed by Campaigns "B" and "C".
The player would immediately start playing the Campaign "A", followed by Campaign "X" which was previously interrupted. After that it would resume the loop, playing "Y", "X", "Y", and so on.
Please mind that Campaign "C" would not play in this scenario, because the queue is dropped when