开发者

Flash webcam settings on macbook (and potentially other cameras)

I'm working on a flash app that allows users to take snapshots of themselves using their webcam. It seems that on certain computers (mostly macbooks and MBPs so far) the flash player 10 default webcam setting is for "DV vid开发者_如何学Goeo" rather than "USB Video Class Video", which is the required setting (as far as I know) to allow flash to tap into the webcam stream. If a user's flash settings aren't configured appropriately, they simply get a black box where their video preview should be, rather than the live video stream.

Are there any workarounds for this? I would rather avoid resorting to a "having trouble?" popup with instructions for changing Flash webcam settings if at all possible.


Flash CS5 throws an error using System.capabilities.os but:

import flash.system.Capabilities;

then:

Capabilities.os

Works great.


It seems you can add a parameter to the getCamera static method of the Camera class in order to use a specific cam.

If the iSight is your third camera in the list of the Flash Player configuration panel, you can try this :

if (System.capabilities.os.indexOf("Mac")>-1)
    camera = Camera.getCamera("2");

You can also read this article, which may interest you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜