MediaError Access to screen denied while trying to implement Screenshare - sdk

I am using the Web SDK for Agora.io and trying to implement video chat feature and have screen sharing enabled. I am having this error generated:
MediaError "Access to screen denied."
Could anyone please help me out?

Which platform are you using to test the screen sharing?
Agora's screen sharing does not work in Safari, and needs a plugin to run in Chrome. Only FireFox supports screen-sharing out of the box.
The plugin process is available within the Agora documentation: https://docs.agora.io/en/Video/screensharing_web?platform=Web

Related

Jumio netvrify error when using webview in iOS. Browser does not support camera

I have website that redirect user to do eKYC through Jumio. It was working fine on Desktop browser, Mobile Browser, Android App(webview).
However, when come to iOS app(wkwebview), my user keeps getting error as in cant complete the eKYC process. Once the user click on start eKYC process, it straight away return failed result. The error code from Jumio is "9822 (Browser does not support camera.)".
I have already enable camera usage in plist and enable camera permission in iOS for the APP. Not sure where went wrong.
As far as i know webrtc is not available in webwiew (UIWebView or WKWebwiew). So you can't have camera access directly from the webview. You will need to open safari or bridge the webrtc call to a native implementation.

Access to screen denied error in screen share

I'm trying to have a video chat and screen sharing option using web SDK for Agora.io, but every time I try I get this error.
Media Error "Access to screen denied."
Seems like your web browser do not have the right to access. Try their test page first.

Codename one. Log in with Facebook using Webview component

My cn1 app incorporates loggin in with Facebook and Google+. When the doLogn() is called on Iphone, A Safari page is opened which allows the user to enter their credentials for Facebook or Google respectively. The problem I am facing is that my app has just been rejected by apple because the user is taken out of the app and into safari in order to log in with Facebook or Google and this, according to apple, provides "poor user experience". Apple recommended that I use the Safari View Controller API which allows the display of a URL and inspection of the certificate from an embedded browser in an app so that customers can verify the webpage URL and SSL certificate to confirm they are entering their sign in credentials into a legitimate page.
I notice that Codename one has a WebView component. However I'm not sure if it's possible to open the url in Webview instead of Safari when I call the doLogin(). If it is. How do I achieve this and is Web View the right component to use? Or will I need to use the Safari View Controller API, if so, how do I add this api to my cn1 project, is it even possible?
I would recommend that codenameone incorporate this into their Facebook and Google login features to prevent any future users from getting rejected by the app store.
It appears that this happens automatically on Native Iphone apps - Safari web view opening when logging to FB through iOS 9. For IOS should I try to implement a native Facebook log in then? If so. Where do I start?
final Login fb = FacebookConnect.getInstance();
fb.setClientId("XXXXXXXXXXXXXX");
fb.setClientSecret("XXXXXXXXXXXXX");
fb.setRedirectURI("http://www.mibrandapp.com");
FaceBookAccess.setPermissions(new String[]{"id", "name", "first_name", "last_name"});
fb.setScope("id");
fb.setCallback(new LoginCallback() {
#Override
public void loginFailed(String errorMessage) {
Dialog dg = new Dialog();
dg.setTitle("Login failed");
dg.show();
}
#Override
public void loginSuccessful() {
....
}
});
//fb.doLogin();
fb.nativelogin();
Currently the Codename One build server uses Facebook IOS SDK 4.4, which uses the default behaviour of opening the Facebook app to authenticate - if installed - and the Safari app if it is not installed.
If you switch to the "iphone_new" build target (which will soon be standard) it uses the newer Facebook IOS SDK 4.12, which will (by default) handle the authentication inside a web view in your app.
Running some tests on this approach, I found that, on iOS 9, you need to add the following to your ios.plistInject build hint:
<key>LSApplicationQueriesSchemes</key><array><string>fbauth2</string></array>
I have just committed a change that will include this automatically so after the next server update (probably on Friday), it will just work without this build hint.
UPDATE June 14, 2016
I have just updated this in SVN so that it will use IOS SDK 4.12 by default with will resolve this issue without having to make any changes. The server will be updated Friday - after which you should be able to just send your build (with no special build hints) and it will work.
Codename One uses native Facebook login when the Facebook app is installed and activated. You need to use the Facebook Connect API as explained in the developer guide section.

How to display photo library permissions dialog in Cordova?

Hi we are developing an IBM MobileFirst Platform-based Hybrid Application. In our application we are accessing user gallery (to upload photos). for this in iPhone we need to ask the user permission explicitly, to ask user permission in iPhone we need to display dialog box. Here my question is the dialog box which we are going to show to the user is custom dialog box or is there any native feature built-in in MobileFirst, or with the help of any cordova plugin?
You can use requestCameraRollAuthorization() in cordova-diagnostic-plugin to request native iOS permission to access the user photos:
cordova.plugins.diagnostic.requestCameraRollAuthorization(function(granted){
console.log("Authorization request for camera roll was " + (granted ? "granted" : "denied"));
}, function(error){
console.error(error);
});
MobileFirst does not handle any permissions for you - it is not that kind of a framework. This really relates to the Cordova layer in your app, which access the photo library.
You need to display a dialog box asking the user whether or not does s/he allow for the access to access the photo library. You can use WL.SimpleDialog for this purpose, for example.
Read more here:
http://docs.phonegap.com/en/3.3.0/guide_appdev_privacy_index.md.html#Privacy%20Guide
Cordova Camera Plugin in IOS 9
perhaps to check if there is access given, create also a Cordova plug-in that will check for it using native code: Determine if the access to photo library is set or not - PHPhotoLibrary (iOS 8)

Navigating from HTML pages to native black berry page/screen [duplicate]

This question already has an answer here:
IBM Worklight - Using the camera in BlackBerry
(1 answer)
Closed 8 years ago.
Platform: Black berry 6 and 7
Framework: IBM Worklight
Description:
I am developing an image-scanning application for BlackBerry. The application takes the user to a success page if the correct image is scanned and a failure page is shown on scanning an incorrect image.
Scenario:
I have developed HTML pages for this app, now I need to put transition from HTML page to camera page of Black berry i.e. I have a button on my HTML page labelled as 'Scan Image', on clicking/taping this button camera should open and start scanning images, So my question is :
How that transition can be done, I mean what is the javascript syntax to navigate from HTML page to native camera page?
This is the exact same question as you have asked TODAY, here: IBM Worklight - Using the camera in BlackBerry
Why do you ask again?
There is no "transition" involved. You use the JavaScript API provided by either Apache Cordova or BlackBerry themselves to access the camera, take a picture and handle the success or failure.
Please stop for a moment to write your app. Create a demo app and implement ONLY the camera support; if it works, start implementing it the way you want to, in your app.
Use the Camera API provided by BlackBerry
Use the Camera API provided by Apache Cordova
Please take the time to read the pages and the examples.
There are clear instructions on how to add permission for using the Camera and clear code examples on how to implement it.
http://docs.phonegap.com/en/2.6.0/cordova_camera_camera.md.html#Camera

Resources