Open main menu

Ace Stream Wiki β

Changes

Engine HTTP API

3 bytes removed, 16:29, 12 July 2017
no edit summary
Some examples:
1. Query:
<nowiki>
Query:
http://127.0.0.1:6878/webui/api/service?method=get_version&format=jsonp&callback=mycallback
*'''code''' - engine version, integer (30012)
2. Simple page with check button (JSONP-queries served by jQuery):
<nowiki><!DOCTYPE html>
<html>
===How to get HLS stream===
Query:<tt><nowiki>http://<engine_address>:<engine_port>/ace/manifest.m3u8</nowiki></tt>
As response app engine should return HLS playlist. If any error occured, then engine return HTTP error code 4хх or 5хх with brief error description.
===How to get HTTP stream===
Query:<tt><nowiki>http://<engine_address>:<engine_port>/ace/getstream</nowiki></tt>
As response app engine should return stream data as http progressive download. If any error occured, then engine return HTTP error code 4хх or 5хх with brief error description.
===How to play HLS broadcast===
Query:<tt><nowiki>http://<engine_address>:<engine_port>/hls/manifest.m3u8</nowiki></tt>
You can play via app engine any HLS broadcast, just pass link to the HLS playlist to the engine (<tt>manifest_url</tt> param).
Example:
<nowiki>
Query:
http://127.0.0.1:6878/ace/event/5410b27fc567c35c8547e3b69b141215ce3a1fd7/ef0609c43e560697329d93dae4571edb
If some permits is not granted, then engine playback can be stopped:
* at the playback start:
<nowiki>Start playback:
http://127.0.0.1:6878/ace/manifest.m3u8?id=c894b23a65d64a0dae2076d2a01ec6bface83b01&format=json&use_stop_notifications=1
{
==Player ID==
Player ID - random string, used for impersonate player during engine connect session.
 
Player ID purpose - app engine should distinguish one player from another, as in the current engine implementation user cannot play the same live-stream with two (or more) players from one engine, and engine will stop to serve requests from one player, when got a new request from another.