import React, { useContext } from 'react'; import { BroadcastStatusContext } from './utils/broadcast-status-context'; export default function BroadcastInfo() { const context = useContext(BroadcastStatusContext); const { broadcaster } = context || {}; const { remoteAddr, time, streamDetails } = broadcaster || {}; return (
Remote Address: {remoteAddr}
Time: {(new Date(time)).toLocaleTimeString()}
Stream Details: {JSON.stringify(streamDetails)}