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
- bash
- cmd
- powershell
export ACCESS_KEY=...
curl -sv -X POST "https://api.eyeson.team/rooms/$ACCESS_KEY/presentation" 2>&1 | grep "< HTTP/1.1"
set ACCESS_KEY=...
curl -sv -X POST "https://api.eyeson.team/rooms/%ACCESS_KEY%/presentation" 2>&1 | findstr /C:"< HTTP/1.1"
$ACCESS_KEY = "..."
curl.exe -sv -X POST "https://api.eyeson.team/rooms/$ACCESS_KEY/presentation" 2>&1 | Select-String "< HTTP/1.1"
< HTTP/1.1 201 Created
| Status code | Description | Resolution |
|---|---|---|
201 Created | Presentation mode has been activated for the participant identified by the access key. | No action required. |
409 Conflict | A 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 Found | The request path does not match an endpoint. | Verify the request path against /rooms/ACCESS_KEY/presentation. |
401 Unauthorized | The access key is invalid. | Verify the participant's access key. |
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
- bash
- cmd
- powershell
export ACCESS_KEY=...
curl -sv -X DELETE "https://api.eyeson.team/rooms/$ACCESS_KEY/presentation" 2>&1 | grep "< HTTP/1.1"
set ACCESS_KEY=...
curl -sv -X DELETE "https://api.eyeson.team/rooms/%ACCESS_KEY%/presentation" 2>&1 | findstr /C:"< HTTP/1.1"
$ACCESS_KEY = "..."
curl.exe -sv -X DELETE "https://api.eyeson.team/rooms/$ACCESS_KEY/presentation" 2>&1 | Select-String "< HTTP/1.1"
< HTTP/1.1 200 OK
| Status code | Description | Resolution |
|---|---|---|
200 OK | Presentation 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 Found | The request path does not match an endpoint. | Verify the request path against /rooms/ACCESS_KEY/presentation. |
401 Unauthorized | The 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.