RE: [Broken] HTML5 Video - MP4 Player 11-06-2018, 06:33 PM
#3
Check out decodeURIComponent() and take a look at MIME types.
Use type="video/mp4" for mp4 videos and the URL gets encoded so it isn't put in the source tag properly.
![[Image: 5ZZOPJa.png]](https://i.imgur.com/5ZZOPJa.png)
(The %3A is supposed to be a : )
Change line 32 to the following and it will work:
![[Image: G81Gh0s.png]](https://i.imgur.com/G81Gh0s.png)
Btw the code is very bad actually so you should think about improving it
Use type="video/mp4" for mp4 videos and the URL gets encoded so it isn't put in the source tag properly.
![[Image: 5ZZOPJa.png]](https://i.imgur.com/5ZZOPJa.png)
(The %3A is supposed to be a : )
Change line 32 to the following and it will work:
Code:
document.write('<video width="320" height="200" controls><source src="' + decodeURIComponent(video_id) + '" type="video/mp4">Your browser does not support the video tag.</video><br><br><br>');![[Image: G81Gh0s.png]](https://i.imgur.com/G81Gh0s.png)
Btw the code is very bad actually so you should think about improving it



![[+]](https://sinister.li/images/modern/collapse_collapsed.png)