wiki(照着操作会有不注意的坑):An easy way to quickly evaluate OWT with Docker image
相关文章:
- Ubuntu环境安装OWT Server[Open WebRTC Toolkit]
- Docker环境安装OWT Server[Open WebRTC Toolkit]
- OWT Server整体架构分析 [Open WebRTC Toolkit]
- OWT Server信令分析 (上) [Open WebRTC Toolkit]
- OWT Server信令分析 (下) [Open WebRTC Toolkit]
- OWT Server进程结构和JS代码处理流程 [Open WebRTC Toolkit]
- OWT Server REST API
OWT运行环境映像:
xeon-ubuntu1804-service-owt: OWT ubuntu 18.04 docker镜像,无硬件加速相关软件安装。
xeon-centos76-service-owt: OWT centos 7.6 docker镜像,不安装硬件加速相关软件。
xeone3-ubuntu1804-service-owt:自带硬件加速相关软件的OWT ubuntu 18.04 docker镜像。
xeone3-centos76-service-owt: OWT centos 7.6 docker镜像,安装硬件加速相关软件。
自带OWT源代码的OWT构建环境:
xeon-ubuntu1804-service-dev: OWT ubuntu 18.04 docker镜像,安装了构建OWT包所需的依赖项,包括OWT 5.0源代码。
docker pull openvisualcloud/xeon-ubuntu1804-service-owt
docker run -itd --name=owt --net=host openvisualcloud/xeon-ubuntu1804-service-owt bash
docker exec -it owt bash
cd /home
启动:./launch.sh
停止:./owt/bin/stop-all.sh
webrtc_agent/agent.toml
:修改 [webrtc] 部分的 network_interfaces,添加 {name = “eth0”, replaced_ip_address = “公网ip”},需要把 name 设置为网卡实际名称(ifconfig可查看,一般为eth0,注意,不是docker那个网卡名称),replaced_ip_address 设置为服务器公网 IP 地址。portal/portal.toml
:修改 [portal] 部分里的 ip_address 为服务器公网 IP 地址。apt-get update
命令对源进行更新apt-get install vim
命令安装vimhttps://serverip:3004?”Forward =true
来验证是否成功。thisisunsafe
",就会跳转到访问页面。index.js:52 Uncaught (in promise) ReferenceError: $ is not defined
at createResolutionButtons (index.js:52)
at subscribeAndRenderVideo (index.js:100)
at index.js:194
createResolutionButtons @ index.js:52
subscribeAndRenderVideo @ index.js:100
(anonymous) @ index.js:194
Promise.then (async)
(anonymous) @ index.js:143
req.onreadystatechange @ rest-sample.js:12
XMLHttpRequest.send (async)
send @ rest-sample.js:19
createToken @ rest-sample.js:79
window.onload @ index.js:141
load (async)
runSocketIOSample @ index.js:134
(anonymous) @ (index):53
index.js:176 Uncaught (in promise) ReferenceError: $ is not defined
at index.js:176
其他错误也可以试下执行下面操作,我遇到的就是其他错误然后通过如下步骤解决的
),需要手动下载js文件并替换到docker镜像(docker路径需要事先创建:mkdir -p extras/basic_example/public/)wget https://raw.githubusercontent.com/qwu16/jsfiles/master/jquery-3.2.1.min.js
wget https://raw.githubusercontent.com/qwu16/jsfiles/master/socket.io.js
wget https://raw.githubusercontent.com/qwu16/jsfiles/master/index.html
docker cp index.html owt:/home/owt/extras/basic_example/public/
docker cp socket.io.js owt:/home/owt/extras/basic_example/public/scripts/
docker cp jquery-3.2.1.min.js owt:/home/owt/extras/basic_example/public/scripts/
~/.docker/config.json
配置docker代理,配置方法:{
"proxies":{
"default":{
"httpProxy":"http://ip:port",
"httpsProxy":"http://ip:port"
}
}
}
docker build -t owt:build .
docker pull openvisualcloud/xeon-ubuntu1804-service-dev
docker run -itd --net=host --name=owtbuild openvisualcloud/xeon-ubuntu1804-service-dev bash
docker exec -it owtbuild bash
cd /home/owt-server
####Modify your code
./scripts/build.js -t mcu -r -c
./scripts/pack.js -f -i -p ../owt-client-javascript/dist/samples/conference/
cd dist
./bin/init-all.sh
./bin/start-all.sh