From a6a6d2992eef739c2675553c8e99b0d35b30a180 Mon Sep 17 00:00:00 2001 From: damencho Date: Thu, 14 Jan 2016 13:30:27 -0600 Subject: [PATCH] Adds helper function to obtain large video id from tests. --- modules/UI/UI.js | 8 ++++++++ modules/UI/videolayout/VideoLayout.js | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/modules/UI/UI.js b/modules/UI/UI.js index 0ca3b0d60..32fa5eae2 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -790,4 +790,12 @@ UI.onStartMutedChanged = function () { SettingsMenu.onStartMutedChanged(); }; +/** + * Returns the id of the current video shown on large. + * Currently used by tests (troture). + */ +UI.getLargeVideoID = function () { + return VideoLayout.getLargeVideoID(); +}; + module.exports = UI; diff --git a/modules/UI/videolayout/VideoLayout.js b/modules/UI/videolayout/VideoLayout.js index 241af183b..018c6cc8e 100644 --- a/modules/UI/videolayout/VideoLayout.js +++ b/modules/UI/videolayout/VideoLayout.js @@ -1027,6 +1027,14 @@ var VideoLayout = { isLargeContainerTypeVisible (type) { return largeVideo && largeVideo.state === type; + }, + + /** + * Returns the id of the current video shown on large. + * Currently used by tests (troture). + */ + getLargeVideoID () { + return largeVideo.id; } };