Home > database >  What is the error with my video in html5?
What is the error with my video in html5?

Time:11-22

http://68.178.166.65:3080/AgADcw48 This is the link of the video. I generated it by the bot made with linux vps. The link is working fine but why it's not playing in html? Please can anyone help me?

<!DOCTYPE html> 
<html> 
<body> 

<video width="400" controls>
  <source src="http://68.178.166.65:3080/AgADcw48" type="video/mp4">
  
  Your browser does not support HTML video.
</video>

<p>
Video courtesy of 
<a href="" target="_blank"></a>.
</p>

</body> 
</html>

The result of this code is here.- https://gdplaydora.blogspot.com/p/your-browser-does-not-support-html-video_21.html

The reason of this error and I want the solution

CodePudding user response:

Your video isn't working, because of mixed content (mixed http & https connections)

If you run that code on your local machine it will work fine because there are not any mixed content, there we have only http. Browser blocks insecure http connection when your website works in https://.

HTTPS pages commonly suffer from a problem called mixed content, where subresources on the page are loaded insecurely over http://. Browsers block many types of mixed content by default, like scripts and iframes, but images, audio, and video are still allowed to load, which threatens users’ privacy and security. For example, an attacker could tamper with a mixed image of a stock chart to mislead investors, or inject a tracking cookie into a mixed resource load. Loading mixed content also leads to a confusing browser security UX, where the page is presented as neither secure nor insecure but somewhere in between. In a series of steps starting in Chrome 79, Chrome will gradually move to blocking all mixed content by default. To minimize breakage, we will autoupgrade mixed resources to https://, so sites will continue to work if their subresources are already available over https://. Users will be able to enable a setting to opt out of mixed content blocking on particular websites, and below we’ll describe the resources available to developers to help them find and fix mixed content.(from chrome's mixed content blog post)

More info about mixed content you can learn here

  • Related