Video player #14

Merged
innocuous-symmetry merged 10 commits from video-player into master 2022-02-08 17:36:39 +00:00
Showing only changes of commit f4f2d5cc9f - Show all commits

View File

@@ -10,9 +10,15 @@ export default function VideoPlayer({data, src}) {
const crossPostSrc = src;
let url = crossPostSrc ? crossPostSrc : // sets video source according to applicable
(data.url ? data.url : null); // location within reddit response
let url; // contains video source, routed accordingly by logic below
if (crossPostSrc) {
url = crossPostSrc;
} else if (data.url) {
url = data.url;
} else {
url = null;
}
useEffect(() => { // checks the endpoint where audio may be found
let checking = true; // if the fetch request throws an error, audio is set to null;