Closed bplaa-yai closed 7 years ago
We typically use the library in a player that is placed inside an iframe. Will it still work as expected in this mode?
The iframe case is similar to the full browser player case. I just tested the iframe sample with 2 different aspect ratios and it's working fine. Dynamically changing the iframe size also triggers ratio/size recalculations.
The setup and resizing code assumes that the player is using the full browser window by using window.inner dimensions. This PR uses the video element's or the canvas' size instead, to make dimensions and ratio calculations correct when the player is not using the full window.