redcrow
redcrow

Reputation: 1823

Load a video from an external resource in my web hosting

I have a simple web page written in HTML for testing video streaming.

<video controls name="media">
    <source src="external_url.mp4" type="video/mp4">
</video>

That's work in local, but when I upload the page on my free web hosting, the page doesn't load any video. Is there a workaround? Maybe using an embedded player?

update

I've discovered that's a problem related to video. Unfortunately I cannot link it because it's for a private presentation, but I've tried with other videos and that works well. Any idea why my video doesn't play?

Upvotes: 1

Views: 1318

Answers (2)

ivan_pozdeev
ivan_pozdeev

Reputation: 35986

How do you upload the video? If FTP, text transfer mode may have ruined the file. The hosting (especially, a free one) can impose a limit on the file size (uploaded or served) too. Or even on content types (e.g. narod.ru didn't allow to read files directly, serving a "download page" on an attempt instead).

Try to download the video file directly and compare it with the reference one.

Upvotes: 1

Migisha
Migisha

Reputation: 415

  1. Please check that the URL is intact.
  2. Check if there might be some file discrepancies. The control currently supports mp4, ogg, and webm as seen here.
  3. Use the canPlayType() method to test the site AFTER the upload - just to be sure we're covered on that front. See here for the DOM reference.
  4. You can fiddle around here if you don't want to have to upload the site first before live-testing it.

Hope that helps.

Upvotes: 1

Related Questions