The recording RTMP plugin can be used to record the audio and video from any conference. Internally, it sends the media through RTMP to a server that support these kind of streams. It can use RTMP or RTMPS, but it's strongly recommended to use RTMPS.
It can be configured in two modes:
-
Dynamic RTMP URI: Each time the user starts a recording, they will be asked to enter the RTMP URI. It's flexible, but it could be annoying for the user if they always use the same address.
-
Static RTMP URI: The URI is defined in a configuration file and can only be changed by an administrator. When the user click on the plugin button, the recording will start automatically without the need for entering any additional data.
For using this plugin you will need to the following version of Pexip Infinity:
Plugin Version Pexip Infinity Version v1.x.x v35 or newer v2.x.x v38.1 or newer
We have a configuration file to choose between the two modes that we commented before. The configuration file could be found in the next paths:
./public/config.json
: Path if you download the source code and run it in developer mode../recording-rtmp/config.json
: Path in case you download the precompiled package.
If you want to run the plugin with dynamic RTMP URI you should remove the
recordingUri
parameter from the configuration file:
{
"recordingUri": ""
}
In case you want to define a static RTMP URI, you only have to define it in the file:
{
"recordingUri": "rtmps://example-rtmp.pexip.com/my-recordings"
}
You have a third alternative and it is to use the variable displayName
in the
configuration file:
{
"recordingUri": "rtmps://example-rtmp.pexip.com/my-recordings/{{ displayName }}"
}
The reference will be changed at runtime in a URL encoded format, e.g.
displayName = "John Smith"
recordingUri = "rtmps://example-rtmp.pexip.com/my-recordings/John%20Smith"
The id
of the plugin in the manifest should be recording-rtmp
to support the
new Widget concept.
In addition, because of the tightened security in v37,
"sandboxValues": ["allow-same-origin"]
needs to be added to the plugin config
in the manifest.
More information about the above change can be found here: https://developer.pexip.com/docs/infinity/web/plugins/webapp-3/sandbox-security
Your manifest will now look something like the following.
{
...
"plugins": [
{
"id": "recording-rtmp",
"src": "...",
"sandboxValues": ["allow-same-origin"]
}
]
}
If you want to test the plugin in your Pexip Infinity deployment, you will need
to configure the infinityUrl
in a .env
file. You can create the file from
the .env.example
file that you can find in the root of the project.
$ cp .env.example .env
And now edit the file to set the infinityUrl
variable with the URL of your
Pexip Infinity deployment:
VITE_INFINITY_URL=https://your-pexip-infinity-url
When running the plugin in development mode, you can edit the configuration file
./dev-public/config.json
to set the recordingUri
parameter.
- Install all the dependencies:
$ npm i
- Run the dev environment:
$ npm start
The plugin will be served from https://localhost:5173, but you should access it thought the Web App 3 URL. You have more information about how to configure your environment in the Developer Portal: Setup guide for plugin developers.
To create a package, you will need to first install all the dependencies:
$ npm i
And now to create the package itself:
$ npm run build
Congrats! Your package is ready and it will be available in the dist
folder.
The next step is to create a Web App3 branding and copy dist
into that
branding.
If you want to know more about how to deploy your plugin in Pexip Infinity, check our Developer Portal.