Is possible to edit "iframe" element?

Hello, I’m doing some tests with a video-call plugin ‘Jitsi’.

One of the ways to use this is via iframe. I’m trying to edit the iframe to remove the “hang up” button. Because in my site there’s already a button to stop the call and end the session with the other users, so I need to remove this one.

I have created a demo in jsfiddle

Any idea? I have tried many examples that I have found in the internet but nothing seems to work, because the button is a div class element.

Thanks in advance!

Hi @Raiikou, no this is not possible I’m afraid. If the iframe has the same origin as the parent document, you can access its DOM via the contentDocument property once it is loaded:

$('#my-iframe').on('load', function () {
  $('.something', this.contentDocument).hide()
})

… but with the external jitsi domain this won’t be allowed and the contentDocument will be null.

1 Like