添加测试web文件

This commit is contained in:
ziyue
2021-03-25 16:03:28 +08:00
parent 65e470e060
commit 581ebfad71
4 changed files with 2655 additions and 0 deletions

12
www/webrtc/js/common.js Normal file
View File

@@ -0,0 +1,12 @@
function trace(text) {
// This function is used for logging.
if (text[text.length - 1] === '\n') {
text = text.substring(0, text.length - 1);
}
if (window.performance) {
var now = (window.performance.now() / 1000).toFixed(3);
console.log(now + ': ' + text);
} else {
console.log(text);
}
}