mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-01 05:20:32 +08:00
Allow users to skip using openrelay (#1042)
This commit is contained in:
1 parent
8fc7950719
commit
bce963facc
2 files changed
+25
-19
No files matched your search
@@ -183,6 +183,9 @@ class ViewerConfig(PrintableConfig):
|
|||||||
actually used in training/evaluation. If -1, display all."""
|
actually used in training/evaluation. If -1, display all."""
|
||||||
quit_on_train_completion: bool = False
|
quit_on_train_completion: bool = False
|
||||||
"""Whether to kill the training job when it has completed. Note this will stop rendering in the viewer."""
|
"""Whether to kill the training job when it has completed. Note this will stop rendering in the viewer."""
|
||||||
|
skip_openrelay: bool = False
|
||||||
|
"""Avoid using openrelay to communicate with the viewer. Try disabling if you have trouble
|
||||||
|
connecting to the viewer"""
|
||||||
|
|
||||||
|
|
||||||
from nerfstudio.engine.optimizers import OptimizerConfig
|
from nerfstudio.engine.optimizers import OptimizerConfig
|
||||||
|
|||||||
@@ -508,25 +508,28 @@ 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(
|
if self.config.skip_openrelay:
|
||||||
configuration=RTCConfiguration(
|
ice_servers = [
|
||||||
iceServers=[
|
RTCIceServer(urls="stun:stun.l.google.com:19302"),
|
||||||
RTCIceServer(urls="stun:stun.l.google.com:19302"),
|
]
|
||||||
RTCIceServer(urls="stun:openrelay.metered.ca:80"),
|
else:
|
||||||
RTCIceServer(
|
ice_servers = [
|
||||||
urls="turn:openrelay.metered.ca:80", username="openrelayproject", credential="openrelayproject"
|
RTCIceServer(urls="stun:stun.l.google.com:19302"),
|
||||||
),
|
RTCIceServer(urls="stun:openrelay.metered.ca:80"),
|
||||||
RTCIceServer(
|
RTCIceServer(
|
||||||
urls="turn:openrelay.metered.ca:443", username="openrelayproject", credential="openrelayproject"
|
urls="turn:openrelay.metered.ca:80", username="openrelayproject", credential="openrelayproject"
|
||||||
),
|
),
|
||||||
RTCIceServer(
|
RTCIceServer(
|
||||||
urls="turn:openrelay.metered.ca:443?transport=tcp",
|
urls="turn:openrelay.metered.ca:443", username="openrelayproject", credential="openrelayproject"
|
||||||
username="openrelayproject",
|
),
|
||||||
credential="openrelayproject",
|
RTCIceServer(
|
||||||
),
|
urls="turn:openrelay.metered.ca:443?transport=tcp",
|
||||||
]
|
username="openrelayproject",
|
||||||
)
|
credential="openrelayproject",
|
||||||
)
|
),
|
||||||
|
]
|
||||||
|
|
||||||
|
pc = RTCPeerConnection(configuration=RTCConfiguration(iceServers=ice_servers))
|
||||||
self.pcs.add(pc)
|
self.pcs.add(pc)
|
||||||
|
|
||||||
video = SingleFrameStreamTrack()
|
video = SingleFrameStreamTrack()
|
||||||
|
|||||||
Reference in new issue
Block a user