Broadcast
info
Eyeson supports broadcasting to a single RTMP destination. For multicasting to multiple platforms simultaneously, please utilize a third-party restream service that can distribute your stream to multiple destinations.
Start broadcast
To connect an Eyeson room with a broadcast (like facebook, YouTube, LinkedIn and similar) you have to provide a valid streaming RTMP url.
POST /rooms/`ACCESS_KEY`/broadcasts
RESPONSES 201 CREATED, 400 BAD REQUEST, 404 NOT FOUND, 405 METHOD NOT ALLOWED, 406 NOT ACCEPTABLE, 410 GONE
REQUIRED stream_url
Req/Res Example: Start Broadcast
- curl
- node sdk
- go sdk
- php sdk
export ACCESS_KEY=...
curl -X POST \
-H "Content-Type: application/json" \
-d "{\"stream_url\":\"rtmp://a.rtmp.youtube.com/live2/$STREAM_KEY\"}"
"https://api.eyeson.team/rooms/$ACCESS_KEY/broadcasts"
const accessKey = '...';
const streamUrl = 'rtmp://a.rtmp.youtube.com/live2/...';
const eyeson = new Eyeson();
const user = await eyeson.getUser(accessKey);
await user.startBroadcast(streamUrl);
accessKey := "..."
streamUrl := "rtmp://a.rtmp.youtube.com/live2/...";
userService, _ := eyeson.NewUserServiceFromAccessKey(accessKey)
userService.StartBroadcast(streamUrl)
$accessKey = '...';
$streamUrl = 'rtmp://a.rtmp.youtube.com/live2/...';
$eyeson = new Eyeson();
$broadcast = $eyeson->broadcast($accessKey, ['stream_url' => $streamUrl]);
$broadcast->start();
Response
201
stream_url
Type: URL
(required)
Streaming target URL.
info
Some platforms provide you with a streaming URL
and a streaming key
. In this case simply append the streaming key
to the URL.
player_url
Type: URL
(optional)
Public URL to view the live video.
info
This URL can be found in the Observer's broadcasts_update
and the clients console logs.
Update player_url
PUT /rooms/`ACCESS_KEY`/broadcasts
RESPONSES 200 OK, 400 BAD REQUEST, 404 NOT FOUND, 410 GONE
REQUIRED player_url
player_url
Type: URL
(required)
Public URL to view the live video.
Stop broadcast
DELETE /rooms/`ACCESS_KEY`/broadcasts
RESPONSES 200 OK, 404 NOT FOUND, 410 GONE
Req/Res Example: Stop Broadcast
- curl
- node sdk
- go sdk
- php sdk
export ACCESS_KEY=...
curl -X DELETE "https://api.eyeson.team/rooms/$ACCESS_KEY/broadcasts"
const accessKey = '...';
const eyeson = new Eyeson();
const user = await eyeson.getUser(accessKey);
await user.stopBroadcast();
accessKey := "..."
userService, _ := eyeson.NewUserServiceFromAccessKey(accessKey)
userService.StopBroadcast()
$accessKey = '...';
$eyeson = new Eyeson();
$broadcast = $eyeson->broadcast($accessKey);
$broadcast->stop();
Response
200