Changes

Jump to: navigation, search

JavaScript Library

71 bytes added, 11:30, 21 November 2018
Guide
Ace Stream JavaScript Library provides tools to embed video player on web-pages with minimum effort.
== Example of using Ace Stream JavaScript Library to embed player on the page. Guide ==
First, add javascript library on the page (inside the <head> tag):
<tt><script src="//static.acestream.net/jsapi/acestream.min.js"></script></tt>
Then you can create the player with this code:
<tt><nowiki>
var playerContext player = null;
AceStream.createPlayer("#player", {
onLoad: function (playerplayerObj) { playerContext player = playerplayerObj; playerContextplayer.loadContentId("94c2fd8fb9bc8f2fc71a2cbe9d4b866f227a0209");
},
onError: function(err) {
*<tt>loadDirectUrl(url)</tt> - load by direct content URL (this can be direct link to some video file, HLS stream or link supported by Ace Stream plugins: youtube, twitch etc).
Buttons You can create more than one player on the top of same web page. To do this you need to provide a separate HTML container for each player and call AceStream.createPlayer() method on each container. You can find example on the pages show how to use different content loading methodsdemo page.
== Demo ==Working example demo is available [http://acestream.net/demos/embedding/index.html here]
==Additional features==

Navigation menu