简体   繁体   English

html5视频无法在Apple机器上的Firefox中播放

[英]html5 video not playing in firefox on Apple machinees

I've added a HTML5 video to a site I'm working on & everything is working fine execept it doesn't play on firefox on Apple machines only, it works well on all other browsers even with firefox on Windows & linux. 我已将HTML5视频添加到我正在工作的网站上,并且一切正常,只是它不能仅在Apple机器上的Firefox上播放,即使在Windows和linux上的Firefox上也可以正常使用。

One thing which I've done is remove the controls from the video and added an image of a play button for the user to click for to play the video & an image of a close button to close/stop the video. 我要做的一件事是从视频中删除控件,并添加了一个播放按钮的图像供用户单击以播放视频,并添加了一个关闭按钮的图像以关闭/停止视频。

Any idea what may be causing this, I think it may be a browser specific issue which doesn't allow videos to play without controls, but this is an effect we really want. 不知道可能是什么原因造成的,我认为这可能是浏览器特定的问题,不允许视频在没有控件的情况下播放,但这是我们真正想要的效果。

HTML 5 HTML 5

<div id="video-wrapper" style="z-index: 210; background-color: rgb(0, 0, 0);">
    <div align="center">
        <video id="hp-video-player" preload="auto" poster="/wp-content/uploads/Homepage_arival_preview.jpg" style="display: inline-block;">
        <source type="video/mp4" src="/wp-content/uploads/Homepage_Movie.mp4"><source type="video/webm" src="/wp-content/uploads/Homepage_Movie.webm"><object width="1900" height="1060" type="application/x-shockwave-flash" data="http://development.com/wp-content/themes/jupiter/js/flashmediaelement.swf"></object><param name="movie" value="http://development.com/wp-content/themes/jupiter/js/flashmediaelement.swf"><param name="flashvars" value="controls=true&amp;file=/wp-content/uploads/Homepage_Movie.mp4"><img src="/wp-content/uploads/Homepage_arival_preview.jpg" title="No video playback capabilities"></video>
        <img id="video-close-btn" src="http://development.com/wp-content/themes/jupiter-child/images/x-close-menu.png" style="display: inline;">
        <div align="center"><img id="hp-play-btn" src="http://development.com/wp-content/themes/jupiter-child/images/play_button.png" style="display: none;"></div>
    </div>
</div>

JS JS

var video = jQuery("#hp-video-player").get(0);

jQuery("#hp-play-btn").click(function() {  // Play button Click Actions
    video.play();
    jQuery("#hp-video-player, #video-close-btn").fadeIn(300);
    jQuery(this).fadeOut(500);
    jQuery("#video-wrapper").css({'background-color' : '#000000', 'z-index' : '210'});
}

jQuery("#video-close-btn").click(function(){ // Close button Click Actions
  video.pause();
  jQuery("#hp-video-player, #video-close-btn").fadeOut(500);
  jQuery("#hp-play-btn").fadeIn(300);
  jQuery("#video-wrapper").css({'background-color' : 'transparent', 'z-index' : '65'});
});

H264/MP4 is not supported on Firefox Desktop on OSX yet. OSX上的Firefox桌面尚不支持H264 / MP4。

Sett eh Supported Formats article and/or the bug aiming to implement it. Sett eh Supported Formats文章和/或旨在实现它的错误

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM