|
|
|
@ -26,8 +26,8 @@ import { formatIPAddress, isEmptyObject } from "../utils/format"; |
|
|
|
function streamDetailsFormatter(streamDetails) { |
|
|
|
function streamDetailsFormatter(streamDetails) { |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<ul className="statistics-list"> |
|
|
|
<ul className="statistics-list"> |
|
|
|
<li>{streamDetails.videoCodec} @ {streamDetails.videoBitrate} kbps</li> |
|
|
|
<li>{streamDetails.videoCodec || 'Unknown'} @ {streamDetails.videoBitrate || 'Unknown'} kbps</li> |
|
|
|
<li>{streamDetails.framerate} fps</li> |
|
|
|
<li>{streamDetails.framerate || 'Unknown'} fps</li> |
|
|
|
<li>{streamDetails.width} x {streamDetails.height}</li> |
|
|
|
<li>{streamDetails.width} x {streamDetails.height}</li> |
|
|
|
</ul> |
|
|
|
</ul> |
|
|
|
); |
|
|
|
); |
|
|
|
@ -37,6 +37,7 @@ export default function Home() { |
|
|
|
const serverStatusData = useContext(ServerStatusContext); |
|
|
|
const serverStatusData = useContext(ServerStatusContext); |
|
|
|
const { broadcaster, serverConfig: configData } = serverStatusData || {}; |
|
|
|
const { broadcaster, serverConfig: configData } = serverStatusData || {}; |
|
|
|
const { remoteAddr, streamDetails } = broadcaster || {}; |
|
|
|
const { remoteAddr, streamDetails } = broadcaster || {}; |
|
|
|
|
|
|
|
|
|
|
|
const encoder = streamDetails?.encoder || "Unknown encoder"; |
|
|
|
const encoder = streamDetails?.encoder || "Unknown encoder"; |
|
|
|
|
|
|
|
|
|
|
|
const [logsData, setLogs] = useState([]); |
|
|
|
const [logsData, setLogs] = useState([]); |
|
|
|
@ -76,14 +77,14 @@ export default function Home() { |
|
|
|
// map out settings
|
|
|
|
// map out settings
|
|
|
|
const videoQualitySettings = configData?.videoSettings?.videoQualityVariants?.map((setting, index) => { |
|
|
|
const videoQualitySettings = configData?.videoSettings?.videoQualityVariants?.map((setting, index) => { |
|
|
|
const { audioPassthrough, videoPassthrough, audioBitrate, videoBitrate, framerate } = setting; |
|
|
|
const { audioPassthrough, videoPassthrough, audioBitrate, videoBitrate, framerate } = setting; |
|
|
|
const audioSetting = |
|
|
|
|
|
|
|
audioPassthrough || audioBitrate === 0 |
|
|
|
const audioSetting = audioPassthrough |
|
|
|
? `${streamDetails.audioCodec}, ${streamDetails.audioBitrate} kbps` |
|
|
|
? `${streamDetails.audioCodec || 'Unknown'}, ${streamDetails.audioBitrate} kbps` |
|
|
|
: `${audioBitrate} kbps`; |
|
|
|
: `${audioBitrate || 'Unknown'} kbps`; |
|
|
|
const videoSetting = |
|
|
|
|
|
|
|
videoPassthrough || videoBitrate === 0 |
|
|
|
const videoSetting = videoPassthrough |
|
|
|
? `${streamDetails.videoBitrate} kbps, ${streamDetails.framerate} fps ${streamDetails.width} x ${streamDetails.height}` |
|
|
|
? `${streamDetails.videoBitrate || 'Unknown'} kbps, ${streamDetails.framerate} fps ${streamDetails.width} x ${streamDetails.height}` |
|
|
|
: `${videoBitrate} kbps, ${framerate} fps`; |
|
|
|
: `${videoBitrate || 'Unknown'} kbps, ${framerate} fps`; |
|
|
|
|
|
|
|
|
|
|
|
let settingTitle = 'Outbound Stream Details'; |
|
|
|
let settingTitle = 'Outbound Stream Details'; |
|
|
|
settingTitle = (videoQualitySettings?.length > 1) ? |
|
|
|
settingTitle = (videoQualitySettings?.length > 1) ? |
|
|
|
@ -108,7 +109,7 @@ export default function Home() { |
|
|
|
// inbound
|
|
|
|
// inbound
|
|
|
|
const { viewerCount, sessionMaxViewerCount } = serverStatusData; |
|
|
|
const { viewerCount, sessionMaxViewerCount } = serverStatusData; |
|
|
|
|
|
|
|
|
|
|
|
const streamAudioDetailString = `${streamDetails.audioCodec}, ${streamDetails.audioBitrate} kbps`; |
|
|
|
const streamAudioDetailString = `${streamDetails.audioCodec}, ${streamDetails.audioBitrate || 'Unknown'} kbps`; |
|
|
|
|
|
|
|
|
|
|
|
const broadcastDate = new Date(broadcaster.time); |
|
|
|
const broadcastDate = new Date(broadcaster.time); |
|
|
|
|
|
|
|
|
|
|
|
|