Migration guide¶
This guide covers the API changes for PRESTOplay for web releases that required integration changes. Find your upgrade path below.
Migrating from v6.1 to v6.2¶
Version 6.2 simplified the player surface configuration, moved text parsers into independent components, and dropped Internet Explorer 11 support.
Player surface¶
Version 6.2 removed several player surface configuration fields from
PlayerSurfaceConfiguration to simplify common scenarios while
keeping the API flexible:
moveCssToContainer— CSS now moves from the media element to the container by default. If you provide your own container element, the SDK doesn’t move it.containerTag— the SDK always creates a<div>. If that isn’t suitable, provide your own container element.mediaTag— the SDK no longer creates a media element. Provide the media element to the player constructor, since it’s the most crucial part of a player.controls— removed as a consequence of removingmediaTag, since this property was only added during media element creation.css— to make CSS management more predictable, the SDK always uses classes defined in its stylesheet, consistent with other modules. You can still extend the stylesheet for your needs.
The SDK also exports IPlayerSurface to simplify DOM interactions.
See Player surface for the current API.
Subtitles¶
Text parsers moved to independent components. To enable one, import the script and register the component:
<script src="cl.ttml.js"></script> <script> player.use(clpp.ttml.TtmlComponent); </script>
<script src="cl.vtt.js"></script> <script> player.use(clpp.vtt.VttComponent); </script>
The default base font size changed to 7% of the container height (was 5%), and the background color of TTML cues inside a region changed to transparent (was black). To restore the previous behavior:
const config = { textStyle: { backgroundColor: "black", fontSizePercent: 0.05, }, };
If you use the HLS-SMPTE plugin (
clpp.hlssmpte.min.js), register the TTML component first (see above).The TTML text parser is now compatible with TTML v1 and converts pixel sizes to percentages or
emunits to build responsive layouts. See Subtitles for details.box-sizing: border-box;was added to the.clpp-text-cue-regionCSS class, andvertical-align: top;was removed from.clpp-container.The
enableEnhancedSubtitleManageroption was removed fromPlayerConfiguration. UseenableHtmlCueinstead.The native text displayer always displays cues at bottom-middle.
Internet Explorer 11 support¶
Due to consistently low usage, the PRESTOplay team discontinued Internet Explorer 11 support with the 6.2.0 release. Maintenance support for Internet Explorer 11 continued for six months (through 01 May 2022) via 6.1.x releases, after which the team focused development on modern playback features and experiences.