I’m using jitsi by API. How can i get approach to tag video inside of iframe.
const iframe = document.querySelector(‘iframe’);
const innerDoc = iframe.contentWindow.document;
innerDoc.getElementById(‘largeVideo’).requestPictureInPicture();
I used this code, and i’ve got an error:
DOMException: Blocked a frame with origin “my site link” from accessing a cross-origin frame.
kkd
March 3, 2023, 1:14pm
2
It’s protection from browser and you can nit manipulate any element inside iframe.
If you host your Jitsi you can post message to sever for element manipulation.
Checkout this one
yes it is possible. here is how you can do:
//// On your frontend server use a function like this
function postMsg(data){
var iframeWin = document.getElementById("jitsiConferenceFrame0").contentWindow;
iframeWin.postMessage(data, "https://yourjitsiserver");
}
//// on jitsi server add following function in the index.html file ( or include sepearte js file)
function receivedMessage(evt) {
console.log("message received");
console.log(evt.data);
if (evt.origin !== "https://yourfro…
Thanks for response. You saved my time. Have a good day!