Take control over your live stream video by running it yourself. Streaming + chat out of the box.
HTML activitypubbroadcastingchatdecentralizedfederationfediversegolanghacktoberfesthlslivelivestreamowncastrtmpself-hostedstreaming-videovideo
Add aria-title attribute to video player. For #1826
Gabe Kangas0ac0a962e0bf
diff --git a/web/components/ui/Content/Content.tsx b/web/components/ui/Content/Content.tsxindex fe077b0dca..53194cb42a 100644--- a/web/components/ui/Content/Content.tsx+++ b/web/components/ui/Content/Content.tsx@@ -335,7 +335,13 @@ export const Content: FC = () => {<div className={styles.mainSection}><div className={styles.topSection}>{appState.appLoading && <Skeleton loading active paragraph={{ rows: 7 }} />}- {online && <OwncastPlayer source="/hls/stream.m3u8" online={online} />}+ {online && (+ <OwncastPlayer+ source="/hls/stream.m3u8"+ online={online}+ title={streamTitle || name}+ />+ )}{!online && !appState.appLoading && (<OfflineBannerstreamName={name}diff --git a/web/components/video/OwncastPlayer/OwncastPlayer.stories.tsx b/web/components/video/OwncastPlayer/OwncastPlayer.stories.tsxindex 9c2b007a3e..ac27bafd99 100644--- a/web/components/video/OwncastPlayer/OwncastPlayer.stories.tsx+++ b/web/components/video/OwncastPlayer/OwncastPlayer.stories.tsx@@ -34,4 +34,5 @@ export const LiveDemo = Template.bind({});LiveDemo.args = {online: true,source: 'https://watch.owncast.online/hls/stream.m3u8',+ title: 'Stream title',};diff --git a/web/components/video/OwncastPlayer/OwncastPlayer.tsx b/web/components/video/OwncastPlayer/OwncastPlayer.tsxindex 4a21cf6241..e806f14b99 100644--- a/web/components/video/OwncastPlayer/OwncastPlayer.tsx+++ b/web/components/video/OwncastPlayer/OwncastPlayer.tsx@@ -10,7 +10,6 @@ import { isVideoPlayingAtom, clockSkewAtom } from '../../stores/ClientConfigStorimport PlaybackMetrics from '../metrics/playback';import createVideoSettingsMenuButton from '../settings-menu';import LatencyCompensator from '../latencyCompensator';-import styles from './OwncastPlayer.module.scss';const VIDEO_CONFIG_URL = '/api/video/variants';@@ -26,6 +25,7 @@ export type OwncastPlayerProps = {source: string;online: boolean;initiallyMuted?: boolean;+ title: string;};async function getVideoSettings() {@@ -44,6 +44,7 @@ export const OwncastPlayer: FC<OwncastPlayerProps> = ({source,online,initiallyMuted = false,+ title,}) => {const playerRef = React.useRef(null);const [videoPlaying, setVideoPlaying] = useRecoilState<boolean>(isVideoPlayingAtom);@@ -85,13 +86,13 @@ export const OwncastPlayer: FC<OwncastPlayerProps> = ({}};- const setLatencyCompensatorItemTitle = title => {+ const setLatencyCompensatorItemTitle = t => {const item = document.querySelector('.latency-toggle-item > .vjs-menu-item-text');if (!item) {return;}- item.innerHTML = title;+ item.innerHTML = t;};const startLatencyCompensator = () => {@@ -310,7 +311,7 @@ export const OwncastPlayer: FC<OwncastPlayerProps> = ({<div className={styles.container} id="player">{online && (<div className={styles.player}>- <VideoJS options={videoJsOptions} onReady={handlePlayerReady} />+ <VideoJS options={videoJsOptions} onReady={handlePlayerReady} aria-label={title} /></div>)}<div className={styles.poster}>diff --git a/web/pages/embed/video/index.tsx b/web/pages/embed/video/index.tsxindex 9f3289483f..a3dbe1df22 100644--- a/web/pages/embed/video/index.tsx+++ b/web/pages/embed/video/index.tsx@@ -20,7 +20,7 @@ export default function VideoEmbed() {const { name } = clientConfig;const { offlineMessage } = clientConfig;- const { viewerCount, lastConnectTime, lastDisconnectTime } = status;+ const { viewerCount, lastConnectTime, lastDisconnectTime, streamTitle } = status;const online = useRecoilValue<boolean>(isOnlineSelector);const router = useRouter();@@ -48,6 +48,7 @@ export default function VideoEmbed() {source="/hls/stream.m3u8"online={online}initiallyMuted={initiallyMuted}+ title={streamTitle || name}/>)}{!online && (