Answer the question
In order to leave comments, you need to log in
Chrome packaged app, webview. Why is the video from the webcam not displayed from the flash application?
I am writing a "Chrome packaged app" application with content embedded via webview. Content - a page with a flash application that is loaded from the site. It seems nothing unusual, but got into a stupor on one issue.
The flash drive accesses the webcam and outputs the image to the Video object:
private var video:Video;
private var cam:Camera;
...
video = new Video(320, 240);
stage.addChild(video);
cam = Camera.getCamera();
video.attachCamera(cam);
webview.addEventListener('permissionrequest', function(e) {
if (e.permission === 'media') {
e.request.allow();
}
});
"permissions": [
"storage",
"contentSettings",
"webview", "pointerLock", "geolocation", "videoCapture", "audioCapture"
]
Answer the question
In order to leave comments, you need to log in
I asked myself, and I will answer. It turned out the following.
A tuner and a webcam are installed on the tested computer. Both work fine in flash and are normally selected by names / indexes both through AS3 code and through the standard player settings window. I found out that in the Chrome browser in Content_Settings-> Multimedia, the tuner is selected by default, and for some reason Chrome does not work with it, and this affects the work of its desktop applications. Replaced with a webcam, and the application worked.
There is a second jamb, apparently in chrome. In the AS3 code or through the player settings window, access to a specific device " cam = Camera.getCamera("0");
" is requested, but chrome only gives access to the one specified in the default settings.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question