Skip to content

Commit 5fbdbc5

Browse files
author
lijiahao
committed
update
1 parent 01ce3cd commit 5fbdbc5

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

renderer/pages/[locale]/stream.tsx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import xStreamingPlayer from "xstreaming-player";
66
import ActionBar from "../../components/ActionBar";
77
import Display from "../../components/Display";
88
import Audio from "../../components/Audio";
9-
import FailedModal from "../../components/FailedModal";
9+
// import FailedModal from "../../components/FailedModal";
1010
import Loading from "../../components/Loading";
1111
import Perform from "../../components/Perform";
1212
import WarningModal from "../../components/WarningModal";
@@ -43,7 +43,7 @@ function Stream() {
4343
const [connectState, setConnectState] = useState("");
4444
const [sessionId, setSessionId] = useState("");
4545
const [showPerformance, setShowPerformance] = useState(false);
46-
const [showFailed, setShowFailed] = useState(false);
46+
// const [showFailed, setShowFailed] = useState(false);
4747
const [showWarning, setShowWarning] = useState(false);
4848
const [showDisplay, setShowDisplay] = useState(false);
4949
const [showAudio, setShowAudio] = useState(false);
@@ -206,7 +206,12 @@ function Stream() {
206206
xPlayer.setConnectFailHandler(() => {
207207
// Not connected
208208
setShowWarning(false);
209-
setShowFailed(true);
209+
// setShowFailed(true);
210+
alert(
211+
t(
212+
"NAT failed. If you are trying to stream remotely, please ensure that you have a public IPV4/6 address and that your router has port forwarding enabled for ports 9002/3074."
213+
)
214+
)
210215
});
211216

212217
xPlayer.setSdpHandler((client, offer) => {
@@ -488,7 +493,7 @@ function Stream() {
488493
window.removeEventListener("mousedown", mouseEvent);
489494
window.removeEventListener('keydown', escEvent)
490495
};
491-
}, [xPlayer, sessionId, t, router.query.serverid, settings]);
496+
}, [xPlayer, sessionId, t, router.query, settings]);
492497

493498
const getVideoPlayerFilterStyle = (options) => {
494499
const filters = [];
@@ -702,12 +707,12 @@ function Stream() {
702707
)
703708
}
704709

705-
<FailedModal
710+
{/* <FailedModal
706711
show={showFailed}
707712
onCancel={() => {
708713
setShowFailed(false);
709714
}}
710-
/>
715+
/> */}
711716

712717
<WarningModal
713718
show={showWarning}

0 commit comments

Comments
 (0)