|
@@ -366,6 +366,30 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
366
|
366
|
return iframe.contentWindow.document.getElementById('largeVideo');
|
367
|
367
|
}
|
368
|
368
|
|
|
369
|
+ /**
|
|
370
|
+ * Getter for participant specific video element in Jitsi Meet.
|
|
371
|
+ *
|
|
372
|
+ * @param {string|undefined} participantId - Id of participant to return the video for.
|
|
373
|
+ *
|
|
374
|
+ * @returns {HTMLElement|undefined} - The requested video. Will return the local video
|
|
375
|
+ * by default if participantId is undefined.
|
|
376
|
+ */
|
|
377
|
+ _getParticipantVideo(participantId) {
|
|
378
|
+ const iframe = this.getIFrame();
|
|
379
|
+
|
|
380
|
+ if (!iframe
|
|
381
|
+ || !iframe.contentWindow
|
|
382
|
+ || !iframe.contentWindow.document) {
|
|
383
|
+ return;
|
|
384
|
+ }
|
|
385
|
+
|
|
386
|
+ if (typeof participantId === 'undefined' || participantId === this._myUserID) {
|
|
387
|
+ return iframe.contentWindow.document.getElementById('localVideo_container');
|
|
388
|
+ }
|
|
389
|
+
|
|
390
|
+ return iframe.contentWindow.document.querySelector(`#participant_${participantId} video`);
|
|
391
|
+ }
|
|
392
|
+
|
369
|
393
|
/**
|
370
|
394
|
* Sets the size of the iframe element.
|
371
|
395
|
*
|