mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-04 14:58:55 +08:00
Allow users to skip using openrelay (#1042)
This commit is contained in:
1 parent
8fc7950719
commit
bce963facc
2 files changed
+11
-5
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,9 +508,12 @@ 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"),
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
ice_servers = [
|
||||||
RTCIceServer(urls="stun:stun.l.google.com:19302"),
|
RTCIceServer(urls="stun:stun.l.google.com:19302"),
|
||||||
RTCIceServer(urls="stun:openrelay.metered.ca:80"),
|
RTCIceServer(urls="stun:openrelay.metered.ca:80"),
|
||||||
RTCIceServer(
|
RTCIceServer(
|
||||||
@@ -525,8 +528,8 @@ class ViewerState:
|
|||||||
credential="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