Admira API content HTML5 is the service available to be able to communicate from an HTML content to the Admira player via Javascript. The basic functions of said API are described below.
In order to use the functionalities of Admira API Content HTML5, it is necessary to have the script, provided by Admira.
Once added as an attachment and included in the main HTML, it can be invoked as follows:
onReady: occurs when the player has successfully preloaded the HTML content, that is, the HTML has been loaded into the iFrame. At this point the iFrame is still DISPLAY:NONE
onStart: occurs when the player puts the content in “PLAY”. Any animation or rendering of elements should start here. At this point the iFrame is still in DISPLAY:INLINE
Features
API content also allows you to send messages to the HTML5 player to indicate different actions to perform:
API_DURATION: Change the duration of the content being played
API_FINISH: Ends the content being played
API_CONDITION: Write a condition to be read later by the player with the capabilities of Conditional Playlist and Conditional Triggers
API_WRITE_FILE: Allows writing text data to a file locally
API_READ_FILE: Allows you to read a local text file
Note
These features are constantly being developed and improved. For any question, do not hesitate to report to soporte@admira.com.
Note
For app versions lower than z19.05.30, when you want to get the player id, you need to put the call inside onStrat. For versions later than z19.05.30, this included, it can be put inside onReady. Below is an example of how the player id should be requested in both cases.