mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-03 14:28:41 +08:00
1 parent
e4b5dea6e4
commit
27ec772831
2 files changed
+26
-2
No files matched your search
@@ -18,6 +18,7 @@ export default function WebRtcWindow() {
|
|||||||
const getRTCPeerConnection = () => {
|
const getRTCPeerConnection = () => {
|
||||||
const pc = new RTCPeerConnection({
|
const pc = new RTCPeerConnection({
|
||||||
iceServers: [
|
iceServers: [
|
||||||
|
{ urls: 'stun:stun.l.google.com:19302' },
|
||||||
{
|
{
|
||||||
urls: 'stun:openrelay.metered.ca:80',
|
urls: 'stun:openrelay.metered.ca:80',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -28,7 +28,12 @@ from typing import Any, Dict, Optional, Tuple
|
|||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import torch
|
import torch
|
||||||
from aiortc import RTCPeerConnection, RTCSessionDescription
|
from aiortc import (
|
||||||
|
RTCConfiguration,
|
||||||
|
RTCIceServer,
|
||||||
|
RTCPeerConnection,
|
||||||
|
RTCSessionDescription,
|
||||||
|
)
|
||||||
from cryptography.utils import CryptographyDeprecationWarning
|
from cryptography.utils import CryptographyDeprecationWarning
|
||||||
from rich.console import Console
|
from rich.console import Console
|
||||||
|
|
||||||
@@ -503,7 +508,25 @@ class ViewerState:
|
|||||||
# returns the description to for WebRTC to the specific websocket connection
|
# returns the description to for WebRTC to the specific websocket connection
|
||||||
offer = RTCSessionDescription(data["sdp"], data["type"])
|
offer = RTCSessionDescription(data["sdp"], data["type"])
|
||||||
|
|
||||||
pc = RTCPeerConnection()
|
pc = RTCPeerConnection(
|
||||||
|
configuration=RTCConfiguration(
|
||||||
|
iceServers=[
|
||||||
|
RTCIceServer(urls="stun:stun.l.google.com:19302"),
|
||||||
|
RTCIceServer(urls="stun:openrelay.metered.ca:80"),
|
||||||
|
RTCIceServer(
|
||||||
|
urls="turn:openrelay.metered.ca:80", username="openrelayproject", credential="openrelayproject"
|
||||||
|
),
|
||||||
|
RTCIceServer(
|
||||||
|
urls="turn:openrelay.metered.ca:443", username="openrelayproject", credential="openrelayproject"
|
||||||
|
),
|
||||||
|
RTCIceServer(
|
||||||
|
urls="turn:openrelay.metered.ca:443?transport=tcp",
|
||||||
|
username="openrelayproject",
|
||||||
|
credential="openrelayproject",
|
||||||
|
),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
)
|
||||||
self.pcs.add(pc)
|
self.pcs.add(pc)
|
||||||
|
|
||||||
video = SingleFrameStreamTrack()
|
video = SingleFrameStreamTrack()
|
||||||
|
|||||||
Reference in new issue
Block a user