Jump to content
[MUST READ] Forum Rules ×

Is mp4 playback allowed on free hosting?


waigyuk

Recommended Posts

I've tried to add a video background to a webpage using the following code.

It works offline but the video doesn't show at all on brave, firefox and edge browsers.

I'm just checking if this is disabled in free hosting before I check for changes needed to the code.

I have this in the <head> section :

<style>
#myVideo {
  position: fixed;
  right: 0;
  bottom: 0;
  min-width: 100%;
  min-height: 100%;
  opacity: 0.1;
  right: 0;
  bottom: 0;
  z-index: -1;

 }

</style>

And this in the <body> section :

<video autoplay muted loop id="myVideo">
  <source src="untitled.mp4" type="video/mp4">
  Your browser does not support HTML5 video.
</video>

Edited by waigyuk
Link to comment
Share on other sites

Ok, it's working.

Of course it had to be the simplest error.

My uploaded file was called Untitled.mp4 instead of untitled.mp4.

It's working in edge and firefox though both seemed to take almost 1 minute to load the background video even though it's only 5mb.

Brave isn't working so far, but I recently read a post about chrome disabling autoplay and a way around it.

Will look for that now.

Link to comment
Share on other sites

On 6/25/2023 at 7:10 PM, waigyuk said:

In dev tools it gets this error

Failed to load resource: the server responded with a status of 404 ()  untitled.mp4:1

404 error means the path/filename specified is the problem. If you can verify it had been successfully uploaded.

On 6/25/2023 at 7:23 PM, waigyuk said:

Ok, it's working.

Of course it had to be the simplest error.

My uploaded file was called Untitled.mp4 instead of untitled.mp4.

It's working in edge and firefox though both seemed to take almost 1 minute to load the background video even though it's only 5mb.

Brave isn't working so far, but I recently read a post about chrome disabling autoplay and a way around it.

Will look for that now.

Chrome and Brave disabled autoplay if there are no user interactions, however, I'm sure it could still be enabled in some way.

The slow loading speed, it's the downside of free hosting. I recommend you upload the video to YouTube and embed it from there instead.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...