There is a problem with our WebRTC connection in different countries:
We have used WebRTC video/voice communication successfully within the UK, but sometimes in a connection to a different country the voice from one side does not get through. For example, we have had a connection from UK to China, the person in china could see the person in the UK but could not hear him; video and voice were OK from china to the UK. Sometimes we have had successful connections between UK and china but with a specific person it does not get through at all.
In about 30% of our communications, the same thing happens. One side does not hear the other side.
Does it have anything to do with the internet in other countries?
How about ice-servers? I've read something about ice-servers. Should we implement and have our own ice server to have a reliable WebRTC connection?
Currently we are using the following public list for our servers:
var iceServers = {
'iceServers': [
{ url: 'stun:stun01.sipphone.com' },
{ url: 'stun:stun.ekiga.net' },
{ url: 'stun:stun.fwdnet.net' },
{ url: 'stun:stun.ideasip.com' },
{ url: 'stun:stun.iptel.org' },
{ url: 'stun:stun.rixtelecom.se' },
{ url: 'stun:stun.schlund.de' },
{ url: 'stun:stun.l.google.com:19302' },
{ url: 'stun:stun1.l.google.com:19302' },
{ url: 'stun:stun2.l.google.com:19302' },
{ url: 'stun:stun3.l.google.com:19302' },
{ url: 'stun:stun4.l.google.com:19302' },
{ url: 'stun:stunserver.org' },
{ url: 'stun:stun.softjoys.com' },
{ url: 'stun:stun.voiparound.com' },
{ url: 'stun:stun.voipbuster.com' },
{ url: 'stun:stun.voipstunt.com' },
{ url: 'stun:stun.voxgratia.org' },
{ url: 'stun:stun.xten.com' },
{
url: 'turn:numb.viagenie.ca',
credential: 'muazkh',
username: 'webrtc#live.com'
},
{
url: 'turn:192.158.29.39:3478?transport=udp',
credential: 'JZEOEt2V3Qb0y27GRntt2u2PAYA=',
username: '28224511:1379330808'
},
{
url: 'turn:192.158.29.39:3478?transport=tcp',
credential: 'JZEOEt2V3Qb0y27GRntt2u2PAYA=',
username: '28224511:1379330808'
}
]
};
Related
I'm using kinesis delivery stream to send stream, from event bridge to s3 bucket. But i can't seem to find which class have the option to configure dynamic partitioning?
this is my code for delivery stream:
new CfnDeliveryStream(this, `Export-delivery-stream`, {
s3DestinationConfiguration: {
bucketArn: bucket.bucketArn,
roleArn: kinesisFirehoseRole.roleArn,
prefix: `test/!{timestamp:yyyy/MM/dd}/`
}
});
I have been working on the same issue for a few days, and have finally gotten something to work. Here is an example of how it can be implemented in CDK. In short, the partitioning has to be enables as you have done, but you need to set the key and .jq expression in the so-called processingConfiguration.
Our incomming json data looks something like this:
{
"data":
{
"timestamp":1633521266990,
"defaultTopic":"Topic",
"data":
{
"OUT1":"Inactive",
"Current_mA":3.92
}
}
}
The CDK code looks as following:
const DeliveryStream = new CfnDeliveryStream(this, 'deliverystream', {
deliveryStreamName: 'deliverystream',
extendedS3DestinationConfiguration: {
cloudWatchLoggingOptions: {
enabled: true,
},
bucketArn: Bucket.bucketArn,
roleArn: deliveryStreamRole.roleArn,
prefix: 'defaultTopic=!{partitionKeyFromQuery:defaultTopic}/!{timestamp:yyyy/MM/dd}/',
errorOutputPrefix: 'error/!{firehose:error-output-type}/',
bufferingHints: {
intervalInSeconds: 60,
},
dynamicPartitioningConfiguration: {
enabled: true,
},
processingConfiguration: {
enabled: true,
processors: [
{
type: 'MetadataExtraction',
parameters: [
{
parameterName: 'MetadataExtractionQuery',
parameterValue: '{defaultTopic: .data.defaultTopic}',
},
{
parameterName: 'JsonParsingEngine',
parameterValue: 'JQ-1.6',
},
],
},
{
type: 'AppendDelimiterToRecord',
parameters: [
{
parameterName: 'Delimiter',
parameterValue: '\\n',
},
],
},
],
},
},
})
im using the nuxt-auth module.
I've got it to work so far. I am able to login properly.
But whenever i login, the user object in my store does not get set.
It seems like my API is getting called without parameters so it does not know which user to set.
nuxt.config.js
auth: {
redirect: {
login: '/login',
logout: '/login',
callback: '/login',
home: '/'
},
strategies: {
local: {
endpoints: {
login: {
url: 'token',
method: 'post',
propertyName: 'token'
},
user: {
url: 'microservice/user',
method: 'get',
propertyName: false
},
logout: false
}
},
watchLoggedIn: true,
resetOnError: true
}
},
logging in
await this.$auth.loginWith('local', {
data: {
username: this.username,
password: this.passwort
}
})
example API-User
{
"method": "GET",
"path": "/user/102",
"query": "",
"response": {
"type": "single",
"payload": {
"id": 102,
"firstname": "super",
"name": "test",
"username": "stest1",
//some data
}
}
}
After retrieving a token and setting it, my app sends a request without query/parameters to my user-API. Either im doing something wrong, or am just too dumb too see the right way to set my user. However, if i set my user-Route to for example 'microservice/user/102' it is able to retrieve that one specific user.
Hoping anyone can help! :D
I think you should set it propertyName for user endpoint
user: {
url: 'microservice/user',
method: 'get',
propertyName: payload
},
I have two inputs field : url and email
I'm using Vuelidate and I want to make a custom validator where it checks if the url domain name is equal to the email domain name.
Valid example :
url: (https://)www.mydomain.example
email: johndoe#mydomain.example
Invalid example :
url: (https://)www.mydomain.example
email: johndoe#somedomaine.example
validations object :
validations: {
form: {
url: { required, url, maxLength: maxLength(2083) },
email: { required, email, maxLength: maxLength(255) },
lastName: { required, maxLength: maxLength(100) },
firstName: { required, maxLength: maxLength(100) }
}
},
You could use a custom validator called matchUrl as follow :
const matchUrl=(value, vm) =>
value.substring(value.indexOf("#")+1) ===vm.url.substring(vm.url.indexOf(".")+1);
And use it as :
validations: {
form: {
url: { required, url, maxLength: maxLength(2083) },
email: { required,matchUrl, email, maxLength: maxLength(255) },
lastName: { required, maxLength: maxLength(100) },
firstName: { required, maxLength: maxLength(100) }
}
},
check this working example
I am experimenting with Webhooks in the GitHub api. I got one working by doing it manually as in going into my repository and clicking into the setting and enabling a web hook. But now I want to do this in AJAX and I am getting problems. Anytime I try to send a POST to the web api it fails with a 400 (Bad Request). I am not sure where I am going wrong with my code.
function createWebHooksOnRepos(token){
const webhookURL = "https://api.github.com/repos/DanoBuck/AlgorithmsAndDataStructures/hooks";
const json = {
"name": "WebHook",
"active": true,
"events": [
"issue_comment",
"issues"
],
"config": {
"url": "http://39a40427.ngrok.io/api/webhooks/incoming/github",
"content_type": "json"
}
};
$.ajax({
headers: {
"Authorization": "Token " + token
},
url: webhookURL,
data: json,
type: "POST",
dataType: "json",
success: function(data){
console.log(data);
}
});
}
Thank you
From github Webhook API doc :
name - string - Required. Use "web" for a webhook or use the name of a valid
service. (See /hooks for the list of valid service names.)
So in your case, just rename Webhook to web :
const json = {
"name": "web",
"active": true,
"events": [
"issue_comment",
"issues"
],
"config": {
"url": "http://39a40427.ngrok.io/api/webhooks/incoming/github",
"content_type": "json"
}
};
Also JSON.stringify your data before sending :
$.ajax({
headers: {
"Authorization": "Token " + token
},
url: webhookURL,
data: JSON.stringify(json),
type: "POST",
dataType: "json",
success: function(data) {
console.log(data);
}
});
How do I control how many rows appear in a kendo grid? Real Estate is limited, so I need to have a lot of info in a pretty compact space. I'm trying to pack everything in my grid in a 300-pixel high area.
The issue I'm having is that all 200-plus rows of data that are being returned from my MVC JsonResult in my controller are displaying at once, on a single page. Not quite exactly what I'm looking for.
Code is below, if someone a little more knowledgeable about formatting a kendo grid could help out, I'd appreciate it.
Thanks!
-RC
{}
var RemoteJsonData_Call = new kendo.data.DataSource({
transport:
{
read: {
type: "GET",
dataType: "json",
url: resourceURL_Call
},
pageSizes: 8,
serverPaging: true
},
schema: {
model: {
ScheduleData: {
extensionDataField: {
fields: {
ScheduleDate: { type: "date" },
ScheduleAmount: { type: "number" },
SchedulePrice: { type: "number" },
ScheduleNotes: { type: "string" }
}
}
}
}
}
})
$('#callSched').kendoGrid({
height: '300',
sortable: true,
reorderable: true,
resizable: true,
pageable: {
numeric: true,
refresh: true,
pageSizes: true,
previousNext: true,
input: true,
info: true
},
columns: [
{
field: "ScheduleDate",
title: "Date",
template: "#= kendo.toString(kendo.parseDate(ScheduleDate, 'MM-dd-yyyy'), 'MM-dd-yyyy') #"
},
{
field: "ScheduleAmount",
title: "Amount",
},
{
field: "SchedulePrice",
title: "Price"
},
{
field: "ScheduleNotes",
title: "Notes"
}
], dataSource: RemoteJsonData_Call
});
{}
The problem is that you have defined that the paging is done in the server when it is not. You should say:
serverPaging: false
or just nothing since the default value is false.
With this you should have a grid with the number of pixels specified in the height option (in your example 300 pixels). Other options in you example are correct.
You have server paging and page size set up incorrectly here:
var RemoteJsonData_Call = new kendo.data.DataSource({
transport:
{
read: {
type: "GET",
dataType: "json",
url: resourceURL_Call
},
pageSizes: 8,
serverPaging: true
},
It should be:
var RemoteJsonData_Call = new kendo.data.DataSource({
transport:
{
read: {
type: "GET",
dataType: "json",
url: resourceURL_Call
}
},
pageSize: 8,
serverPaging: true
The config options were in the wrong place, and "pageSizes" was misspelled, it should be "pageSize" with no "s" on the end.
http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-pageSize