Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8876929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:20:19+00:00 2026-06-14T19:20:19+00:00

I just learned here that in order to play some video in HTML5’s <video>

  • 0

I just learned here that in order to play some video in HTML5’s <video> tag I should make sure that while serving video on some URL appropriate Content-Type has also to be set.

How can this be avoided when I simply run my web page from local file system or I don’t have ability to manipulate server response headers?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T19:20:20+00:00Added an answer on June 14, 2026 at 7:20 pm

    Your best bet is to use HTML5 FileReader API (tutorial).
    That will provide the local video as a url. In some sites you could find demo showing the previews of the images before upload, but by theory (and practical, see the link below) it is possible to use the same on audio and video.

    I’ve done a small demo (not for this, but for the Camera API), which might suite your need.

    see it yourself: http://jsbin.com/efunel/6

    the video demo worked in chromium(20.0), and in firefox(16.0) (after taking REALLY long time!!!), with Webm format only.

    PS: try selecting a small video (below 15M).

    EDIT:
    (code snippet as @headkit requested it)

    fileReader = new FileReader();
    fileReader.onload = function (event) {
        element.attr("src",event.target.result);
    };
    fileReader.readAsDataURL(file);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just learned that, quoting make a huge difference in some cases, and I
I am a newbie and just learned that if I define say package my.first.group.here;
I just learned about ThreadLocal this morning. I read that it should always be
I just learned the hard way that IntPtr.Zero cannot be compared to default(IntPtr). Can
I just learned (the hard way) that Java Component s can only have one
I just learned of vim's gf command for navigating to files that are referenced
I've just learned that we can iterate through all checkboxes in a document, but
Possible Duplicate: C++ typedef interpretation of const pointers I just learned that typedef does
Update: More info on this here: Is it true that one should not use
I just learned, here , about nxml-mode , which, according to the README, is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.