Jitsi External API configuration - jitsi

I'm new with Jitsi and I'm trying to configure the Jitsi External API on my Django project. I have created the video call as below.
const domain = 'meet.jit.si';
const options = {
roomName: 'BeehobMeetExample',
width: 1100,
height: 700,
parentNode: document.querySelector('#meet'),
userInfo: {
email: '{{request.user.email}}',
displayName: '{{request.user.first_name}} ' + '{{request.user.last_name}}',
avatarUrl: '{{ request.user.socialaccount_set.all.0.get_avatar_url }}'
},
configOverwrite: {
prejoinPageEnabled: false
},
interfaceConfigOverwrite: { TILE_VIEW_MAX_COLUMNS: 2 },
};
const api = new JitsiMeetExternalAPI(domain, options);
Now, I'm trying to set one person selected by the moderator to be a guest like a camera and audio on, and other room attendees only listeners. Also I'm trying to show the role in the userInfo. Could you please help me with these?

You can handle the buttons of the toolbar with the conditionals you need but in general, using the Jitsi iframe has its limitation because the UI and core functionalities are from Jitsi itself

Related

how to get data from local google Auth?

I am facing a problem in findding a login data of user and user is logedin to my site using google auth platform and i want to get that login data and store data in my local storage and I am working on Angular 14
Kindly help if any one know the soluiton of this problem
Thanks
I had searched a lot but not find a convieniet solution
It's work for me in this way.
According to the new documentation of Google (https://developers.google.com/identity/gsi/web/guides/overview), you should follow next steps:
Create a google app in google cloud console platform and generate a client id.
Load the client library. Add this script "<script src="https://accounts.google.com/gsi/client" async defer>" between the <head></head> tags of your index.html file of Angular project.
Add this code on ngOnInit() function in the component that you would like to have "Sign in with Google button."
ngOnInit() {
// #ts-ignore
google.accounts.id.initialize({
client_id: "YOUR GOOGLE CLIENT ID",
callback: this.handleCredentialResponse.bind(this),
auto_select: false,
cancel_on_tap_outside: true,
});
// #ts-ignore
google.accounts.id.renderButton(
// #ts-ignore
document.getElementById("google-button"),
{ theme: "outline", size: "large", width: "100%" }
);
// #ts-ignore
google.accounts.id.prompt((notification: PromptMomentNotification) => {});
}
async handleCredentialResponse(response: any) {
// Here will be your response from Google.
console.log(response);
}
Add div or button element to the html file of this component, with the same id that you mentioned into the initialization. ( "google-button" ):
<div class="" id="google-button"></div>.
Let me know if you have any issues.

Does app check check work with firebase phone auth?

I'm new to web development in general. started learning Javascript last year.
I created a website for testing. Before implementing app check, phone auth worked fine.
I'm using reCaptcha enterprise for app check.
I get this error: Uncaught (in promise) TypeError: recaptchaVerifier.render is not a function
implementing app check:
const { initializeAppCheck, ReCaptchaEnterpriseProvider } = require("firebase/app-check");
const appCheck = initializeAppCheck(firebaseApp, {
provider: new ReCaptchaEnterpriseProvider('**********************************'),
isTokenAutoRefreshEnabled: true // Set to true to allow auto-refresh.
});
My javascript code for implementing phone auth:
$('#phone-method').click(function() {
window.recaptchaVerifier = new RecaptchaVerifier('recaptcha-container', {}, auth);
// Sign in with phone flow
})
Apparently, there was a problem with enterprise but they have since fixed it:
https://github.com/firebase/firebase-js-sdk/issues/6133
Same problem to me, but this thread in Github help me:
https://github.com/firebase/firebase-js-sdk/issues/6133
Here you have a nice sample inside.
It seems that appCheck only works great with ReCaptchaV3Provider. You will just have to change:
initializeAppCheck(app, {
provider: new ReCaptchaEnterpriseProvider(*****),
isTokenAutoRefreshEnabled: true
})
to:
initializeAppCheck(app, {
provider: new ReCaptchaV3Provider(*****),
isTokenAutoRefreshEnabled: true
})
And I recommend to change the way to initialize captcha, set to invisible like this:
window.recaptchaVerifier = new RecaptchaVerifier('recaptcha-container',
{ 'size': 'invisible' },
auth);

Implementation React native google pay

I am implementing it .
react-native-google-pay
It is installed and showing a login popup as expected but i am not able to get how can i test it. As there is no way to test it.
this is my code
const requestData = {
cardPaymentMethod: {
tokenizationSpecification: {
type: 'PAYMENT_GATEWAY',
gateway: 'stripe',
gatewayMerchantId: '',
stripe: {
publishableKey: '',
version: '2018-11-08',
}
},
allowedCardNetworks,
allowedCardAuthMethods,
},
transaction: {
totalPrice: amount_to_add,
totalPriceStatus: 'FINAL',
currencyCode: 'USD',
},
merchantName: 'Merchant',
};
In this what is the value of gatewayMerchantId,type.
And Let me know if someone have dummy cards or a way to test it. As it is showing error, as well as no trasaction response of 200 or rejection.
I haven't done a Google Pay integration with Stripe, but react-native-google-pay looks like a thin wrapper around the Google Pay API. I'd suggest looking at Google Pay's documentation to supplement the holes in the library's documentation.
In this case, I'd suggest changing the values in the tokenizationSpecification to match Google Pay's docs:
const requestData = {
cardPaymentMethod: {
tokenizationSpecification: {
type: 'PAYMENT_GATEWAY',
parameters: {
gateway: "stripe"
"stripe:version": "2018-10-31"
"stripe:publishableKey": "YOUR_PUBLIC_STRIPE_KEY"
}
},
allowedCardNetworks,
allowedCardAuthMethods,
},
transaction: {
totalPrice: amount_to_add,
totalPriceStatus: 'FINAL',
currencyCode: 'USD',
},
merchantName: 'Merchant',
};
When I integrated to Google Pay, I used my real credit card number (I was unable to get anything fake into Google Pay) and enabled test mode. The library seems to support that test mode like this:
// Set the environment before the payment request
GooglePay.setEnvironment(GooglePay.ENVIRONMENT_TEST);

CRYPTOGRAM_3DS – Why doesn't it work as the only option?

I'm trying to add Google Pay support to a website where we already have it working for a native app. The in-app implementation does not allow PAN_ONLY cards (due to high chargebacks), only CRYPTOGRAM_3DS. This works just fine.
When I configure the website to only allow CRYPTOGRAM_3DS, I can never get paymentsClient.isReadyToPay() to return true. I've tried different Android devices which are able to make in-app payments with no success. To be clear: If I allow PAN_ONLY then Google Pay works as expected and I can obtain tokens.
How can I troubleshoot the reason why this is happening? Does it work for anyone else if you remove PAN_ONLY from the setup config?
thanks!
CRYPTOGRAM_3DS refers to tokenized cards. That is, cards that have been added and stored on you Android device. These are the same cards that you can use to pay in-store (not in-app) with Tap and Pay.
If you are using CRYPTOGRAM_3DS only, this means that it will currently only work on a Android device where a user has saved a tokenized card.
I've put the following example together to demonstrate (make sure you test on a Android device with appropriate cards): https://jsfiddle.net/w5ptorbd/
<script src="https://unpkg.com/#google-pay/button-element#2.x/dist/index.umd.js"></script>
<google-pay-button environment="TEST"></google-pay-button>
const button = document.querySelector('google-pay-button');
button.paymentRequest = {
apiVersion: 2,
apiVersionMinor: 0,
allowedPaymentMethods: [
{
type: 'CARD',
parameters: {
allowedAuthMethods: ['CRYPTOGRAM_3DS'],
allowedCardNetworks: ['MASTERCARD', 'VISA'],
},
tokenizationSpecification: {
type: 'PAYMENT_GATEWAY',
parameters: {
gateway: 'example',
gatewayMerchantId: 'exampleGatewayMerchantId',
},
},
},
],
merchantInfo: {
merchantId: '12345678901234567890',
merchantName: 'Demo Merchant',
},
transactionInfo: {
totalPriceStatus: 'FINAL',
totalPriceLabel: 'Total',
totalPrice: '100.00',
currencyCode: 'USD',
countryCode: 'US',
},
};
button.addEventListener('loadpaymentdata', event => {
console.log('load payment data', event.detail);
});
button.addEventListener('readytopaychange', event => {
console.log('ready to pay change', event.detail);
});

Quickblox - create 1 to 1 chat web application

I want to create a very basic one to one web chat application using Javascript SDK.
I followed the following link: http://quickblox.com/developers/Web_XMPP_Chat_Sample and also saw post
quickblox for web - create 1 to 1 chat
But i cannot make an application where two added users are able to chat. What i have done so far:
1. Downloaded javascript SDK.
2. Created my own Chat App as instructed and added two users to that application in dashboard.
3. Copied QBApp, QBUser1, QBUser2 credentials to the config.js inside the Samples> Chat> JS folder.
The config.js now looks like:
var QBApp = {
appId: 28143,
authKey: 'KVCCFAQXGsNRq22',
authSecret: 'VNkQ5frbgexXeqH'
};
var config = {
chatProtocol: {
active: 2,
},
debug: false
};
var QBUser1 = {
id: 5352004,
name: 'user1',
login: 'chatUser1',
pass: 'password'
},
QBUser2 = {
id: 5352010,
name: 'user1',
login: 'chatUser2',
pass: 'password'
};
I cannot establish communication with this. I think i have done something wrong in config.js entries?
Any help would be highly appreciated.