...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
These APIs are exposed on the WebSocket server but are a separate set of APIs. Using Remoteview, you can control the player remotely through the WebSocket channel. This is a route between each configured player and the BSN network.
To use these APIs, you must have confirmed access to a WebRTC signaling server, and access to that server through a browser so you can use the necessary URL endpoints. You must also be authenticated with the necessary BSN server and the player must be registered with that same network.
The web server must provide its content over an HTTPS connection (this is part of the WebRTC specification). If you do not have access to such a service, you can proxy a local (non-HTTPS) server through a remote service. This service is not part of BSN.cloud.
Establishing a Remoteview Player Connection
Acquire an accessURL for a rendezvous service to use with Remoteview.
Use PUT /remoteview/config to add the accessURL to the player configuration in BSN.cloud
Confirm the setting with the GET /remoteview/config endpoint.
Use the POST /remoteview/{:source}/view endpoint to start a session
Go to a Chrome browser and enter the rendezvous forwarding address and add webrtc_client.html to the end of the address (for example: 7a24dceefaa4.ngrok.io/webrtc_client.html)
Enter the player serial number that you wish to view.
You can check to make sure everything is working by using GET /remoteview/{:source}/view. It should return a session id.
Use DELETE /remoteview/{:source}/view/{:id} to remove a session.
Endpoints:
Table of Contents | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Base URL for these endpoints: https://ws.bsn.cloud/rest/v1/
...
These APIs are exposed on the WebSocket server but are a separate set of APIs. Using Remoteview, you can control the player remotely through the WebSocket channel. This is a route between each configured player and the BSN network.
To use these APIs, you must have confirmed access to a WebRTC signaling server, and access to that server through a browser so you can use the necessary URL endpoints. You must also be authenticated with the necessary BSN server and the player must be registered with that same network.
The web server must provide its content over an HTTPS connection (this is part of the WebRTC specification). If you do not have access to such a service, you can proxy a local (non-HTTPS) server through a remote service. This service is not part of BSN.cloud.
Establishing a Remoteview Player Connection
Acquire an accessURL for a rendezvous service to use with Remoteview.
Use PUT /remoteview/config to add the accessURL to the player configuration in BSN.cloud
Confirm the setting with the GET /remoteview/config endpoint.
Use the POST /remoteview/{:source}/view endpoint to start a session
Go to a Chrome browser and enter the rendezvous forwarding address and add webrtc_client.html to the end of the address (for example: 7a24dceefaa4.ngrok.io/webrtc_client.html)
Enter the player serial number that you wish to view.
You can check to make sure everything is working by using GET /remoteview/{:source}/view. It should return a session id.
Use DELETE /remoteview/{:source}/view/{:id} to remove a session.
GET /remoteview/config/
Use the PUT endpoint to configure the player with an access URL. You can then use this endpoint to check that the configuration is correct.
______________________________________________________________
...
Success Response Body
200: This will return the access URL
Example
Code Block | ||
---|---|---|
| ||
{“accessURL”: “http://test-server-url/”} |
Failure Response
400: The request is malformed and therefore invalid
401: The access token is invalid or not specified
5XX: Any 500 code is an internal server error
PUT /remoteview/config/
Configures the player with the access URL
Request Body
accessURL
string
The remote view server URL
______________________________________________________________
Request Example
Code Block | ||
---|---|---|
| ||
{"data": {“accessURL”: “http://test-server-url/”}} |
______________________________________________________________
...
Success Response Body
200: This returns the access URL - the same value that you passed in the request body to the player
Failure Response
400: Either the request or request body is malformed and therefore invalid
401: The access token is invalid or not specified
5XX: Any 500 code is an internal server error
GET /remoteview/{:source}/view/
Returns the information about all the active remote view sessions.
Request Body
source
string
This value will always be "desktop"
______________________________________________________________
...
Success Response Body
200: Returns an array of session objects. Each object contains the following parameters:
id
string: The session idmediaSource
string: The value is always"desktop"
available
bool: This value is alwaystrue
when the session is active.viewing
bool: This indicates that the session is active. The value will always betrue
.
Example
Code Block |
---|
{
id: "9e61ac20-2014-11ee-a14d-73a9c31db7cd",
mediaSource: "desktop",
available: true,
viewing: true
} |
Failure Response
400: The request is malformed and therefore invalid
401: The access token is invalid or not specified
5XX: Any 500 code is an internal server error
GET /remoteview/{:source}/view/:id/
Returns information about the specified remote view session using its session id
Request Body
source
string
This value will always be "desktop"
id
string
The unique identifier for the session
______________________________________________________________
Response
Success Response Body
200: Returns the following specified session object:
id
string: The session idmediaSource
string: This value is always"desktop"
available
bool: This value is alwaystrue
when the session is active.viewing
bool: This indicates that the session is active. The value will always betrue
.
Example
Code Block | ||
---|---|---|
| ||
{
id: "9e61ac20-2014-11ee-a14d-73a9c31db7cd",
mediaSource: "desktop",
available: true,
viewing: true
} |
Failure Response
400: The request is malformed and therefore invalid
401: The access token is invalid or not specified
404: The specified session id was not found
5XX: Any 500 code is an internal server error
POST /remoteview/{:source}/view/
Starts a new session and returns an id for the session (at this point, the signaling server has been initialized and has made a WebSocket connection to the player)
Request Body
source
string
This value will always be "desktop"
______________________________________________________________
Response
Success Response Body
200: A successful response returns the session id.
Example
Code Block | ||
---|---|---|
| ||
{sessionID: "9e61ac20-2014-11ee-a14d-73a9c31db7cd"} |
Failure Response
400: The request or request body is malformed and therefore invalid
401: The access token is invalid or not specified
5XX: Any 500 code is an internal server error
DELETE /remoteview/{:source}/view/:id/
Stops the specified remote view session using its session id
Request Body
source
string
This value will always be "desktop"
id
string
The unique identifier for the session you want to stop
______________________________________________________________
...
Success Response Body
200: The specified session was stopped
Example
Code Block | ||
---|---|---|
| ||
{ stopped : true } |
Failure Response
400: The request is malformed and therefore invalid
401: The access token is invalid or not specified
404: The specified session id was not found
5XX: Any 500 code is an internal server error