startShareVideo with IFrame API

Hello all,When using api.executeCommand(‘startShareVideo’, url). What should happen?I assume the video at “URL” Should play? This is not working for me:



Any console log errors? Are you doing that after joining the meeting?

No jitsi errors in the console. We also used it with our in-house Jitsi server.
This is HTML page with Iframe API we’re using to test api.executeCommand(‘startShareVideo’, URL).
my question is: Should the page in the URL link load when the participant joins the meeting?

It is like clicking the button from the toolbar about sharing a video link (youtube or not) and all of the rest of the participants will start seeing it.
So if you haven’t joined the conference yet (no such event received from the API) that command cannot work.

I’m clicking and joining the conference with more than one participant. Still, no video gets displayed. I assume this is supposed to be like “Share video” from the setting menu. BTW I changed the URL link but that did not help.

I just tested it with and it works.
Using this example jitsi-meet/api.html at master · jitsi/jitsi-meet · GitHub
Just adding:

api.addListener('videoConferenceJoined', () => {
    api.executeCommand('startShareVideo', '');

Thank you. Much appreciated @damencho . its working now
I guess the url link must be *.mp4 link, not youtube standard links

Youtube link would typically work, but interestingly it does indeed fail if triggered using startShareVideo.

Console log shows CORB errors:

This can be tested out here: JSFiddle

YouTube link works as expected from the same IFrame if started using “Share a YouTube video”.


I see the same issue on alpha, but other than failure notification I also see “Video joined the meeting” and “Video left the meeting” notifications on alpha which is strange. Is that expected? (Test case using alpha: JSFiddle )

Hey, @Hristo_Terezov you were checking stuff around headers recently, do you have an idea?

@shawn @Shahir This is a bug, we will look into fixing it. If you are opening and using the iframeAPI pass just the string ‘cvh0nX08nRw’ and it will work. But according to the docs this should be the whole link URL, so we will try to fix it these days.
If you start using it with ‘cvh0nX08nRw’ , if we change/fix it this will stop working :slight_smile:

1 Like

@damencho Thx.