About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
Fullscreen functionality
Third party player controls should implement the fullscreen functionality on the client side with the HTML5 Fullscreen API.
Necessary steps
- switch your embed container to fullscreen mode with HTML5 FullScreen API
- handle the iframe size accordingly
- IBM Video Streaming embed will adopt to the resized iframe size responsively
Example
Javascript
var fullScreenBtn = document.getElementById('fullScreenBtn');var container = document.getElementById('Container');document.addEventListener("fullscreenchange",changeHandler);document.addEventListener("webkitfullscreenchange",changeHandler);document.addEventListener("mozfullscreenchange",changeHandler);document.addEventListener("MSFullscreenChange", changeHandler, false);// trigger fullscreen change on our custom button click
HTML
<div id="Container"><iframeid="UstreamIframe"width="100%" height="100%"src="https://video.ibm.com/embed/recorded/131906526?hideFullscreen"frameborder="0"allowfullscreenreferrerpolicy="no-referrer-when-downgrade">
CSS
#Container {position: relative;width: 640px;height: 390px;}#Container.fullscreen {width: 100%;height: 100%;