Commit eca83b4e authored by likely's avatar likely

first commit

parent 13697f85
dist/
node_modules/
\ No newline at end of file
<html>
<head>
</head>
<body>
<!-- 正面摄像头 -->
<canvas id="front_video" width="480" height="860"></canvas>
<!-- 侧面摄像头 -->
<canvas id="side_video" width="480" height="860"></canvas>
<script src="//sqimg.qq.com/expert_qq/wawaji/TXWawaPlayer.beta4.min.js"></script>
<script src="index.js"></script>
</body>
</html>
\ No newline at end of file
var insert = require('./utils/insertscript');
var ios = require('./libs/ios');
var android = require('./libs/android');
var ua = window.navigator.userAgent.toLowerCase();
if (/iphone|ipad|ipod/gi.test(ua)) {
insert('//sqimg.qq.com/expert_qq/wawaji/1.2/TXWawaVideo.min.js', ios);
} else if (/Android|adr/gi.test(ua)) {
insert('//sqimg.qq.com/expert_qq/webrtc/1.2/WebRTCAPI.min.js', android);
}
\ No newline at end of file
module.exports = function() {
console.log('android');
}
\ No newline at end of file
module.exports = function() {
TXWawaVideo.init({
sdkappid: 1400050371,
accounttype: 19242,
roomId: 59,
identifier: "1574",
usersig: "eJxFkFFPgzAUhf8LrzNyCytVEx-qYGQGE8fAZHtpKnTkOmEddAM0-neRjPh6vtyc79xvK4k2t1JrzIU0wq1z68EC62aMVaexVkLujaqHmFBKHYCJXlTd4LEagAOEEscF*IeYq8rgHsdDzjm9v4IGiyF5CdLFyk-t*LCLi26RaB9ksA6Lks1t8hSuGnnq4*VH28PsEpEy4xjw1t62Jf1iBN8*qyXwu-dot-UTrzinJx2Em3XCQxV3s*dX-jiV5Qcxbvuznw92FFxGrtBgqcZVxGOeS9lkKLPseK6MML1W4zN*fgGy2FYp",
front: "AAA59",
side: "BBB59",
sig: "D8F648779DE67F663FBA9987E7913C54171A992BB8D605C3",
ver: 1,
renderType: 0,
listeners: {
errorNotify: function(data) {
console.error(data)
},
infoNotify: function(data) {
console.info(data)
}
}
}, function(res) {
console.log(res)
//同时可以渲染正面的视频流了
var front_video_element = document.querySelector("#front_video")
var side_video_element = document.querySelector("#side_video")
TXWawaVideo.renderVideo([front_video, side_video], function() {
console.debug('正面视频帧来了')
});
}, function(err) {
console.debug(err)
})
}
\ No newline at end of file
{
"name": "wawa-h5",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git@gitlab2.dui88.com:wawa/wawa-h5.git"
},
"author": "",
"license": "ISC"
}
module.exports = function(src, callback) {
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.onload = script.onreadystatechange = function() {
if (!this.readyState || this.readyState === "loaded" || this.readyState === "complete") {
callback();
script.onload = script.onreadystatechange = null;
}
}
script.src = src;
head.appendChild(script);
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment