|
|
|
@ -18,15 +18,15 @@ const { Title } = Typography; |
|
|
|
const { Meta } = Card; |
|
|
|
const { Meta } = Card; |
|
|
|
const { Panel } = Collapse; |
|
|
|
const { Panel } = Collapse; |
|
|
|
|
|
|
|
|
|
|
|
function generateStreamURL(serverURL) { |
|
|
|
function generateStreamURL(serverURL, rtmpServerPort) { |
|
|
|
return `rtmp://${serverURL.replace(/(^\w+:|^)\/\//, '')}/live/`; |
|
|
|
return `rtmp://${serverURL.replace(/(^\w+:|^)\/\//, '')}:${rtmpServerPort}/live/`; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export default function Offline({ logs = [], config }) { |
|
|
|
export default function Offline({ logs = [], config }) { |
|
|
|
const serverStatusData = useContext(ServerStatusContext); |
|
|
|
const serverStatusData = useContext(ServerStatusContext); |
|
|
|
|
|
|
|
|
|
|
|
const { serverConfig } = serverStatusData || {}; |
|
|
|
const { serverConfig } = serverStatusData || {}; |
|
|
|
const { streamKey } = serverConfig; |
|
|
|
const { streamKey, rtmpServerPort } = serverConfig; |
|
|
|
const instanceUrl = global.window?.location.hostname || ''; |
|
|
|
const instanceUrl = global.window?.location.hostname || ''; |
|
|
|
|
|
|
|
|
|
|
|
const data = [ |
|
|
|
const data = [ |
|
|
|
@ -49,7 +49,7 @@ export default function Offline({ logs = [], config }) { |
|
|
|
</Col> |
|
|
|
</Col> |
|
|
|
<Col flex="auto"> |
|
|
|
<Col flex="auto"> |
|
|
|
<Paragraph className="stream-info-box" copyable> |
|
|
|
<Paragraph className="stream-info-box" copyable> |
|
|
|
{generateStreamURL(instanceUrl)} |
|
|
|
{generateStreamURL(instanceUrl, rtmpServerPort)} |
|
|
|
</Paragraph> |
|
|
|
</Paragraph> |
|
|
|
</Col> |
|
|
|
</Col> |
|
|
|
</Row> |
|
|
|
</Row> |
|
|
|
|