mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-02 02:51:53 +08:00
refactoring
This commit is contained in:
@@ -333,22 +333,18 @@ JanusStreamer.ensure_janus = function(callback) {
|
||||
"debug": "all",
|
||||
"callback": function() {
|
||||
_Janus = module.Janus;
|
||||
callback();
|
||||
callback(true);
|
||||
},
|
||||
});
|
||||
}).catch((err) => {
|
||||
tools.error("Stream: Can't import Janus module:", err);
|
||||
callback();
|
||||
callback(false);
|
||||
});
|
||||
} else {
|
||||
callback();
|
||||
callback(true);
|
||||
}
|
||||
};
|
||||
|
||||
JanusStreamer.is_imported = function() {
|
||||
return (_Janus !== null);
|
||||
};
|
||||
|
||||
JanusStreamer.is_webrtc_available = function() {
|
||||
return !!window.RTCPeerConnection;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user