jitsi / docker-jitsi-meet

Jitsi Meet on Docker
https://hub.docker.com/u/jitsi/
Apache License 2.0
3.07k stars 1.36k forks source link

not getting recordingLinkAvailable event #1533

Open iasbm opened 1 year ago

iasbm commented 1 year ago

We have installed JITSI (including JIBRI) on K8S cluster and we are able to successfully record the calls. But as per recordingLinkAvailable mentioned here we have registered for the event recordingLinkAvailable and expect to receive with notification with Recorded file link. But we are not getting any notification for that.
Our customized JIBRI configuration in values.custom.yaml is

### JIBRI specific configurations
jibri:
  enabled: true

  replicaCount: 1

  # If replicate count > 1, need set on true. Persistent Jibri services turn off
  singleUseMode: false

  # Add mode deployment or statefulset
  mode: "statefulset"

  # Persistence pvc per pod
  persistence:
    enabled: false
    accessModes:
      - ReadWriteOnce

are we missing any further JIBRI config settings to be customized or do we need to write a finalize.sh to get that event notification. I think the finalizeScript.sh to let JIBRI execute the script, after every recording, to upload the file to our custom location by using that finalize.sh

So not sure why we are not getting the recordingLinkAvailable event triggered? Any help is appreciated.

damencho commented 1 year ago

Have you configured recordingSharingUrl in config.js? That is a service that based on a sessionID is returning the link for the recording, as service you need to implement?

damencho commented 1 year ago

That feature works when the tenant starts with 'vpaas-magic-cookie-'.

iasbm commented 1 year ago

i just took a look at https://github.com/jitsi/jitsi-meet/blob/master/config.js but i don't see any property like recordingSharingUrl for us to configure through configOverwrite option.

damencho commented 1 year ago

Yep this is something that was implemented exclusively for jaas and maybe that's why the docs are missing. As it also depends on the tenant of the meeting.

iasbm commented 1 year ago

Ok, thanks @damencho for insights. SO let me put my understanding....

  1. the recordingLinkAvailable event as mentioned here will get triggered only if we start the conference using JaaS Meeting using vpaas-magic-cookie- (i.e. 8x8.vc) as mentioned here? and configure recordingSharingUrl in config.js . Am i correct?
  2. But we intend to use our own K8S self-hosted JITSI with our custom domain as mentioned here . So if we want to use our K8S hosted custom domain based JITSI then the event notification of recordingLinkAvailable is not applicable. So in this case, if we want to upload the recorded file to our custom location (say our AWS s3) then we need create the Finalize.sh script to upload the recordings to our custom location.

To summarise the recordingLinkAvailable is not applicable for Custom Domain self hosted JITSi but applicable only if we use JaaS. Is my understanding correct?

damencho commented 1 year ago

It will work and for your domain if you use tenants named as the jaas one. Or you can modify the code and skip the jaas check in the logic there...

iasbm commented 1 year ago

ok we tried the option of naming our JITSI Tenant as JaaS one as follows... also we registered event Listener for recordingLinkAvailable With the below configuration we tried both the options of passing recordingSharingUrl attribute in configOverwrite and also commented out passing the recordingSharingUrl attribute as well But in both the cases we didn't get notification to our event listener for recordingLinkAvailable

Are we missing any config here ?

<JitsiMeeting
    roomName={localStorage.getItem("chatRoomId")}
    appId={"vpaas-magic-cookie-rest of the id"}
    domain={"http://staging-jitsi.mycustomdomain.com"}
    // parentNode
    getIFrameRef={handleJaaSIFrameRef}
    jwt={localStorage.getItem("jitsi_token")}
    interfaceConfigOverwrite={{
        SHOW_CHROME_EXTENSION_BANNER: false,
        SHOW_BRAND_WATERMARK: false,
        SHOW_JITSI_WATERMARK: false,
        SHOW_WATERMARK_FOR_GUESTS: false,
        SHOW_POWERED_BY: false,
        SHOW_PROMOTIONAL_CLOSE_PAGE: false,
        MOBILE_APP_PROMO: false,
    }}
    configOverwrite={{
        startWithAudioMuted: true,
        prejoinPageEnabled: false,
        recordingSharingUrl: "https://devdocker1-api.mycustomdomain.com/api/sessionservice.saveRecording",
        toolbarButtons: [
            "chat",
            "camera",
            "fullscreen",
            "hangup",
            "invite",
            "microphone",
            "mute-everyone",
            "mute-video-everyone",
            "recording",
            "select-background",
            "settings",
        ],
    }}
    onReadyToClose={handleReadyToClose}
    onApiReady={externalApi => handleApiReady(externalApi)}
/>
damencho commented 1 year ago

You cannot pass that config with URL as overwrite, that config is not whitelisted to be overwritten https://github.com/jitsi/jitsi-meet/blob/master/react/features/base/config/configWhitelist.ts

You need to configure it on the server-side in the config.js there.

iasbm commented 1 year ago

We have deployed JITSI HELM CHART on K8S cluster and not sure if we can do this kind of overwrite thorough values.custom.yaml as part of K8S manifests. So unless i am mistaken, the option of server side Overwriting in configWhitelist.ts is out of option for by the looks of it given our K8S deployment of JITSI Helm charts. But happy to be corrected or any other suggestion given that we deployed JITSI HELM chart on k8S.

Worst case i think we have to createfinalize.sh to create shell script to read and upload the files from recordingDir to location to our custom location. But appreciate any other suggestions pls.

aaronkvanmeerten commented 1 year ago

The helm chart in jitsi-contrib/ is definitely just a starting point for a basic jitsi deployment. For the customizations you have in mind it should be fairly simple to fork the repo and add an additional ConfigMap to web/configmap.yaml with your additions, and add to the web/deployment.yaml as a volume mount to /config/custom-config.js which gets appended to the bottom of the config.js on each web deployment as seen here: https://github.com/jitsi/docker-jitsi-meet/blob/35685424e14d44102b03e4897e7188f560e01d91/web/rootfs/etc/cont-init.d/10-config#L105

aaronkvanmeerten commented 1 year ago

Ah, and for those interface_config.js overrides, you'd want to mount another ConfigMap at /config/custom-interface_config.js