From ec22329408080ec178b0a6fb6887d0fae0cc8472 Mon Sep 17 00:00:00 2001 From: Leonard Kim Date: Fri, 30 Jun 2017 10:40:55 -0700 Subject: [PATCH] ref(local-video): generate html instead of hardcoding in filmstrip This would better mimic React behavior where each component has its own markup, instead of relying on markup existing elsewhere. --- modules/UI/videolayout/LocalVideo.js | 26 ++++++++++++++++++- .../filmstrip/components/Filmstrip.web.js | 18 +------------ 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/modules/UI/videolayout/LocalVideo.js b/modules/UI/videolayout/LocalVideo.js index d69a22e21..11ee2e5e0 100644 --- a/modules/UI/videolayout/LocalVideo.js +++ b/modules/UI/videolayout/LocalVideo.js @@ -17,7 +17,10 @@ const TrackEvents = JitsiMeetJS.events.track; function LocalVideo(VideoLayout, emitter) { this.videoSpanId = "localVideoContainer"; - this.container = $("#localVideoContainer").get(0); + + this.container = this.createContainer(); + $("#filmstripLocalVideo").append(this.container); + this.localVideoId = null; this.bindHoverHandler(); if(config.enableLocalVideoFlip) @@ -46,6 +49,27 @@ function LocalVideo(VideoLayout, emitter) { LocalVideo.prototype = Object.create(SmallVideo.prototype); LocalVideo.prototype.constructor = LocalVideo; +LocalVideo.prototype.createContainer = function () { + const containerSpan = document.createElement('span'); + containerSpan.classList.add('videocontainer'); + containerSpan.id = this.videoSpanId; + + containerSpan.innerHTML = ` +
+ + +
+
+
+
+
`; + + return containerSpan; +}; + /** * Sets the display name for the given video span id. */ diff --git a/react/features/filmstrip/components/Filmstrip.web.js b/react/features/filmstrip/components/Filmstrip.web.js index 9c345ae56..c0e1fe5d8 100644 --- a/react/features/filmstrip/components/Filmstrip.web.js +++ b/react/features/filmstrip/components/Filmstrip.web.js @@ -52,23 +52,7 @@ class Filmstrip extends Component { id = 'remoteVideos'>
- -
- -