Skip to main content

Presentation

Presentation mode gives one participant the whole Eyeson One View stream. Use it to build screen sharing or file sharing into your application.

Authentication​

Presentation requests need no API key. The access key in the path authenticates the request, and a wrong access key returns 401 Unauthorized. A participant's browser can therefore start and end a presentation itself. The access key also decides who presents. The participant whose access key starts the presentation becomes the presenter.

Activate presentation mode​

POST /rooms/`ACCESS_KEY`/presentation
RESPONSES 201 CREATED, 409 CONFLICT, 404 NOT FOUND, 401 UNAUTHORIZED

Starts presentation mode for the participant whose access_key is in the path. The request has no body. While the presentation runs, the Eyeson One View stream switches to SFU mode, the presenter's video source fills the whole stream, and all other participants see only that source. Presentation mode decides whose source is shown, not what it shows, so when the presenter sends a screen capture instead of the camera, every participant sees the screen.

Req/Res Example: Start presenting
export ACCESS_KEY=...
curl -sv -X POST "https://api.eyeson.team/rooms/$ACCESS_KEY/presentation" 2>&1 | grep "< HTTP/1.1"
Response
< HTTP/1.1 201 Created
Status codeDescriptionResolution
201 CreatedPresentation mode has been activated for the participant identified by the access key.No action required.
409 ConflictA presentation is already active in this session. Only one presentation can be active at a time.End the active presentation with DELETE /rooms/ACCESS_KEY/presentation, then repeat the request.
404 Not FoundThe request path does not match an endpoint.Verify the request path against /rooms/ACCESS_KEY/presentation.
401 UnauthorizedThe access key is invalid.Verify the participant's access key.
info

This endpoint does not capture a screen. To share a screen, window or browser tab, switch the presenter's video source in their browser first. With the Eyeson JS SDK, send start_stream with screen: true, as described in Stream Control and the Screen Cam guide. If the presenter stops sharing with the browser's own button, the SDK sends screen_video_ended. End the presentation then and switch back to the camera.

End presentation mode​

DELETE /rooms/`ACCESS_KEY`/presentation
RESPONSES 200 OK, 404 NOT FOUND, 401 UNAUTHORIZED

Ends the running presentation. Any participant can end it with a DELETE request using their own access_key. It does not have to be the participant who started it.

Req/Res Example: End presenting
export ACCESS_KEY=...
curl -sv -X DELETE "https://api.eyeson.team/rooms/$ACCESS_KEY/presentation" 2>&1 | grep "< HTTP/1.1"
Response
< HTTP/1.1 200 OK
Status codeDescriptionResolution
200 OKPresentation mode has been ended.If the presenter was sharing a screen, restore the camera in the client, for example with the JS SDK start_stream command.
404 Not FoundThe request path does not match an endpoint.Verify the request path against /rooms/ACCESS_KEY/presentation.
401 UnauthorizedThe access key is invalid.Verify the participant's access key.

Track presentations​

Every start and end of a presentation triggers a presentation_update event in the Meeting Observer. When a presentation starts, the event's presentation field holds the room and the participant who started it. When the presentation ends, presentation is null. Unlike the presentation endpoints, the Meeting Observer requires an API key.