When building OpenTok apps, there might be cases where you would like the videos inside a container to automagically resize to take up the largest resolution possible within the boundaries of their container. With layout container, an open sourced library available on github, you can do exactly that.
Want to see a live app that uses this layout container? Check out OpenTokRTC! Try typing “/focus” and “/unfocus” in the chat box to see additional functionalities of layout container.
To resize video elements, simply call “layout()” every time the number of video streams change (during streamCreated or streamDestroyed events). The “bigClass”, “bigPercentage”, and “bigFixedRatio” is set if you would like the ability to focus on a stream and size it bigger than the others.
**Update** Update new layout container url and changed content to reflect updated layout container