Embed: remove forbidden modern code (blegh! filthy modern stuff brrr) from the webrtc wrapper
This commit is contained in:
parent
b6068f4627
commit
615fad6be9
10 changed files with 79 additions and 27 deletions
|
@ -602,15 +602,16 @@ p.prototype.build = function (MistVideo,callback) {
|
|||
me.api.getStats = function(){
|
||||
if (me.webrtc && me.webrtc.isConnected) {
|
||||
return new Promise(function(resolve,reject) {
|
||||
me.webrtc.peerConn.getStats().then((a) => {
|
||||
me.webrtc.peerConn.getStats().then(function(a){
|
||||
var r = {
|
||||
audio: null,
|
||||
video: null
|
||||
};
|
||||
for (let dictionary of a.values()) {
|
||||
if (dictionary.type == "track") {
|
||||
var obj = Object.fromEntries(a);
|
||||
for (var i in obj) {
|
||||
if (obj[i].type == "track") {
|
||||
//average jitter buffer in seconds
|
||||
r[dictionary.kind] = dictionary;
|
||||
r[obj[i].kind] = obj[i];
|
||||
}
|
||||
}
|
||||
resolve(r);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue