getUserMedia for Firefox OS - html

It was said that getUserMedia would land on Firefox OS 1.2. I have read the documentation and tried to look for it in the Google Groups, but I have not found anything related to it.
I have developed a web app that works on Firefox Nightly (so, it works in Gecko):
But when I try to use it in Firefox OS 1.4, I get a "Permission denied" error:
I have tried to add the following permission to the manifest:
"permissions":{
"camera":{}
}
But didn't solve the problem. Is there any other permission that I would need to add?

getUserMedia support for the microphone landed in FxOS v1.2. getUserMedia support for the camera just landed on trunk (v1.4) about a week ago. The final piece to land was support for permission prompts : bug 853356 in bugzilla.mozilla.org (https://bugzilla.mozilla.org/show_bug.cgi?id=853356). Prior to a week ago, you would have gotten a permission error.
Currently the camera always returns frames in landscape mode. Bug 970183 (https://bugzilla.mozilla.org/show_bug.cgi?id=970183) tracks that problem, and we're actively working to land a fix for this ASAP.

you need add video-capture permissions in manifest.webapp in 1.4 for getUserMedia video,
and audio-capture permissions in manifest.webapp in 1.2 for getUserMedia audio, ex:
"permissions": {
"audio-capture": {},
"video-capture": {}
}

Related

Android Vimeo-networking-java no longer working

It appears that vimeo-networking-java is no longer working and no one has answered a ticket in the issues section of their Github project since Aug 2021. There does seem to be people updating it though as the last update to the project was a few days ago.
Anyway... I wanted to see if anyone else was having this issue. It appears that the download link that you plug into ExoPlayer no longer is valid. My app, which I haven't updated in about a month, all of a sudden stopped playing videos and ExoPlayer now gives this error:
E/ExoPlayerImplInternal: Playback error
com.google.android.exoplayer2.ExoPlaybackException: Source error
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:579)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:246)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 410
at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:383)
at com.google.android.exoplayer2.upstream.DefaultDataSource.open(DefaultDataSource.java:201)
at com.google.android.exoplayer2.upstream.StatsDataSource.open(StatsDataSource.java:84)
at com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1015)
at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:415)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
I tried copy and pasting the download link into my browser and the webpage it brings you to says "Sorry we're having a little trouble"
When I do the same thing for iOS it plays the video.
This URL scheme which android uses, appears to be down:
https://player.vimeo.com/progressive_redirect/download/ .....
Its interesting though because iOS Vimeo networking pod works fine. iOS seems to use a different URL scheme:
https://player.vimeo.com/progressive_redirect/playback/....
All of the other data for the video loads, it is just the download link appears to be corrupt. I think this started around 12:00am EST March 20th.
This was the previous working code I've been using to get the URI for ExoPlayer.
...
public void success(com.vimeo.networking.model.Video video) {
String videoFile = video.getDownload().get(0).getLink();
...
}
This is the 2nd time in the past few months a server error seems to have caused an issue with my app. I'm thinking of ditching Vimeo if anyone has any other alternatives as well.

Getting Serial port info on Chrome Web Serial API

I'm using the Chrome Web Serial API. So far it's working fine, but now and I'm trying to get the (already opened) port metadata (port name, device ID, etc.) and I'm a bit lost.
Here are the steps to follow:
https://wicg.github.io/serial/#getting-serial-port-metadata
but so far I cannot get the information.
If I try by navigating the port class, the DevTools console trows "ƒ () { [native code] }".
I cannot find a suitable example of how to implement this.
Does anyone have a hint?
Thanks in advance!!
Daniel.
It seems like it hasn't been implemented in Chromium yet. Keep in mind that the specs are sort of guides for vendors to follow when implementing a feature, but the actual shipped implementation can differ.
If you check the Web Serial API's code in the Chromium repo for Chrome 80 (current version at the time of writing) and 84.0.4112.1 you'll see that they only include the following methods:
open
readable
writable
getSignals
setSignals
close
You can read the latest comments on this API here: https://bugs.chromium.org/p/chromium/issues/detail?id=884928

Incomplete Implementation of CTAP2 (FIDO2) protocol in Chrome?

I've been investigating the implementation of CTAP2 protocol with Google Chrome (protocol between Fido Authenticator and Fido Client (e.g. Chrome)), which should be supported in Chrome since version 69.
So I dumped the chrome request to the authenticator in two cases:
1. U2F (CTAP1) with yubico demo website.
Here everything goes as expected and chrome follows the CTAP1 protocol.
2. FIDO2/Webauthn (CTAP2) with webauthn.org
And the browser has a strange behaviour:
It starts by following the CTAP2 protocol by sending a AuthenticatorGetInfoRequest
The Authenticator replies with AuthenticatorGetInfoResponse
But then Chrome switches to the CTAP1 protocol by sending a Registration Request Message (U2F_REGISTER)
Is it a problem with Chrome implementation: CTAP2 is not enabled entirely yet (it seems to be implemented in Chromium sources)?
Or is the problem coming from the authenticator: sending a response that makes Chrome switch to CTAP1?
Or something else entirely?
In AuthenticatorGetInfoRequest, the authenticator must respond with a string list of the supported versions among "U2F_V2" and "FIDO_2_0". Note also in case of NFC or CCID, a "FIDO_2_0" (CTAP2) only authenticator shall anwser directly "FIDO_2_0" on the SELECT command. I don't know about HID and BLE.
So maybe your authenticator is listing "U2F_V2" in the protocol versions list in AuthenticatorGetInfoRequest.
I also imagine the Chrome code base about this was moving fast and can be partial or not strict. To my tests in early 2020, the Chrome CTAP capabilities seem now stable and compliant.

use webcam on a http website in google chrome

I am using webcam.js for getting a photo clicked of a customer for profile creation on my cloud based retail store software.
It used to work fine in earlier versions of chrome and is still working fine on firefox. But now latest version of chrome and even other browsers like Opera have started throwing errors on invoking webcam - only https versions are allowed to use webcam.
Its a personal use software and i don't want to spend extra on a SSL certificate. Is there some option where in we can add exception for a http site to use webcam
Current Code:
function loadCamera(){
Webcam.attach( '#my_camera' );
Webcam.set({
width: 200,
height: 200,
dest_width: 200,
dest_height: 200,
force_flash : true
});
}
You could check out letsencrypt or certbot (basically the same). They issue SSL certificates for free and the setup is very straightforward and easy.
Link:
https://letsencrypt.org/

HTML5 Video does not work on mobile browsers when authenticated

I'm using a standard video tag like so <video src="test.mp4" controls>​​</video>. I'm in a SharePoint 2013 environment with NTLM authentication with basic authentication as fall back. The video tag works without issue on all desktop browsers that support HTML5 video.
On mobile browsers, the video tag fails once I authenticate to the site. The video is just static public content that is being served by IIS 8 and is not a part of SharePoint. The only exception so far is Firefox on android, which works without issue. I've removed NTLM auth and switched to basic auth only with the same results.
I've tested so far:
iPad iOS 8 - Safari, Chrome
Android K & L - Chrome, Firefox
Windows Phone 8.1 - IE
The video works as long as I am not authenticated to the host where the video is located. So, if I am at host1 with markup pointing at a video on host2, the video will work until I authenticate to host2.
The video will also work fine if I'm going through a forms based authentication. In my case, I'm using Microsoft TMG.
I've gotten this far with Android Chrome: It will first send a range request with 0-1 byte as expected with Chrome as the user agent. When unauthenticated, it will ask for the rest of the video with stagefright as the user agent. When authenticated, it doesn't send anything and simply fails to play the video. ADB logcat returns this when that happens:
E/StagefrightMetadataRetriever( 183): Unable to instantiate an extractor for 'snipped-video-url'.
E/MediaResourceGetter(11682): Error configuring data source
E/MediaResourceGetter(11682): java.lang.RuntimeException: setDataSource failed: status = 0x80000000
E/MediaResourceGetter(11682): at android.media.MediaMetadataRetriever._setDataSource(Native Method)
E/MediaResourceGetter(11682): at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:105)
E/MediaResourceGetter(11682): at org.chromium.content.browser.MediaResourceGetter.configure(MediaResourceGetter.java:417)
E/MediaResourceGetter(11682): at org.chromium.content.browser.MediaResourceGetter.configure(MediaResourceGetter.java:259)
E/MediaResourceGetter(11682): at org.chromium.content.browser.MediaResourceGetter.extract(MediaResourceGetter.java:153)
E/MediaResourceGetter(11682): at org.chromium.content.browser.MediaResourceGetter.extractMediaMetadata(MediaResourceGetter.java:125)
E/MediaResourceGetter(11682): Unable to configure metadata extractor
I/MediaFocusControl( 744): AudioFocus requestAudioFocus() from android.media.AudioManager#2ff8d914org.chromium.media.MediaPlayerListener#23b9af5d
D/MediaPlayer(11682): Couldn't open file on client side, trying server side
I/AwesomePlayer( 183): setDataSource_l()
My first thought was it was a Chrome/Safari issue, but IE behaving the same way makes it less likely. Is this by design? Any direction to figuring out what is going on would be appreciated.
Try this
i have a issue which is same as your issue(E/StagefrightMetadataRetriever( 183): Unable to instantiate an extractor for 'snipped-video-url'.).after doing lot of work finally find the way to correct that.
add this line in the manifest of your project
<uses-permission android:name="android.permission.INTERNET" />
Error
After Error