import Link from 'next/link'; import { Result, Card, Row, Col, Input, Collapse, Typography } from 'antd'; import { MessageTwoTone, QuestionCircleTwoTone, BookTwoTone, PlaySquareTwoTone, ProfileTwoTone, } from '@ant-design/icons'; import OwncastLogo from '../components/logo'; import LogTable from '../components/log-table'; import NewsFeed from '../components/news-feed'; import { useContext } from 'react'; import { ServerStatusContext } from '../utils/server-status-context'; const { Paragraph, Text } = Typography; const { Title } = Typography; const { Meta } = Card; const { Panel } = Collapse; function generateStreamURL(serverURL) { return `rtmp://${serverURL.replace(/(^\w+:|^)\/\//, '')}/live/`; } export default function Offline({ logs = [], config }) { const serverStatusData = useContext(ServerStatusContext); const { serverConfig } = serverStatusData || {}; const { streamKey } = serverConfig; const instanceUrl = global.window?.location.hostname || ''; const data = [ { icon: , title: 'Use your broadcasting software', content: (
Learn how to point your existing software to your new server and start streaming your content. Streaming URL: {generateStreamURL(instanceUrl)} Stream Key: *********************
), }, { icon: , title: 'Chat is disabled', content: 'Chat will continue to be disabled until you begin a live stream.', }, { icon: , title: 'Embed your video onto other sites', content: (
Learn how you can add your Owncast stream to other sites you control.
), }, { icon: , title: 'Not sure what to do next?', content: (
If you're having issues or would like to know how to customize and configure your Owncast server visit the help page.
), }, ]; if (!config?.yp?.enabled) { data.push({ icon: , title: 'Find an audience on the Owncast Directory', content: (
List yourself in the Owncast Directory and show off your stream. Enable it in{' '} settings.
), }); } return ( <>
No stream is active

You should start one.

{data.map(item => ( ))} ); }