-
Notifications
You must be signed in to change notification settings - Fork 377
An easy way to quickly evaluate OWT with Docker image
In this article, we will introduce how to quickly evaluate OWT with Docker image in DockerHub.
We have uploaded 5 OWT Docker images to DockerHub(based on latest 5.0 release), including 4 OWT running environment images with OWT package inside and one OWT building environment with OWT 5.0 source code inside:
OWT running environment images:
xeon-ubuntu1804-service-owt: OWT ubuntu 18.04 docker image without hardware accelerating related software installed.
xeon-centos76-service-owt: OWT centos 7.6 docker image without hardware accelerating related software installed.
xeone3-ubuntu1804-service-owt: OWT ubuntu 18.04 docker image with hardware accelerating related software.
xeone3-centos76-service-owt: OWT centos 7.6 docker image with hardware accelerating related software installed.
OWT building environment with OWT source code inside:
xeon-ubuntu1804-service-dev: OWT ubuntu 18.04 docker image with necessary dependencies installed for building OWT package, OWT 5.0 source code is included.
We will use xeon-ubuntu1804-service-owt image here to introduce how to quickly setup OWT server.
Make sure docker is successfully installed on your device and docker is successfully configured so that it can pull image from DockerHub. Download OWT docker image with following command:
docker pull openvisualcloud/xeon-ubuntu1804-service-owt
Then you can use following command to check the image on your device:
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
openvisualcloud/xeon-ubuntu1804-service-owt latest 8eb68347292c 2 months ago 1.08GB
To quickly evaluate OWT server, you can run OWT docker image with host network as follow:
docker run -itd --name=owt --net=host openvisualcloud/xeon-ubuntu1804-service-owt bash
docker exec -it owt bash
cd /home
./launch.sh
Then you can open tab in Chrome browser with "https://serverip:3004?forward=true" to evaluate the server.
OWT is using a self-signed certificate in the package by default, so you need to manually allow the certificate in browser. We have self-signed certificate for sample server and WebRTC signaling server, so you need to click twice on the browser. Click "Advanced" and allow serverip to go, then a second link hint will display in page and click it to allow the second self-signed certificate in browser.
If everything works well, then there will be a local stream display up in the page and subscribed remote forward stream down in the page.
OWT sample web page will download jquery-3.2.1.min.js
and socket.io.js
files from internet, for network that cannot successfully download these 2 files following errors will print on Chrome console:
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
If this error happens, please manually download js files and replace them in docker image as:
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/
Then refresh Chrome tab and your local stream and subscribed remote forward stream will display on page.
If you want to develop your own feature based on OWT source code, you can follow steps below to develop based on 5.0 OWT source code:
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
Then you can open chrome to test your modified feature. Make sure js files can be downloaded as 1.2 shows