I’m currently creating a Reddit app using the Reddit JSON API (https://www.reddit.com/r/popular.json?limit=10).
I’ve managed to embed video(s) into Reddit posts using the following code:
<div id="post-video">
{/*Accessing Reddit videos - offering alternative URL if the browser cannot load video*/}
{ props.article.secure_media ?
<video width="750" height="500" controls>
<source src={props.article.secure_media.reddit_video.fallback_url} type="video/mp4" />
<p>
Your browser doesn't support this video. Here is a
<a href={props.article.secure_media.reddit_video.fallback_url}>link to the video</a> instead.
</p>
</video> : null }
</div>
However, the videos are not playing any sound. I’ve seen multiple solutions online but they don’t seem to work now. I’m working with multiple videos which is why I can’t use a fixed URL. Here’s what I see:
Video plays but audio cannot be accessed
What would be the best way to get the audio to play on all the videos? I’m guessing I’d need to combine the videos and audio? How do you do that?
Thanks!
I tried getting the sound from https://v.redd.it/3erl5oshh75d1/audio?source=fallback%22 and it says “Access denied”.
Antonia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.