snapshot of https://github.com/pion/webrtc.git (main, 2026-09-15; blobs > 131072B omitted)
Some checks failed
REUSE Compliance Check / lint (push) Failing after 0s
Browser E2E / Test (push) Failing after 3s
Test / test (1.24) (push) Failing after 0s
Test / test-i386 (1.25) (push) Failing after 0s
Test / test-i386 (1.24) (push) Failing after 0s
Test / test-windows (1.25) (push) Failing after 0s
Test / test-windows (1.24) (push) Failing after 0s
Test / test (1.25) (push) Failing after 0s
Examples Tests / Test (push) Failing after 3s
Test / test-macos (1.25) (push) Failing after 0s
Test / test-macos (1.24) (push) Failing after 0s
Go mod tidy / tidy (push) Failing after 0s
Test / test-wasm (push) Failing after 0s
CodeQL / analyze (push) Failing after 1s
Fuzz / fuzz (push) Failing after 0s
Some checks failed
REUSE Compliance Check / lint (push) Failing after 0s
Browser E2E / Test (push) Failing after 3s
Test / test (1.24) (push) Failing after 0s
Test / test-i386 (1.25) (push) Failing after 0s
Test / test-i386 (1.24) (push) Failing after 0s
Test / test-windows (1.25) (push) Failing after 0s
Test / test-windows (1.24) (push) Failing after 0s
Test / test (1.25) (push) Failing after 0s
Examples Tests / Test (push) Failing after 3s
Test / test-macos (1.25) (push) Failing after 0s
Test / test-macos (1.24) (push) Failing after 0s
Go mod tidy / tidy (push) Failing after 0s
Test / test-wasm (push) Failing after 0s
CodeQL / analyze (push) Failing after 1s
Fuzz / fuzz (push) Failing after 0s
This commit is contained in:
45
e2e/test.html
Normal file
45
e2e/test.html
Normal file
@@ -0,0 +1,45 @@
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2026 The Pion community <https://pion.ly>
|
||||
SPDX-License-Identifier: MIT
|
||||
-->
|
||||
<div id="media"></div>
|
||||
|
||||
<script>
|
||||
const pc = new RTCPeerConnection()
|
||||
pc.ontrack = event => {
|
||||
if (event.track.kind === 'audio') {
|
||||
var el = document.createElement(event.track.kind)
|
||||
el.srcObject = new MediaStream(event.streams[0].getAudioTracks())
|
||||
document.getElementById('media').appendChild(el)
|
||||
}
|
||||
}
|
||||
pc.oniceconnectionstatechange = event => {
|
||||
console.log("connection", pc.iceConnectionState)
|
||||
if (pc.iceConnectionState == 'connected') {
|
||||
setInterval(statsReport, 1000)
|
||||
}
|
||||
}
|
||||
pc.onicecandidate = event => {
|
||||
if (event.candidate === null) {
|
||||
console.log("sdp", JSON.stringify(pc.localDescription))
|
||||
}
|
||||
}
|
||||
pc.addTransceiver('audio', {'direction': 'recvonly'})
|
||||
|
||||
const dc = pc.createDataChannel("upper")
|
||||
dc.onmessage = event => {
|
||||
dc.send(event.data.toUpperCase())
|
||||
}
|
||||
|
||||
pc.createOffer().then(d => pc.setLocalDescription(d)).catch(console.log)
|
||||
|
||||
const statsReport = async () => {
|
||||
const stats = await pc.getStats()
|
||||
var data = []
|
||||
await stats.forEach(item => {
|
||||
data.push(item)
|
||||
})
|
||||
console.log("stats", JSON.stringify(data))
|
||||
}
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user