# WebRTC

If you are inside view player screen modal and you are seen a black screen

It's because your ip's or some player's ip's are getting blocked, to avoid this, you will need to create a cloudflare free turn server

1. Create a cloudflare account
2. Go to [Realtime -> TURN SERVER](https://dash.cloudflare.com/?to=/:account/realtime/turn/overview)
3. Optionally, set a name for the TURN server
4. Press "create"
5. Save the `Turn token ID` and `API Token` values in a secure location. You will need these for nexts steps.
6. Go to `config/config.lua` and go to `Config.WebRTC` and set `TokenID` to your `Turn Token ID` and `APIToken` to your `API Token`. Make sure to add quotes around the values, like this:

{% code title="silio\_reports/config/config.lua" %}

```lua
-- Cloudflare TURN credentials for WebRTC screensharing.
-- Get them at: dash.cloudflare.com → Calls → TURN credentials
Config.WebRTC = {
    TokenID  = "",   -- Cloudflare TURN key ID
    APIToken = "",   -- Cloudflare TURN API token
}
```

{% endcode %}

7. Press "Finish" in the clouflare dashboard
8. Restart the script


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://silio-scripts.gitbook.io/silio-scripts/scripts/silio-reports/configuration/webrtc.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
