0
edits
Changes
→Check engine version using javascript API
Sometimes it is necessary to check a version of installed engine. For example, you have created a broadcast using a newer version of the engine, and this broadcast can't be viewed by users with older versions of the engine. In this case it is necessary to check the version and if needed to warn users with a message from a web page.
You can checkecheck engine version on a web page using javascript API.
Method Player.getEngineVersion() is used for checking. It returns a string with engine version.
You can find out engine version only after Ace Stream P2P multimedia plugin will be loaded on a web page. After loading is complete, onLoad event is triggered - in this event you need to check the version.
Example of a code to get engine version:
<tt><nowiki><script type="text/javascript">
var controls = new TorrentStream.Controls("player-div-id", {
</script></nowiki></tt>