From 59147f059db0e4902d68fa82732c59207a8b1549 Mon Sep 17 00:00:00 2001 From: hristoterezov Date: Thu, 6 Aug 2015 19:01:21 -0500 Subject: [PATCH] Adds a parameter to API constructor that enables film strip only mode. --- doc/api.md | 5 +++++ external_api.js | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/api.md b/doc/api.md index d52fc0e06..139729904 100644 --- a/doc/api.md +++ b/doc/api.md @@ -29,6 +29,11 @@ constructor. ``` If you don't specify room the user will enter in new conference with random room name. +You can enable the "film strip only" mode(only the small videos are visible) by setting 6th parameter to ```true```: +```javascript + var api = new JitsiMeetExternalAPI(domain, room, width, height, htmlElement, true); +``` + Controlling embedded Jitsi Meet Conference ========= diff --git a/external_api.js b/external_api.js index 91996e08e..a13568d9c 100644 --- a/external_api.js +++ b/external_api.js @@ -23,9 +23,12 @@ var JitsiMeetExternalAPI = (function() * @param width width of the iframe * @param height height of the iframe * @param parent_node the node that will contain the iframe + * @param filmStripOnly if the value is true only the small videos will be + * visible. * @constructor */ - function JitsiMeetExternalAPI(domain, room_name, width, height, parentNode) { + function JitsiMeetExternalAPI(domain, room_name, width, height, parentNode, + filmStripOnly) { if(!width || width < MIN_WIDTH) width = MIN_WIDTH; if(!height || height < MIN_HEIGHT) @@ -49,6 +52,9 @@ var JitsiMeetExternalAPI = (function() if(room_name) this.url += room_name; this.url += "#external=true"; + if(filmStripOnly) + this.url += "&config.filmStripOnly=true"; + JitsiMeetExternalAPI.id++; this.frame = document.createElement("iframe");