Media Pipelines

A media pipeline is the core entity in Kurento that holds a collection of media elements. It is responsible for managing the flow of multimedia streams within Kurento. Pipelines provide the infrastructure for media elements to be added, connected, and manipulated.

Example: Creating a Media Pipeline in JavaScript

const kurento = require('kurento-client');

// Connect to the Kurento Media Server
kurento('ws://localhost:8888/kurento', function(error, client) {
    if (error) return console.error("Cannot find Kurento Media Server at ws://localhost:8888");

    // Create a media pipeline
    client.create('MediaPipeline', function(error, pipeline) {
        if (error) return console.error(error);

        console.log('Media Pipeline created:', pipeline.id);
    });
});