Rails 4 - How to serve video?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using Rails 4 for my web application and I'm using VideoJS to display it, like: <video id="video1" class="video-js" controls preload="auto" width="640" height="264" poster="{{pCtrl.video.poster}}" src="<%= @video.file %>"> <source src="<%= @video.file %>" type="video/<%= @video.file.file.filename.last(3) %>"> </video> I was always getting this error from VideoJS: VIDEOJS: ERROR: (CODE:3 MEDIA_ERR_DECODE) The video playback was aborted due to a corruption problem or because the video used features your browser did not support. When I open