“允许”在 Mac Chrome 中无法单击 Flash 内容的按钮

发布于 2024-10-13 05:09:42 字数 2667 浏览 6 评论 0原文

我正在使用 Mac Chrome 8.0.552.237

似乎每当我在 html 中嵌入 flash 内容并在 chrome 中打开它时,当我的 flash 内容请求相机访问权限并且我需要单击对话框中的“允许”按钮时,它永远不会识别该单击。它在火狐浏览器中运行良好。我只是不明白为什么它在 Chrome 中不起作用。我使用 swfobject,并且使用 http://www.bobbyvandersluis.com/swfobject/generator/ index.html 制作 html 代码只是为了确保我没有犯任何错误。

有什么想法我可以做什么导致它不允许我点击允许吗?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <script type="text/javascript" src="swfobject.js"></script>
        <script type="text/javascript">
            swfobject.registerObject("MyFlashContent", "10.1.0", "expressInstall.swf");
        </script>
    </head>
    <body>
        <div>
            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="480" height="800" id="MyFlashContent" align="middle">
                <param name="movie" value="MyFlashContent.swf" />
                <param name="play" value="true" />
                <param name="loop" value="true" />
                <param name="quality" value="high" />
                <param name="scale" value="noscale" />
                <!--[if !IE]>-->
                <object type="application/x-shockwave-flash" data="MyFlashContent.swf" width="480" height="800" align="middle">
                    <param name="play" value="true" />
                    <param name="loop" value="true" />
                    <param name="quality" value="high" />
                    <param name="scale" value="noscale" />
                <!--<![endif]-->
                    <a href="http://www.adobe.com/go/getflashplayer">
                        <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
                    </a>
                <!--[if !IE]>-->
                </object>
                <!--<![endif]-->
            </object>
        </div>
    </body>
</html>

编辑: 由于问题似乎实际上可能出在我的 actionscrip 代码上,因此我将发布我如何连接相机。

var youCam:Camera = Camera.getCamera();
you_cam.attachCamera(youCam);

正如你所看到的,我已经尽可能简单地附加了它,实际上我将它放在代码的顶部以将相机放置在舞台上。当我测试它时,它工作得很好,并且在 Firefox 中也工作得很好。

I'm using Mac Chrome 8.0.552.237

It seems like whenever I embed flash content in html and open it in chrome when my flash content requests camera access and i need to click "allow" button in the dialog it never recognizes the click. It works fine in firefox. I just simply can't understand why it wont work in chrome. I use swfobject, and i used http://www.bobbyvandersluis.com/swfobject/generator/index.html to make the html code just to make sure i wasn't making any mistakes.

any ideas what I could be doing that causes it to not let me click allow?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <script type="text/javascript" src="swfobject.js"></script>
        <script type="text/javascript">
            swfobject.registerObject("MyFlashContent", "10.1.0", "expressInstall.swf");
        </script>
    </head>
    <body>
        <div>
            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="480" height="800" id="MyFlashContent" align="middle">
                <param name="movie" value="MyFlashContent.swf" />
                <param name="play" value="true" />
                <param name="loop" value="true" />
                <param name="quality" value="high" />
                <param name="scale" value="noscale" />
                <!--[if !IE]>-->
                <object type="application/x-shockwave-flash" data="MyFlashContent.swf" width="480" height="800" align="middle">
                    <param name="play" value="true" />
                    <param name="loop" value="true" />
                    <param name="quality" value="high" />
                    <param name="scale" value="noscale" />
                <!--<![endif]-->
                    <a href="http://www.adobe.com/go/getflashplayer">
                        <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
                    </a>
                <!--[if !IE]>-->
                </object>
                <!--<![endif]-->
            </object>
        </div>
    </body>
</html>

EDIT:
Since it seems like the issue might actually be with my actionscrip code, i'll post how i attached the camera.

var youCam:Camera = Camera.getCamera();
you_cam.attachCamera(youCam);

as you can see I have it attached about as simple as it can get, I actually have this right at the top of my code to place the camera on the stage. This works fine when i test it, and it works fine in firefox.

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

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

发布评论

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

评论(3

等风也等你 2024-10-20 05:09:42

我不知道为什么,但由于 swf 画布尺寸很大,我在 Chrome 中了解到,我必须单击浏览器的调整大小角,使窗口变小,然后将其恢复到常规尺寸,然后它才能工作。不知道为什么,但这只发生在 chrome 中。我通过缩小 swf 的整体大小解决了这个问题。

I have no idea why, but because of the large size of the swf canvas, i learned in chrome i had to click the resize corner of the browser and make the window small and then bring it back to the regular size then it would work. no idea why, but this was only hapening in chrome. i fixed the issue by making the overall size of my swf smaller.

谷夏 2024-10-20 05:09:42

尝试将 css 显示属性设置为“inline-block”

我遇到了类似的问题。我使用的是 swf 网络摄像头插件,并且仅在 Chrome 21 上,它不允许用户单击“允许”。我最终通过将其 css“显示”从“块”更改为“内联块”来修复它。

希望有帮助。

Try setting the css display property to 'inline-block'

I had a similar problem. I was using a swf webcam plugin and, on Chrome 21 only, it was not allowing users to click allow. I ended up fixing it by changing it's css 'display' from 'block' to 'inline-block'.

Hope it helps.

嘦怹 2024-10-20 05:09:42

我以前遇到过这样的问题,但它不是浏览器也不是嵌入,而是启用网络摄像头的示例代码(我认为该代码甚至来自 Adob​​e live docs ffs)。问题在于,在按下允许按钮之前,摄像头轮询已经开始。轮询(一些增强现实实验)非常繁重,以至于允许按钮仅每隔十分之一左右记录一次点击。通过将相机轮询直到状态事件返回后camera.muted == false,我解决了我的问题。

也许值得一试。干杯,EP

编辑:处理程序的代码示例

var youCam:Camera = Camera.getCamera();
youCam.addEventListener(StatusEvent.STATUS, handleCameraStatus);

...

private function handleCameraStatus(e:StatusEvent):void {
    if (e.code == "Camera.Unmuted") {
        you_cam.attachCamera(youCam);
    } else if (e.code == "Camera.Muted") {
        // display message so the user might try again.
    }
}

I've had an issue like this before, but it wasn't the browser nor the embedding, it was the example code for enabling the webcam (I think this code even came from the Adobe live docs ffs). The issue was that the camera polling already started, before the allow button was pushed. The polling (some augmented reality experiment) was so heavy, that the allow button only registered the click every 1 in 10 times or so. By putting of the camera polling till after the status-event returned with camera.muted == false, I solved my problem.

Maybe it's worth a try. Cheers, EP

Edit: Code example for the handler

var youCam:Camera = Camera.getCamera();
youCam.addEventListener(StatusEvent.STATUS, handleCameraStatus);

...

private function handleCameraStatus(e:StatusEvent):void {
    if (e.code == "Camera.Unmuted") {
        you_cam.attachCamera(youCam);
    } else if (e.code == "Camera.Muted") {
        // display message so the user might try again.
    }
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文