Updated insecure-js tutorial to fit with docker deployment
This commit is contained in:
parent
49e44db216
commit
b8c8ac37cf
@ -1,7 +1,5 @@
|
||||
FROM nginx:1.19.2-alpine
|
||||
|
||||
ARG OPENVIDU_TUTORIALS_VERSION
|
||||
|
||||
RUN apk update && \
|
||||
# apk add wget && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
@ -3,9 +3,7 @@
|
||||
[ ! -z "${OPENVIDU_URL}" ] && echo "OPENVIDU_URL: ${OPENVIDU_URL}" || echo "OPENVIDU_URL: default"
|
||||
[ ! -z "${OPENVIDU_SECRET}" ] && echo "OPENVIDU_SECRET: ${OPENVIDU_SECRET}" || echo "OPENVIDU_SECRET: default"
|
||||
|
||||
if [ ! -z "${OPENVIDU_URL}" ]; then
|
||||
sed -i "s/^var OPENVIDU_SERVER_URL =.*$/var OPENVIDU_SERVER_URL = \"$(echo "${OPENVIDU_URL}" | sed 's#/#\\/#g')\";/" /var/www/openvidu-insecure-js/app.js
|
||||
fi
|
||||
sed -i "s/^var OPENVIDU_SERVER_URL =.*$/var OPENVIDU_SERVER_URL = \"$(echo https://\" + location.hostname | sed 's#/#\\/#g');/" /var/www/openvidu-insecure-js/app.js
|
||||
|
||||
if [ ! -z "${OPENVIDU_SECRET}" ]; then
|
||||
sed -i "s/^var OPENVIDU_SERVER_SECRET =.*$/var OPENVIDU_SERVER_SECRET = \"${OPENVIDU_SECRET}\";/" /var/www/openvidu-insecure-js/app.js
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
listen 5442;
|
||||
|
||||
root /var/www/openvidu-insecure-js;
|
||||
}
|
||||
@ -67,7 +67,7 @@ function joinSession() {
|
||||
publishVideo: true, // Whether you want to start publishing with your video enabled or not
|
||||
resolution: '640x480', // The resolution of your video
|
||||
frameRate: 30, // The frame rate of your video
|
||||
insertMode: 'APPEND', // How the video is inserted in the target element 'video-container'
|
||||
insertMode: 'APPEND', // How the video is inserted in the target element 'video-container'
|
||||
mirror: false // Whether to mirror your local video or not
|
||||
});
|
||||
|
||||
@ -97,7 +97,7 @@ function leaveSession() {
|
||||
|
||||
session.disconnect();
|
||||
|
||||
// Removing all HTML elements with user's nicknames.
|
||||
// Removing all HTML elements with user's nicknames.
|
||||
// HTML videos are automatically removed when leaving a Session
|
||||
removeAllUserData();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user