Commit 88cc8a88 authored by Mark Repka's avatar Mark Repka

Update dash url

parent 85327198
......@@ -4,32 +4,6 @@ import Helmet from "react-helmet";
const VideLivestream = ({ path, location, uri, pageContext, pathContext }) => {
let uniqueUrl = "https://nuc.repkam09.com/live/live_" + Date.now() + ".mpd";
const [isLive, updateIsLive] = useState(false);
useEffect(() => {
fetch(uniqueUrl)
.then(response => {
console.log("Stream is currently active!");
updateIsLive(true);
}).catch((err) => {
console.log("Stream is currently offline!");
updateIsLive(false);
});
}, []);
let videoPlayer = null;
if (isLive) {
videoPlayer = (
<video className="fill-width" data-dashjs-player={true} autoPlay={true} src={uniqueUrl} controls={true}></video>
);
} else {
videoPlayer = (
<img className="fill-width" src="/images/stream-offline.jpg" />
)
}
return (
<>
<Helmet>
......@@ -38,7 +12,7 @@ const VideLivestream = ({ path, location, uri, pageContext, pathContext }) => {
<Layout pagetitle="Livestream" description="Livestream" displayClass="bgdark">
<section className="page-content-wrapper">
<section className="page-content">
{videoPlayer}
<video className="fill-width" data-dashjs-player={true} autoPlay={true} src="https://nuc.repkam09.com/dash/movienight.mpd" controls={true}></video>
</section>
</section>
</Layout>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment