在 safari / iOS 上寻找 HTML 5 视频

发布于 2024-12-15 14:55:12 字数 401 浏览 1 评论 0原文

我有一个视频元素,一个 mp4,我正在将其加载到 iOS 的 标签中。它看起来像这样:

<video width="640" height="360" controls="true" autoplay="false" tabindex="0" id="player"
src="http://wpc.xxxx.edgecastcdn.net/blahblah/movie.mp4">
</video>

这加载并播放得很好。问题是我无法在该视频中向前查找; Safari 和 iOS 似乎都无法做到这一点。 Chrome 会很好地寻找,jwplayer 也是如此(具有正确的 Edgecast 配置)。

我在这里做错了什么?

I have a video element, an mp4, that I am loading in a <video> tag for iOS. It looks like this:

<video width="640" height="360" controls="true" autoplay="false" tabindex="0" id="player"
src="http://wpc.xxxx.edgecastcdn.net/blahblah/movie.mp4">
</video>

This loads up and plays just fine. The problem is that I can't seek forward in this video; neither Safari nor iOS seem to be able to do this. Chrome will seek just fine, as does jwplayer (with correct configuration for edgecast).

What am I doing wrong, here?

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

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

发布评论

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

评论(1

柏拉图鍀咏恒 2024-12-22 14:55:12
  http://www.inwebson.com/html5/custom-html5-video-controls-with-jquery/

快进、慢动作和快退控制

是的,HTML5 视频支持更改播放速度。我们可以通过更改视频播放速率属性来更改视频播放速度。

<div class="control">
<a href="#" class="ff">Fast Forward</a>
<a href="#" class="rw">Rewind</a>
<a href="#" class="sl">Slow Motion</a>
</div>

不幸的是,Firefox 还不支持播放速率属性。但部分适用于 Chrome(不支持负值,即倒带)。到目前为止,只有 Safari 完全支持。

//Fast forward control
 $('.ff').on('click', function() {
 video[0].playbackrate = 3;
 return false;
 });

 //Rewind control
 $('.rw').on('click', function() {
 video[0].playbackrate = -3;
 return false;
 });

 //Slow motion control
  $('.sl').on('click', function() {
  video[0].playbackrate = 0.5;
  return false;
  });


     http://www.digitaria.com/blogs/html5-video-skinning-tutorial-part-3-rewindfast-forward
       http://blogfreakz.com/html5/html5-video-players/
  http://www.inwebson.com/html5/custom-html5-video-controls-with-jquery/

Fast Forward, Slow Motion, and Rewind Controls

Yes, HTML5 video supports change of playback speed. We can change the video playback speed by changing the video playbackrate attribute.

<div class="control">
<a href="#" class="ff">Fast Forward</a>
<a href="#" class="rw">Rewind</a>
<a href="#" class="sl">Slow Motion</a>
</div>

Unfortunately, Firefox doesn’t support for playbackrate attribute yet. But partly for Chrome (doesn’t support negative value, which is rewind). So far only Safari fully supported.

//Fast forward control
 $('.ff').on('click', function() {
 video[0].playbackrate = 3;
 return false;
 });

 //Rewind control
 $('.rw').on('click', function() {
 video[0].playbackrate = -3;
 return false;
 });

 //Slow motion control
  $('.sl').on('click', function() {
  video[0].playbackrate = 0.5;
  return false;
  });


     http://www.digitaria.com/blogs/html5-video-skinning-tutorial-part-3-rewindfast-forward
       http://blogfreakz.com/html5/html5-video-players/
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文