Note that there are some explanatory texts on larger screens.

plurals
  1. PORails - How can I load a (valid) file from Webrick into a HTML5 video element?
    text
    copied!<p>This code, from a file on my desktop, does not work:</p> <pre><code>&lt;video src="http://0.0.0.0:3000/assets/attachable/108/original/501Spotlight_PSUB.mov" controls autobuffer="autobuffer" type="video/quicktime" height="300" width="400"&gt;&lt;/video&gt; </code></pre> <p>Here are the network transaction(s?) for the video transfer:</p> <p><a href="http://project.touchstudios.net/public/broken.png" rel="nofollow">http://project.touchstudios.net/public/broken.png</a></p> <p>The video element returns code 4 - MEDIA_ERR_SRC_NOT_SUPPORTED</p> <p>This DOES work:</p> <pre><code>&lt;video src="501Spotlight_PSUB.mov" controls autobuffer="autobuffer" type="video/quicktime"height="300" width="400"&gt;&lt;/video&gt; &lt;!-- video file is on desktop too --&gt; </code></pre> <p>And here's the output for that:</p> <p><a href="http://project.touchstudios.net/public/working.png" rel="nofollow">http://project.touchstudios.net/public/working.png</a></p> <p>(note that pending status seems to be displayed permanently)</p> <p>I've fiddled around with Unicorn as well, and had similar problems. Maybe I didn't configure it properly. </p> <p>assets/attachable is in my public folder. My impression is that rails itself is barely (or not) involved with transferring/processing those files. </p> <p>I've added this line to config/initializers/mime_types.rb:</p> <pre><code>Mime::Type.register "video/quicktime", :mov </code></pre> <p>I have this output from rails console:</p> <pre><code>&gt;&gt; Mime::Type.lookup_by_extension("mov") =&gt; #&lt;Mime::Type:0x1020992e8 @string="video/quicktime", @synonyms=[], @symbol=:mov&gt; &gt;&gt; MIME::Types.type_for("asdf.mov").to_s =&gt; "video/quicktime" </code></pre> <p>Is WEBrick (1.3.1) to blame here? This exact question was asked before, but not resolved. I'm hoping to be able to provide more detail. </p> <p>Any guesses? I can answer any question that'll help narrow this down.</p> <p>Thanks</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload