尝试在 ruby​​ mongrel 服务器上播放 mp4 视频

发布于 2024-10-31 21:23:05 字数 2098 浏览 5 评论 0原文

您好,我正在尝试在 Windows 7 上运行 ruby​​ mongrel 服务器。我正在使用一些 video-js 代码来显示视频。

<title>Waza Player</title>
<script src="video.js" type="text/javascript" charset="utf-8"></script>

  <script type="text/javascript">
    VideoJS.setupAllWhenReady();
  </script>
  <link rel="stylesheet" href="video-js.css" type="text/css" media="screen" title="Video JS">
<body>
  <div class="video-js-box">
    <video id="example_video_1" class="video-js" width="720" height="304" controls="controls" preload="auto">
      <source src="converted/randomvideo.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
    </video>   
  </div>
</body>

当我在 apache 中使用相同的 html 和 javascript 时,它工作得很好。

我已经为 mp4 视频设置了 mimetype,但这似乎没有解决问题。

任何帮助将不胜感激

2011-04-09 06:45:55 -0700:读取错误:#>

d:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/lib/mongrel/h ttp_response.rb:140:在“写”

d:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/lib/mongrel/h ttp_response.rb:140:在“写”

d:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/handler/mongrel.rb:81:in `进程中的块'

d:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/file.rb:87:in `块中 每个'

d:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/file.rb:85:in `open'

d:/Ruby192/lib/ruby/gems/ 1.9.1/gems/rack-1.2.2/lib/rack/file.rb:85:在“每个”

d:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib /rack/handler/mongrel.rb:80:in `进程'

d:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/lib/mongrel.r b:165:在`process_client中的块'

d:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/lib/mongrel.r b:164:在“每个”

d:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/lib/mongrel.r b:164:在“process_client”中

d:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/lib/mongrel.r b:291:in `运行中的块(2 级)'

Hello I am trying to run a ruby mongrel server on windows 7. I am using some video-js code to display a video.

<title>Waza Player</title>
<script src="video.js" type="text/javascript" charset="utf-8"></script>

  <script type="text/javascript">
    VideoJS.setupAllWhenReady();
  </script>
  <link rel="stylesheet" href="video-js.css" type="text/css" media="screen" title="Video JS">
<body>
  <div class="video-js-box">
    <video id="example_video_1" class="video-js" width="720" height="304" controls="controls" preload="auto">
      <source src="converted/randomvideo.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
    </video>   
  </div>
</body>

when i use the same html and javascript in apache it works just fine.

I have setup the mimetype for mp4 video but that didn't seem to solve the issue.

any help would be appreciated

2011-04-09 06:45:55 -0700: Read error: #><Errno::ECONNABORTED: An established con
nection was aborted by the software in your host machine.>

d:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/lib/mongrel/h
ttp_response.rb:140:in `write'

d:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/lib/mongrel/h
ttp_response.rb:140:in `write'

d:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/handler/mongrel.rb:81:in
`block in process'

d:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/file.rb:87:in `block in
each'

d:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/file.rb:85:in `open'

d:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/file.rb:85:in `each'

d:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/handler/mongrel.rb:80:in
`process'

d:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/lib/mongrel.r
b:165:in `block in process_client'

d:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/lib/mongrel.r
b:164:in `each'

d:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/lib/mongrel.r
b:164:in `process_client'

d:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/lib/mongrel.r
b:291:in `block (2 levels) in run'

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

决绝 2024-11-07 21:23:05

你是这个意思吗?

<video id="example_video_1" class="video-js" width="720" height="304" controls="controlspreload="auto">
  <source src="randomvideo.mp4" type="video/mp4" />
</video>

Do you mean this?

<video id="example_video_1" class="video-js" width="720" height="304" controls="controlspreload="auto">
  <source src="randomvideo.mp4" type="video/mp4" />
</video>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文