Releases: aullman/opentok-layout-js
v5.4.0
v5.3.0
v5.1.0
v3.1.0
Adding a new way to use this library. The other way to use this library is to just use the getLayout()
method to get the layout data and position the elements yourself. getLayout()
takes an array of objects with a width and height property along with a big property indicating whether it should be treated as a bigger element. eg.
const layout = initLayoutContainer(options);
const boxes = layout.getLayout([
{
width: 640, // The native width of this element (eg. subscriber.videoWidth())
height: 480, // The native height of this element (eg. subscriber.videoHeight())
big: false // Whether to treat this element as a bigger element
}
]);
It will return an array of boxes which will be in the same order as the array you passed in. Each element in the array will look like:
{
width,
height,
top,
left
}
This is useful if you're eg. using a framework like React or Vue.js and you want to position the elements yourself instead of using the layout()
method.
v2.1.0
v2.0.0
v1.1.0
With a fixed Ratio you can run into a situation where we shrink the height of a row to account for wider elements. This change makes it that if you do that then other rows grow proportionally to take up the extra space. So you should always either take up the full height or the full width. There shouldn't be a situation where there is whitespace all the way around.
Before we didn't take up the full height
Now we notice that we can make the bottom row a bit taller to take up the extra space:
v1.0.0
Adding support to handle multiple different aspect ratios at the same time. So if eg. you have someone joining from a phone and someone with 640x480 and someone with 720p if you set fixedRatio then all of their respective ratios will be respected.
Also fixed an issue with the big layout where sometimes the big ones can end up smaller than the little ones if you have multiple big ones. Now I'm forcing the big ones to take up the whole bigPercentage, eg. 80% of the layout.
#34 for more details
version 0.1.0
Added common JS support.
no longer expose initLayoutContainer() on the global TB. instead, attach it directly to window in a globals evaluated context, and to the exports object in a CommonJS context
OT.initLayoutContainer() is still available for backwards compatibility reasons.
First bower version
Merge branch 'master' of https://github.com/aullman/opentok-layout-js Conflicts: bower.json package.json