### Install and Start OpenVidu Library React Tutorial Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/tutorials/openvidu-library-react.md Installs project dependencies and starts the development server for the OpenVidu Library React tutorial. Navigate to the tutorial's directory before running these commands. ```bash # Using the same repository openvidu-tutorials from step 2 cd openvidu-tutorials/openvidu-library-react npm install npm start ``` -------------------------------- ### Install Dependencies and Start Client Application Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/demos/openvidu-call-react.md Navigate into the cloned repository's directory, install the necessary Node.js dependencies using NPM, and then start the development server for the OpenVidu Call React application. ```bash cd openvidu-call-react/openvidu-call-react npm install npm start ``` -------------------------------- ### Install Dependencies and Start React App Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/tutorials/openvidu-react.md Installs project dependencies using NPM and starts the React development server for the openvidu-react application. Navigate to the project directory first. ```bash # Using the same repository openvidu-tutorials from step 2 cd openvidu-tutorials/openvidu-react npm install npm start ``` -------------------------------- ### Install Dependencies and Start Electron App Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/tutorials/openvidu-electron.md Installs project dependencies and starts the OpenVidu Electron application. This command should be run from the 'openvidu-electron' directory within the cloned 'openvidu-tutorials' repository. ```bash cd openvidu-tutorials/openvidu-electron npm install npm start ``` -------------------------------- ### Install Dependencies and Run Server Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/tutorials/openvidu-roles-node.md Installs project dependencies using npm and starts the Node.js server. This command should be run after cloning the tutorial repository and navigating into its directory. ```bash cd openvidu-tutorials/openvidu-roles-node npm install node server.js http://localhost:4443 MY_SECRET ``` -------------------------------- ### Install Dependencies and Run Node.js Server Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/tutorials/openvidu-recording-node.md Install project dependencies using npm and then run the Node.js server application. This command starts the backend for the OpenVidu recording tutorial. ```bash cd openvidu-tutorials/openvidu-recording-node npm install node server.js http://localhost:4443 MY_SECRET ``` -------------------------------- ### Install Dependencies and Serve Vue.js App Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/tutorials/openvidu-vue.md Installs project dependencies using NPM and starts the Vue.js development server. Navigate to the tutorial's directory before running these commands. ```bash # Using the same repository openvidu-tutorials from step 2 cd openvidu-tutorials/openvidu-vue npm install npm run serve ``` -------------------------------- ### Initialize OpenVidu and Session Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/tutorials/openvidu-angular.md Get an OpenVidu object and initialize a new Session. This is the first step to start a video call. ```javascript // --- 1) Get an OpenVidu object --- this.OV = new OpenVidu(); // --- 2) Init a session --- this.session = this.OV.initSession(); ``` -------------------------------- ### Install Frontend NPM Dependencies Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/demos/openvidu-classroom.md Navigate to the frontend directory of the classroom demo and install all necessary NPM dependencies using 'npm install'. ```bash cd classroom-demo/src/angular/frontend npm install ``` -------------------------------- ### Start Individual Recording (Java) Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/advanced-features/recording.md Example of starting an individual recording using the OpenVidu Java SDK. This configuration ensures each stream is saved in its own file. ```APIDOC ## Start Individual Recording (Java) ### Description Starts a recording session with the `INDIVIDUAL` output mode using the Java SDK. ### Method ```java RecordingProperties properties = new RecordingProperties.Builder() .outputMode(Recording.OutputMode.INDIVIDUAL) .build(); Recording recording = openVidu.startRecording(session.getSessionId(), properties); ``` ``` -------------------------------- ### Install Dependencies and Serve Angular Application Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/tutorials/openvidu-angular.md Installs project dependencies using NPM and starts the Angular development server. Navigate to http://localhost:4200 in your browser to view the application. ```bash # Using the same repository openvidu-tutorials from step 2 cd openvidu-tutorials/openvidu-angular npm install ng serve ``` -------------------------------- ### Install and Build openvidu-browser Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/developing/index.md Navigate to the openvidu-browser directory, install dependencies, build the library, and link it globally for use in other projects. ```bash npm install npm run build sudo npm link ``` -------------------------------- ### Install openvidu-node-client Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/reference-docs/openvidu-node-client.md Install the openvidu-node-client library using npm. ```bash npm i -S openvidu-node-client ``` -------------------------------- ### Starting OpenVidu Platform Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/deployment/ce/on-premises.md Execute this command to start OpenVidu Platform and any enabled applications. Docker images will be downloaded on the first run. ```bash ./openvidu start ``` -------------------------------- ### Start Recording (REST API) Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/advanced-features/recording.md Demonstrates how to start a recording for a specific session using the OpenVidu REST API. ```APIDOC ## Start Recording (REST API) ### Description This endpoint allows you to manually start a recording for a given session. You can override default recording properties or provide new ones. ### Method POST ### Endpoint /openvidu/api/recordings/start ### Request Body ```json { "session": "ses_YnDaGYNcd7", "name": "MY_RECORDING_NAME" } ``` ### Request Example ```bash curl -X POST https:///openvidu/api/recordings/start \ -u OPENVIDUAPP: \ -H "Content-Type: application/json" \ -d '{ "session": "ses_YnDaGYNcd7", "name": "MY_RECORDING_NAME" }' ``` ``` -------------------------------- ### Start and Stop Recording (Java) Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/advanced-features/recording.md Demonstrates how to start and stop a recording for a given session using the OpenVidu Java client. ```APIDOC ## Start and Stop Recording (Java) ### Description This snippet shows how to initiate and terminate a recording for an OpenVidu session using the Java SDK. It includes setting custom recording properties. ### Method ```java RecordingProperties properties = new RecordingProperties.Builder() .name("MY_RECORDING_NAME") .build(); Recording recording = openVidu.startRecording(session.getSessionId(), properties); // Starts recording recording = openVidu.stopRecording(recording.getId()); // Stops recording ``` ``` -------------------------------- ### Serve the OpenVidu Virtual Background tutorial Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/tutorials/openvidu-virtual-background.md Serve the client-side tutorial files using http-server. Navigate to the tutorial directory and run the command to start the local web server. ```bash # Using the same repository openvidu-tutorials from step 2 http-server openvidu-tutorials/openvidu-virtual-background/web ``` -------------------------------- ### Serve the Client Application Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/tutorials/openvidu-js-screen-share.md Starts a local HTTP server to serve the tutorial's web files. Navigate to http://localhost:8080 in your browser to access the application. ```bash # Using the same repository openvidu-tutorials from step 2 http-server openvidu-tutorials/openvidu-js-screen-share/web ``` -------------------------------- ### Serve the Client Application Tutorial Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/ready-to-use-component/index.md Starts a local HTTP server to serve the OpenVidu Web Component tutorial files. Navigate to the 'openvidu-tutorials' repository directory before running this command. ```bash # Using the same repository openvidu-tutorials from step 2 http-server openvidu-tutorials/openvidu-webcomponent/web ``` -------------------------------- ### Serve the Client Application Tutorial Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/tutorials/openvidu-js.md Starts a local web server to serve the openvidu-js tutorial files. Navigate to http://localhost:8080 in your browser to view the application. ```bash # Using the same repository openvidu-tutorials from step 2 http-server openvidu-tutorials/openvidu-js/web ``` -------------------------------- ### OpenVidu Enterprise HA Installation Success Message Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/deployment/enterprise/on-premises.md This message confirms the successful installation of OpenVidu Enterprise HA. It is followed by steps to configure and start the service. ```text ======================================= OpenVidu Enterprise HA successfully installed. ======================================= 1. Go to openvidu folder: ------------------------------------------------ $ cd openvidu ------------------------------------------------ 2. Configure the .env file with your own values: Check the documentation for more information: https://docs.openvidu.io/en//deployment/enterprise/on-premises/#high-availability-deployment ------------------------------------------------ $ nano .env ------------------------------------------------ 3. Start OpenVidu ------------------------------------------------ $ ./openvidu start ------------------------------------------------ ``` -------------------------------- ### Serve OpenVidu Toolbar Panel Buttons Tutorial Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/components/openvidu-toolbar-panel-buttons.md Commands to serve the tutorial client application locally. Requires NPM and Angular CLI. Navigate to the tutorial directory and run 'npm install' followed by 'ng serve'. ```bash # Using the same repository openvidu-tutorials from step 2 cd openvidu-tutorials/openvidu-components/openvidu-toolbar-panel-buttons npm install ng serve ``` -------------------------------- ### Serve Client Application Tutorial Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/demos/openvidu-getaroom.md Starts a local web server to serve the OpenVidu GetARoom client application. Navigate to http://localhost:8080 in your browser to test the application. ```bash # Using the same repository openvidu-tutorials from step 2 http-server openvidu-tutorials/openvidu-getaroom/web ``` -------------------------------- ### Serve the Speech to Text tutorial client Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/tutorials/openvidu-speech-to-text.md Start a local HTTP server to serve the client-side files for the OpenVidu Speech to Text tutorial. Navigate to the specified directory within your cloned OpenVidu tutorials repository. ```bash # Using the same repository openvidu-tutorials from step 2 http-server openvidu-tutorials/openvidu-speech-to-text/web ``` -------------------------------- ### Navigate to OpenVidu Installation Path Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/deployment/ce/upgrading.md Connect to your server via SSH, gain root permissions, and navigate to the OpenVidu installation directory. This is the recommended starting point for on-premises upgrades. ```bash sudo -s cd /opt/openvidu # Recommended and default installation path ``` -------------------------------- ### Serve OpenVidu Hello World Client Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/tutorials/openvidu-hello-world.md Starts a local HTTP server to serve the 'openvidu-hello-world' client application. Access it at http://localhost:8080. ```bash # Using the same repository openvidu-tutorials from step 2 http-server openvidu-tutorials/openvidu-hello-world/web ``` -------------------------------- ### OpenVidu Pro Installation Success Message Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/deployment/pro/on-premises.md After a successful installation, this message provides basic instructions for configuration and starting OpenVidu. It also notes that the 'openvidu/elasticsearch' folder requires specific user and group permissions. ```text ======================================= Openvidu PRO successfully installed. ======================================= 1. Go to openvidu folder: $ cd openvidu 2. Configure OPENVIDU_DOMAIN_OR_PUBLIC_IP, OPENVIDU_PRO_LICENSE, OPENVIDU_SECRET, and ELASTICSEARCH_PASSWORD in .env file: $ nano .env 3. Start OpenVidu $ ./openvidu start CAUTION: The folder 'openvidu/elasticsearch' use user and group 1000 permissions. This folder is necessary for store elasticsearch data. For more information, check: https://docs.openvidu.io/en/2.26.0/deployment/pro/on-premises/#deployment-instructions ``` -------------------------------- ### Start Individual Recording (Node.js) Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/advanced-features/recording.md Example of initiating an individual recording with the OpenVidu Node.js SDK. This method records each stream separately. ```APIDOC ## Start Individual Recording (Node.js) ### Description Starts a recording session with the `INDIVIDUAL` output mode using the Node.js SDK. ### Method ```javascript var recording; openvidu.startRecording(sessionId, { outputMode: Recording.OutputMode.INDIVIDUAL }) .then(response => recording = response) .catch(error => console.error(error)); ``` ``` -------------------------------- ### Navigate to OpenVidu Enterprise Base Services Directory Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/deployment/enterprise/on-premises.md Change directory into the 'ov-enterprise-base-services' folder after installation to access configuration files and start services. ```bash cd ov-enterprise-base-services ``` -------------------------------- ### Run OpenVidu Development Container Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/components/openvidu-admin-dashboard.md Starts a development instance of OpenVidu using Docker. Ensure you have Docker Engine installed. This command is not suitable for production. ```bash # WARNING: this container is not suitable for production deployments of OpenVidu # Visit https://docs.openvidu.io/en/stable/deployment docker run -p 4443:4443 --rm -e OPENVIDU_SECRET=MY_SECRET openvidu/openvidu-dev:2.22.0 ``` -------------------------------- ### Run OpenVidu Development Deployment Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/components/openvidu-custom-activities-panel.md This command starts a development instance of OpenVidu using Docker. Ensure you have Docker Engine installed. This container is not recommended for production. ```bash # WARNING: this container is not suitable for production deployments of OpenVidu # Visit https://docs.openvidu.io/en/stable/deployment docker run -p 4443:4443 --rm -e OPENVIDU_SECRET=MY_SECRET openvidu/openvidu-dev:2.32.2 ``` -------------------------------- ### Clone and Run OpenVidu Recording Java Tutorial Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/tutorials/openvidu-recording-java.md Clones the tutorial repository and runs the Java backend application using Maven. Access the application at https://localhost:5000. ```bash git clone https://github.com/OpenVidu/openvidu-tutorials.git -b v2.32.2 ``` ```bash cd openvidu-tutorials/openvidu-recording-java mvn package exec:java ``` -------------------------------- ### Start Audio-Only Recording (Node.js) Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/advanced-features/recording.md Initiate an audio-only recording using the Node.js SDK. This example shows how to pass the recording properties object to the startRecording method. ```javascript var recording; openvidu.startRecording(sessionId, { hasAudio: true, hasVideo: false }) .then(response => recording = response) .catch(error => console.error(error)); ``` -------------------------------- ### Run NGINX Proxy for Tutorials Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/troubleshooting/index.md Launches an NGINX container to manage SSL certificates and route traffic for tutorials. Mounts local configuration and certificate directories. Run from the tutorial's root path. ```bash # At the root path of the tutorial # For example: /home/user/openvidu-tutorials/openvidu-hello-world docker run --rm -p 443:443 \ --add-host=host.docker.internal:host-gateway \ -v $PWD/nginx.conf:/etc/nginx/nginx.conf:ro \ -v $PWD/../certs:/etc/nginx/certs:ro \ nginx ``` -------------------------------- ### Getting a RecordingLayout by name Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/api/openvidu-java-client/io/openvidu/java/client/RecordingLayout.html This example demonstrates how to retrieve a specific RecordingLayout constant by its name using the valueOf() method. Ensure the provided name exactly matches an enum constant identifier. ```java RecordingLayout layout = RecordingLayout.valueOf("BEST_FIT"); ``` -------------------------------- ### OpenVidu startRecording (String, RecordingProperties) Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/api/openvidu-java-client/allclasses-index.html Starts recording a session with custom recording properties. ```APIDOC ## OpenVidu.startRecording(String sessionId, RecordingProperties properties) ### Description Starts recording the specified session with the provided recording properties. ### Method Signature `Recording startRecording(String sessionId, RecordingProperties properties)` ### Parameters * **sessionId** (String) - The ID of the session to record. * **properties** (RecordingProperties) - The custom properties for the recording. ### Returns A `Recording` object representing the started recording. ``` -------------------------------- ### Start Broadcast on Specific Media Node (Node.js) Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/advanced-features/broadcast.md This Node.js example shows how to initiate a broadcast and assign it to a particular Media Node. The Media Node ID must be correct and the node must be in a suitable state. ```javascript const properties = { mediaNode: {id: "media_i-1234567890abcdef0"} // The string being the unique ID of an existing Media Node } await openvidu.startBroadcast(sessionId, "rtmp://live.twitch.tv/app/{STREAM_KEY}", properties); ``` -------------------------------- ### Install and Serve OpenVidu Test App Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/developing/index.md Set up the Angular test application by installing its dependencies and linking the local 'openvidu-browser' package. Then, serve the application. ```bash npm install npm link openvidu-browser ng serve ``` -------------------------------- ### Create Session with Manual Media Node Allocation (Node.js) Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/openvidu-pro/scalability.md This Node.js example demonstrates how to assign a session to a specific Media Node. The mediaNode identifier must correspond to an existing node in your OpenVidu Pro setup. ```javascript var openvidu = new OpenVidu(OPENVIDU_URL, OPENVIDU_SECRET); var sessionProperties = { mediaNode: "media_i-1234567890abcdef0" // This string being the identifier of an available Media Node }; openVidu.createSession(sessionProperties) .then(session => { ... }) .catch(error => console.error(error)); ``` -------------------------------- ### Configure OpenVidu Enterprise Node .env File Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/deployment/enterprise/on-premises.md This snippet shows an example of the .env file configuration for an OpenVidu Enterprise Node in a High Availability setup. Ensure all parameters, especially those related to Redis, S3, and Elasticsearch, are correctly set for your environment. ```bash DOMAIN_OR_PUBLIC_IP=openvidu.example.io OPENVIDU_PRO_LICENSE= OPENVIDU_SECRET=OPENVIDU_SECRET OPENVIDU_ENTERPRISE_MEDIA_SERVER=mediasoup Https_PORT=443 OPENVIDU_ENTERPRISE_HA_NODE_PRIVATE_IP=10.5.0.6 OPENVIDU_ENTERPRISE_HA_REDIS_HOST=10.5.0.5 OPENVIDU_ENTERPRISE_HA_REDIS_PORT=6379 OPENVIDU_ENTERPRISE_HA_REDIS_PASSWORD=REDIS_SECRET OPENVIDU_ENTERPRISE_HA_S3_CONFIG_SERVICE_ENDPOINT=http://10.5.0.5:9000 OPENVIDU_ENTERPRISE_HA_S3_CONFIG_BUCKET=openvidu-enterprise OPENVIDU_ENTERPRISE_HA_S3_CONFIG_ACCESS_KEY=minioadmin OPENVIDU_ENTERPRISE_HA_S3_CONFIG_SECRET_KEY=MINIO_SECRET OPENVIDU_PRO_ELASTICSEARCH_HOST=http://10.5.0.5:9200 OPENVIDU_PRO_KIBANA_HOST=http://10.5.0.5:5601 ELASTICSEARCH_USERNAME=elasticadmin ELASTICSEARCH_PASSWORD=ELASTIC_SECRET ``` -------------------------------- ### Serve the Client Application Tutorial Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/tutorials/openvidu-filters.md Serves the OpenVidu filters client application files using http-server. Navigate to http://localhost:8080 in your browser to access the application. ```bash # Using the same repository openvidu-tutorials from step 2 http-server openvidu-tutorials/openvidu-filters/web ``` -------------------------------- ### Clone and Run OpenVidu Roles Java Tutorial Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/tutorials/openvidu-roles-java.md Clones the tutorial repository and runs the Java backend application using Maven. Assumes Java and Maven are installed. ```bash git clone https://github.com/OpenVidu/openvidu-tutorials.git -b v2.32.2 cd openvidu-tutorials/openvidu-roles-java mvn package exec:java ``` -------------------------------- ### Get and Customize MediaStream with OpenVidu Browser Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/api/openvidu-browser/classes/OpenVidu.html Use `getUserMedia` to obtain a MediaStream. Customize its video properties (e.g., grayscale, resolution, frame rate) before initializing a publisher. This example demonstrates creating a grayscale video stream at 10 fps and HD resolution without audio. ```javascript var OV = new OpenVidu();var FRAME_RATE = 10;OV.getUserMedia({ audioSource: false, videoSource: undefined, resolution: '1280x720', frameRate: FRAME_RATE}).then(mediaStream => { var videoTrack = mediaStream.getVideoTracks()[0]; var video = document.createElement('video'); video.srcObject = new MediaStream([videoTrack]); var canvas = document.createElement('canvas'); var ctx = canvas.getContext('2d'); ctx.filter = 'grayscale(100%)'; video.addEventListener('play', () => { var loop = () => { if (!video.paused && !video.ended) { ctx.drawImage(video, 0, 0, 300, 170); setTimeout(loop, 1000/ FRAME_RATE); // Drawing at 10 fps } }; loop(); }); video.play(); var grayVideoTrack = canvas.captureStream(FRAME_RATE).getVideoTracks()[0]; var publisher = this.OV.initPublisher( myHtmlTarget, { audioSource: false, videoSource: grayVideoTrack });}); ``` -------------------------------- ### Navigate to installation directory Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/deployment/ce/on-premises.md The recommended directory for OpenVidu installation is /opt. Change to this directory before running the installation script. ```bash cd /opt ``` -------------------------------- ### OpenVidu startRecording (String) Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/api/openvidu-java-client/allclasses-index.html Starts recording a session with default recording properties. ```APIDOC ## OpenVidu.startRecording(String sessionId) ### Description Starts recording the specified session using default recording properties. ### Method Signature `Recording startRecording(String sessionId)` ### Parameters * **sessionId** (String) - The ID of the session to record. ### Returns A `Recording` object representing the started recording. ``` -------------------------------- ### Install Node.js Dependencies Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/components/openvidu-call.md Installs the necessary Node.js dependencies for the OpenVidu Call backend. Requires Node.js and npm to be installed. ```bash cd openvidu-call-back npm install ``` -------------------------------- ### Clone and Navigate OpenVidu Tutorials Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/application-server/openvidu-basic-python.md Clone the OpenVidu tutorials repository and navigate to the basic Python application directory. ```bash git clone https://github.com/OpenVidu/openvidu-tutorials.git -b v2.32.2 cd openvidu-tutorials/openvidu-basic-python ``` -------------------------------- ### Check npm and Angular CLI Installation Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/api/openvidu-angular/index.html Verify that npm and Angular CLI are installed on your system before proceeding with the installation of openvidu-angular. ```bash npm -v ng v ``` -------------------------------- ### Clone OpenVidu Tutorials and Serve Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/developing/index.md Clone the OpenVidu Tutorials repository in the same directory as openvidu-call. This allows the webcomponent build command to automatically update tutorial files. Serve the webcomponent tutorial locally to test changes. ```bash # Same path as "git clone https://github.com/OpenVidu/openvidu-call.git" git clone https://github.com/OpenVidu/openvidu-tutorials.git # Serve the tutorial. Build command of the webcomponent will update its files http-server openvidu-tutorials/openvidu-webcomponent/web ``` -------------------------------- ### Install Java Dependencies with Maven Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/components/openvidu-call.md Installs Java dependencies using Maven for the OpenVidu Call backend. Requires Java and Maven to be installed. ```bash cd openvidu-call-back-java mvn install ``` -------------------------------- ### Starting a Recording with a Name (Node.js Client) Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/api/openvidu-browser/classes/RecordingEvent.html Illustrates how to start a recording with a specified name using the openvidu-node-client. The name can be provided as a string or within a configuration object. ```javascript OpenVidu.startRecording(sessionId, "MY_RECORDING") ``` ```javascript OpenVidu.startRecording(sessionId, {name: "MY_RECORDING"}) ``` -------------------------------- ### Run OpenVidu Basic Node.js Application Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/common/server-application-samples.html Clone the repository, navigate to the Node.js sample directory, install dependencies with npm, and run the application. ```bash git clone https://github.com/OpenVidu/openvidu-tutorials.git -b v2.32.2 cd openvidu-tutorials/openvidu-basic-node ``` ```bash npm install ``` ```bash node index.js ``` -------------------------------- ### Start Recording Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/api/openvidu-java-client/io/openvidu/java/client/OpenVidu.html Starts the recording of an OpenVidu session. ```APIDOC ## startRecording ### Description Starts the recording of a Session. ### Method Signature `public Recording startRecording(String sessionId, RecordingProperties properties)` ### Parameters #### Path Parameters - **sessionId** (String) - Required - The sessionId of the session you want to start recording. #### Request Body - **properties** (RecordingProperties) - Required - The configuration for this recording. ### Throws `OpenViduJavaClientException` `OpenViduHttpException` - The status code carries a specific meaning (see REST API). ``` -------------------------------- ### Starting a Recording with a Name (Java Client) Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/api/openvidu-browser/classes/RecordingEvent.html Shows how to initiate a recording with a custom name using the openvidu-java-client. You can either pass the name directly or use the RecordingProperties builder. ```java OpenVidu.startRecording(sessionId, "MY_RECORDING") ``` ```java OpenVidu.startRecording(sessionId, new RecordingProperties.Builder().name("MY_RECORDING").build()) ``` -------------------------------- ### Install Python Dependencies for MkDocs Source: https://github.com/openvidu/openvidu.io-docs/blob/master/README.md Installs Python 3, pip, and venv, then sets up a virtual environment and installs MkDocs and its dependencies using pip. ```sh sudo apt-get update && sudo apt-get install --no-install-recommends \ python3 python3-pip python3-venv ``` ```sh # Create and load the Python virtual environment python3 -m venv python_modules source python_modules/bin/activate # Install MkDocs and its dependencies python3 -m pip install wheel python3 -m pip install --upgrade -r requirements.txt ``` -------------------------------- ### Install OpenVidu Enterprise HA Node Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/deployment/enterprise/on-premises.md Download and run the installation script for OpenVidu Enterprise HA nodes. This command fetches the latest version of the installation script and executes it. Replace 'latest' with a specific version number to install a fixed version. ```bash curl https://s3-eu-west-1.amazonaws.com/aws.openvidu.io/install_openvidu_enterprise_ha_node_latest.sh | bash ``` ```bash curl https://s3-eu-west-1.amazonaws.com/aws.openvidu.io/install_openvidu_enterprise_ha_node_2.32.2.sh | bash ``` -------------------------------- ### Install Specific OpenVidu Pro Version Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/deployment/pro/on-premises.md To install a specific version of OpenVidu Pro, replace 'latest' in the installation script URL with the desired version number. ```bash curl https://s3-eu-west-1.amazonaws.com/aws.openvidu.io/install_openvidu_pro_2.32.2.sh | bash ``` -------------------------------- ### OpenVidu Pro .env Configuration Example Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/deployment/pro/on-premises.md This is a sample .env file showing common OpenVidu Pro configuration variables. Ensure you provide values for DOMAIN_OR_PUBLIC_IP, OPENVIDU_PRO_LICENSE, and OPENVIDU_SECRET. Other variables like CERTIFICATE_TYPE and LETSENCRYPT_EMAIL can be adjusted based on your SSL certificate strategy. ```bash # OpenVidu configuration # ---------------------- # Documentation: https://docs.openvidu.io/en/stable/reference-docs/openvidu-config/ # NOTE: This file doesn't need to quote assignment values, like most shells do. # All values are stored as-is, even if they contain spaces, so don't quote them. # Domain name. If you do not have one, the public IP of the machine. # For example: 198.51.100.1, or openvidu.example.com DOMAIN_OR_PUBLIC_IP= # OpenVidu PRO License OPENVIDU_PRO_LICENSE= # OpenVidu SECRET used for apps to connect to OpenVidu server and users to access to OpenVidu Dashboard OPENVIDU_SECRET= # Certificate type: # - selfsigned: Self signed certificate. Not recommended for production use. # Users will see an ERROR when connected to web page. # - owncert: Valid certificate purchased in a Internet services company. # Please put the certificates files inside folder ./owncert # with names certificate.key and certificate.cert # - letsencrypt: Generate a new certificate using letsencrypt. Please set the # required contact email for Let's Encrypt in LETSENCRYPT_EMAIL # variable. CERTIFICATE_TYPE=selfsigned # If CERTIFICATE_TYPE=letsencrypt, you need to configure a valid email for notifications LETSENCRYPT_EMAIL=user@example.com ... ``` -------------------------------- ### Download and Run OpenVidu Pro Installation Script Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/deployment/pro/on-premises.md This command downloads the latest OpenVidu Pro installation script and executes it. It will install all required files into the 'openvidu' folder. ```bash curl https://s3-eu-west-1.amazonaws.com/aws.openvidu.io/install_openvidu_pro_latest.sh | bash ``` -------------------------------- ### OpenVidu Basic Node.js Server Setup Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/application-server/openvidu-basic-node.md Initializes the Express application, configures CORS, and sets up the OpenVidu client with connection details. ```javascript var cors = require("cors"); var app = express(); // Environment variable: PORT where the node server is listening var SERVER_PORT = process.env.SERVER_PORT || 5000; // Environment variable: URL where our OpenVidu server is listening var OPENVIDU_URL = process.env.OPENVIDU_URL || 'http://localhost:4443'; // Environment variable: secret shared with our OpenVidu server var OPENVIDU_SECRET = process.env.OPENVIDU_SECRET || 'MY_SECRET'; // Enable CORS support app.use( cors({ origin: "*", }) ); var server = http.createServer(app); var openvidu = new OpenVidu(OPENVIDU_URL, OPENVIDU_SECRET); // Serve application server.listen(SERVER_PORT, () => { console.log("Application started on port: ", SERVER_PORT); console.warn('Application server connecting to OpenVidu at ' + OPENVIDU_URL); }); ``` -------------------------------- ### Start broadcast Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/components/openvidu-call.md Starts broadcasting an OpenVidu session to a specified URL. ```APIDOC ## POST /broadcasts/start ### Description Starts broadcasting an OpenVidu session to a given URL. ### Method POST ### Endpoint https://localhost:5000/broadcasts/start ### Headers Authorization: Basic `EncodeBase64(CALL_USER:)`. Only if is `CALL_PRIVATE_ACCESS='ENABLED'` ### Request Body - **broadcastUrl** (string) - Required - The URL where the broadcast will be sent. ### Request Example ```json { "broadcastUrl": "your_broadcast_url" } ``` ### Response #### Success Response (200 OK) - **id** (string) - The ID of the broadcast. - **status** (string) - The status of the broadcast (e.g., "STARTED"). - **broadcastAvailable** (boolean) - Indicates if the broadcast is available. #### Response Example ```json { "id": "broadcast_id", "status": "STARTED", "broadcastAvailable": true } ``` ``` -------------------------------- ### Start Broadcast (URL) Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/api/openvidu-java-client/io/openvidu/java/client/OpenVidu.html Starts the broadcast of a session to a specified URL. ```APIDOC ## startBroadcast(String sessionId, String broadcastUrl) ### Description Starts the broadcast of a Session. ### Method Not specified (Java method call) ### Parameters #### Path Parameters - **sessionId** (String) - Required - The ID of the session to broadcast. - **broadcastUrl** (String) - Required - The URL to broadcast the session to. ``` -------------------------------- ### Create Docker Image for OpenVidu Hello World Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/tutorials/openvidu-hello-world.md Build the Docker image for the openvidu-hello-world application using the provided `create_image.sh` script. This script utilizes the `openvidu-basic-node` as the application server. ```bash ./create_image.sh openvidu/openvidu-hello-world-demo:X.Y.Z ``` -------------------------------- ### Download and Run Media Node Installation Script Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/deployment/pro/on-premises.md Download and execute the latest OpenVidu Media Node installation script. This script installs all required files into the 'kms' folder. ```bash curl https://s3-eu-west-1.amazonaws.com/aws.openvidu.io/install_media_node_latest.sh | bash ``` -------------------------------- ### Run the Ruby Application Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/application-server/openvidu-basic-ruby.md Start the Sinatra-based OpenVidu application server. ```bash ruby app.rb ``` -------------------------------- ### Manually Start and Stop Recording (Node.js) Source: https://github.com/openvidu/openvidu.io-docs/blob/master/docs/advanced-features/recording.md For sessions with `RecordingMode.MANUAL`, you can start and stop recordings using the `startRecording` and `stopRecording` methods. You can override default properties or add new ones when starting. ```javascript var recording; // Starts recording openvidu.startRecording(sessionId, { name: "MY_RECORDING_NAME" }) .then(response => recording = response) .catch(error => console.error(error)); // Stops recording openvidu.stopRecording(recording.id) .then(response => recording = response) .catch(error => console.error(error)); ```