【问题标题】:iframe video is not working on iphone/ipadiframe 视频不适用于 iphone/ipad
【发布时间】:2014-08-13 06:37:56
【问题描述】:

我刚刚创建了一个网站,我们可以在该网站上使用PHP 免费下载和观看电影。现在我面临embedded 视频的问题。我正在使用如下所示的<iframe> 代码嵌入 Flash 视频。

echo '<iframe name="watch_online" id="watch_online" src="http://filehoot.com/embed-09uknzl64bw0-570x380.html" height="380" width="570" style="z-index:2147483647;" webkitAllowFullScreen mozallowfullscreen allowfullscreen frameborder="0" scrolling="no"></iframe>';

它在PC上运行良好,但是当我在iPhone上打开它时,我的flash视频变为jwplayer,它仍然无法播放视频。一条消息如下所示:

"the video could not be loaded either because the server or network failed or because the format is not support"

在这个问题上需要指导。谢谢。

【问题讨论】:

    标签: ios iphone iframe video


    【解决方案1】:

    没有可用于 iOS、开发或其他用途的原生 Flash 播放器,请尝试上传与 HTML5 兼容的视频,例如 .mp4、.m4v 和 .f4v 文件...

    检测 iOS 设备 (javascript):

    var uagent = navigator.userAgent.toLowerCase();
    
    if (uagent.search("iphone") > -1 ||
        uagent.search("ipod") > -1 ||
        uagent.search("ipad") > -1 ||
        uagent.search("appletv") > -1) {
    
        // handle code here for html5 video
    
    } 
    

    【讨论】:

    • 不,我的意思是有任何代码可以执行以下操作:如果检测到 iphone 或 ipad,则加载 html5 视频而不是 flash 视频。
    • 查看检测不支持闪存的IOS设备的更新。您的视频主机 filehoot.com 不支持 html5 模式,最好看看其他自动执行此操作的提供商
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-09-27
    • 2011-03-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多