mirror of
https://github.com/owncast/owncast.git
synced 2024-10-10 19:16:02 +00:00
Show RTMP port on home page. Closes https://github.com/owncast/owncast/issues/1049
This commit is contained in:
parent
116be1c958
commit
aa7f7f58dd
@ -18,15 +18,15 @@ const { Title } = Typography;
|
||||
const { Meta } = Card;
|
||||
const { Panel } = Collapse;
|
||||
|
||||
function generateStreamURL(serverURL) {
|
||||
return `rtmp://${serverURL.replace(/(^\w+:|^)\/\//, '')}/live/`;
|
||||
function generateStreamURL(serverURL, rtmpServerPort) {
|
||||
return `rtmp://${serverURL.replace(/(^\w+:|^)\/\//, '')}:${rtmpServerPort}/live/`;
|
||||
}
|
||||
|
||||
export default function Offline({ logs = [], config }) {
|
||||
const serverStatusData = useContext(ServerStatusContext);
|
||||
|
||||
const { serverConfig } = serverStatusData || {};
|
||||
const { streamKey } = serverConfig;
|
||||
const { streamKey, rtmpServerPort } = serverConfig;
|
||||
const instanceUrl = global.window?.location.hostname || '';
|
||||
|
||||
const data = [
|
||||
@ -49,7 +49,7 @@ export default function Offline({ logs = [], config }) {
|
||||
</Col>
|
||||
<Col flex="auto">
|
||||
<Paragraph className="stream-info-box" copyable>
|
||||
{generateStreamURL(instanceUrl)}
|
||||
{generateStreamURL(instanceUrl, rtmpServerPort)}
|
||||
</Paragraph>
|
||||
</Col>
|
||||
</Row>
|
||||
|
Loading…
x
Reference in New Issue
Block a user