How to open .mov format video in HTML video Tag?

后端 未结 7 979
没有蜡笔的小新
没有蜡笔的小新 2020-12-14 06:20

I want to play .mov video like as this, but video doesn\'t play in any browser.

相关标签:
7条回答
  • 2020-12-14 06:55

    My new answer is to use ffmpeg to transcode the .mov like ffmpeg -i sourceFile.mov destinationFile.mp4. Do same for the webm format.

    OLD Answer: Here's what you do:

    1. Upload your video to Youtube.
    2. Install the "Complete YouTube Saver" plugin for Firefox
    3. Using the plugin in Firefox, download both the MP4 and WEBM formats and place them on your Web server
    4. Add the HTML5 Video element to your webpage per MDN's recommendation
    <video controls>
      <source src="somevideo.webm" type="video/webm">
      <source src="somevideo.mp4" type="video/mp4">
      I'm sorry; your browser doesn't support HTML5 video in WebM with VP8/VP9 or MP4 with H.264.
      <!-- You can embed a Flash player here, to play your mp4 video in older browsers -->
    </video>
    
    1. Style the <video> element with CSS to suit your needs. For example Materializecss has a simple helper class to render the video nicely across device types.
    0 讨论(0)
提交回复
热议问题