YouTube的Flash API(AS3)不适用于Firefox,但在Chrome [英] Youtube Flash API (AS3) not working in Firefox but in Chrome

查看:154
本文介绍了YouTube的Flash API(AS3)不适用于Firefox,但在Chrome的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道为什么自从最近我自己编程的flash视频播放器(使用YouTube ActionScript 3.0 Player API)在Firefox(Win,45.0.1)中不再工作,但它在Chrome(Win ,49.0.2623.110米)。



视频播放器的图形元素都加载正常,所以flash-plugin正在运行,但只有Chrome显示实际的youtube-video。



我知道Flash API已被弃用( https://开发者。 google.com/youtube/flash_api_reference ),但为什么它仍然在Chrome中工作呢?任何想法如何让它在firefox中运行?

PS:由于视频播放器及其功能的复杂性,我不能切换到html5版本

更新:

 < object width =640height =360id =videodata =video.swftype =application / x-shockwave-flash> 
< param value =video.swfname =movie>
< param value =xml = xml?i = 48-96-43name =FlashVars>
< param value =highname =quality>
< param value =#181818name =bgcolor>
< param value =truename =play>
< param value =truename =loop>
< param value =windowname =wmode>
< param value =showallname =scale>
< param value =truename =menu>
< param value =falsename =devicefont>
< param value =name =salign>
< param value =sameDomainname =allowScriptAccess>
< a href =http://www.adobe.com/go/getflash>
< img alt =Get Adob​​e Flash playersrc =http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif>
< / a>
< / object>


解决方案

这是一个 chromeless Youtube SWF在Firefox中工作

简短的回答是...确保您的SWF文件是从 https 位置提供的。如果没有(SSL)绿色挂锁,则SWF不会加载任何其他外部数据。对于试图访问更多外部数据的Flash内容来说,这似乎是一个新的(安全)期望。

同时更新AS3代码中的任何 http:// 引用,使其成为 https:



例子如下:



  • Security.allowDomain(https://www.youtube.com);

  • loader.load(new URLRequest(https://www.youtube.com/apiplayer?version=3));

  • player.cueVideoByUrl(https://www.youtube.com/v/YOUR_VID_ID?version=3);


I'm wondering why since very recently my own programmed flash-video-player (using the YouTube ActionScript 3.0 Player API) is not working anymore in Firefox (Win, 45.0.1) but it's working still fine in Chrome (Win, 49.0.2623.110 m).

The graphic elements of the video-player load fine in both, so the flash-plugin is working, but only Chrome shows the actual youtube-video.

I know the flash API is deprecated (https://developers.google.com/youtube/flash_api_reference), but why is it still working in Chrome then? Any ideas of how I can get it to run in firefox again?

PS: Because of the complexity of the video-player and its function I cannot switch to the html5 version of the youtube-player-api.

UPDATE:

<object width="640" height="360" id="video" data="video.swf" type="application/x-shockwave-flash">
            <param value="video.swf" name="movie">
            <param value="xml=xml?i=48-96-43" name="FlashVars">
            <param value="high" name="quality">
            <param value="#181818" name="bgcolor">
            <param value="true" name="play">
            <param value="true" name="loop">
            <param value="window" name="wmode">
            <param value="showall" name="scale">
            <param value="true" name="menu">
            <param value="false" name="devicefont">
            <param value="" name="salign">
            <param value="sameDomain" name="allowScriptAccess">
            <a href="http://www.adobe.com/go/getflash">
                <img alt="Get Adobe Flash player" src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif">
            </a>
        </object>

解决方案

Here is an example of a chromeless Youtube SWF working in Firefox.

The short answer is... Make sure your SWF file is being served from an https location. If there is no (SSL) green padlock, the SWF will not load up any other external data. This seems to be a new (security) expectation by Firefox for Flash content that tries to access further external data.

Also update any http:// references in your AS3 code to become https://.

Examples would be :

  • Security.allowDomain("https://www.youtube.com");
  • loader.load(new URLRequest ("https://www.youtube.com/apiplayer?version=3") );
  • player.cueVideoByUrl("https://www.youtube.com/v/YOUR_VID_ID?version=3");

这篇关于YouTube的Flash API(AS3)不适用于Firefox,但在Chrome的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆