Fix save to disk examples

This commit is contained in:
Joe Turki
2025-02-27 14:12:24 +02:00
parent bdfe07a07c
commit 38fdb70355
3 changed files with 3 additions and 5 deletions

View File

@@ -14,7 +14,7 @@ go install github.com/pion/webrtc/v4/examples/save-to-disk-av1@latest
```
### Open save-to-disk-av1 example page
[jsfiddle.net](https://jsfiddle.net/xjcve6d3/) you should see your Webcam, two text-areas and two buttons: `Copy browser SDP to clipboard`, `Start Session`.
[jsfiddle.net](https://jsfiddle.net/8jv91r25/) you should see your Webcam, two text-areas and two buttons: `Copy browser SDP to clipboard`, `Start Session`.
### Run save-to-disk-av1, with your browsers SessionDescription as stdin
In the jsfiddle the top textarea is your browser's Session Description. Press `Copy browser SDP to clipboard` or copy the base64 string manually.

View File

@@ -16,7 +16,7 @@ go install github.com/pion/webrtc/v4/examples/save-to-disk@latest
```
### Open save-to-disk example page
[jsfiddle.net](https://jsfiddle.net/s179hacu/) you should see your Webcam, two text-areas and two buttons: `Copy browser SDP to clipboard`, `Start Session`.
[jsfiddle.net](https://jsfiddle.net/2nwt1vjq/) you should see your Webcam, two text-areas and two buttons: `Copy browser SDP to clipboard`, `Start Session`.
### Run save-to-disk, with your browsers SessionDescription as stdin
In the jsfiddle the top textarea is your browser's Session Description. Press `Copy browser SDP to clipboard` or copy the base64 string manually.

View File

@@ -24,9 +24,7 @@ navigator.mediaDevices.getUserMedia({ video: true, audio: true })
pc.oniceconnectionstatechange = e => log(pc.iceConnectionState)
pc.onicecandidate = event => {
if (event.candidate === null) {
document.getElementById('localSessionDescription').value = btoa(JSON.stringify(pc.localDescription))
}
document.getElementById('localSessionDescription').value = btoa(JSON.stringify(pc.localDescription))
}
window.startSession = () => {