# PRESTOplay for Web Apps > PRESTOplay for Web Apps is Castlabs' player SDK for building video streaming applications in web browsers, on Chromecast, and on smart TVs. These files cover its documentation. The full text of every page, in one file: [llms-full.txt](llms-full.txt) ## PRESTOplay for Web Apps ### Setup - [Getting started](getting-started.txt): Install the SDK from NPM, import components, create a player, and start playback. - [Without a bundler](without-a-bundler.txt): Load the SDK with script tags instead of a JavaScript bundler. - [Components](components.txt): SDK components (DASH, HLS, Smooth Streaming, AES-128 HLS, and more) and which ones to import. - [License](license.txt): Castlabs license keys, domain locking, viewer IDs, and license verification. ### Playback and configuration - [Player basics](player-basics.txt): Minimal playback UI and common PlayerConfiguration options: source, stream type, start time, volume, and muted. Includes React integration. - [Player configuration](player-configuration.txt): PlayerConfiguration options for streaming and buffering, retries, low latency, and autoplay. - [Player surface](player-surface.txt): The video element and its container div, used to attach overlays such as subtitles and ads. - [Audio player](audio-player.txt): Audio-only playback with an audio element, including custom controls and limitations. - [Events](events.txt): HTML5 media events and PRESTOplay events (clpp.events), and how to add and remove listeners. - [Errors](errors.txt): The Error object, event-based and promise-based error handling, common browser playback errors, and network retry errors. ### DRM and licensing - [DRM](drm.txt): DRM overview: the built-in DRM environments (DRMtoday, DRMtoday Onboard, header-based, Verimatrix VCAS Ultra) and custom environments, each on its own page, plus CDM configuration, multiple environments, and the EME API. - [DRMtoday](drm-drmtoday.txt): Play DRM-protected content with the preconfigured DRMtoday environment: the DRMtoday and DRMtoday_STAGING environments and their customData properties. - [DRMtoday Onboard](drm-drmtoday-onboard.txt): Get licenses from a DRMtoday Onboard server on a private network, such as on a plane or ship: the cl.onboard component and its customData properties. - [Header-based DRM](drm-header.txt): Integrate a custom license server with the header-based DRM environment: license URLs, custom request headers, and robustness levels. - [Verimatrix VCAS Ultra](drm-verimatrix.txt): Play content protected with Verimatrix VCAS Ultra: the cl.verimatrix component and its customData properties. - [Custom DRM environment](drm-custom.txt): Register a custom DRM environment with drm.DrmEnvironment for full control over license acquisition. - [Persistent DRM licenses](persistent-licenses.txt): Store and remove persistent DRM licenses, with or without a player instance, and use custom session storage. - [Customizing license requests](drm-modifiers.txt): Customize DRM license and certificate requests and responses with modifiers: auth tokens, custom payloads, wrapped responses, and FairPlay content IDs. ### Content features - [Tracks and languages](tracks.txt): Initial audio and text language selection, and switching tracks during playback. - [Subtitles](subtitles.txt): Subtitle overview: text displayer setup and CEA-608 captions, with one page each for TTML, SMPTE-TT, and IMSC1, WebVTT and SubRip (SRT), side-loaded text tracks, and text displayers. - [TTML, SMPTE-TT, and IMSC1](subtitles-ttml.txt): TTML, SMPTE-TT, and IMSC1 subtitles with the cl.ttml module: supported attributes, parser hints for legacy pixel-based manifests, and SMPTE-TT over HLS on Safari. - [WebVTT and SRT](subtitles-webvtt.txt): WebVTT and SubRip (SRT) subtitles with the cl.vtt module: supported features, side-loading SRT files, and SRT conversion limitations. - [Side-loaded text tracks](subtitles-sidecar.txt): Add side-loaded (sidecar) subtitle files that are not in the manifest with remoteTextTracks. - [Text displayers](subtitles-displayers.txt): Render subtitles with the HTML text displayer (cl.htmlcue) or the native text displayer: setup, style priority, font size, and text style options. - [Thumbnails](thumbnails.txt): Thumbnails plugin: DASH, HLS, single image, grid, WebVTT, and BIF formats, configuration, and preloading. - [Common media data](common-media-data.txt): Configure Common Media Client Data (CMCD, CTA-5004) request metadata. - [Low latency and fast zapping](low-latency.txt): Low-latency live playback (lowLatencyMode, ABR tuning, clock sync, and live edge) and fast zapping between live channels. ### Playlists - [Playlist](playlist.txt): Playlist plugin for sequential playback of multiple items, including mixed HLS and DASH. - [MC playlist](mc-playlist.txt): Experimental McPlaylist: faster switching between live channels by preloading neighboring items. - [SC playlist](sc-playlist.txt): Experimental ScPlaylist: continuous back-to-back playback across items with one controller, with timeline windows, modes, cropping, and cues. ### Platform integrations - [Chromecast](chromecast.txt): Chromecast support built on the Google Cast SDK: receiver and sender apps with the cl.cast.js component. - [Receiver app](chromecast-receiver.txt): Build a custom Chromecast web receiver app: background playback, tracks, and limitations. - [Sender](chromecast-sender.txt): Cast from a web sender app to PRESTOplay and other Web Receiver SDK receivers: events, limitations, and UI. - [Messaging](chromecast-messaging.txt): Send custom messages between Chromecast sender and receiver apps. - [Queuing](chromecast-queuing.txt): Queue APIs on the Chromecast receiver and sender: initialization, custom queues, and queue management. - [Cast playlist](chromecast-playlist.txt): CastPlaylist, a higher-level playlist API over the Cast queue, usable from the sender or receiver. - [AirPlay](airplay.txt): Stream HLS to AirPlay receivers with the AirPlay plugin, including DRMtoday with upfront authorization. - [Safari](safari.txt): Safari playback: native HLS by default, MSE for DASH and optionally HLS, and native HLS caveats. - [Smart TV](smart-tv.txt): Smart TV guidance for Samsung Tizen, LG webOS, Hisense VIDAA, and other platforms: polyfills, memory, suspend and resume, and limitations. - [Plugins](plugins.txt): Built-in plugins, and how to write and register a custom plugin. ### Ads and analytics - [Advertising](advertising.txt): The ads API, ad events, and ad UI rendering shared by all ad integrations, with one page per integration: Google IMA, Yospace, FreeWheel, and server-guided ad insertion (SGAI). - [Google IMA](advertising-ima.txt): Client-side ads with the Google Interactive Media Ads (IMA) plugin: VMAP and VAST ad tags, smart TVs, and iOS. - [Yospace](advertising-yospace.txt): Server-side ads with the Yospace plugin: Yospace SDK setup, sessions, and Yospace events. - [FreeWheel (beta)](advertising-freewheel.txt): Ads with the FreeWheel AdManager plugin (beta): SDK setup and ad pod configuration. - [Server-guided ad insertion (SGAI)](sgai.txt): Server-guided ad insertion (SGAI) with HLS interstitials and DASH alternative MPDs: configuration, Safari support, and the playback session ID. - [Analytics](analytics.txt): Analytics plugins for Conviva, NPAW (Youbora), Broadpeak, and Mux Data, with one page per plugin. - [Conviva](analytics-conviva.txt): Report playback metrics to Conviva with the Conviva plugin: Conviva Core SDK setup and player configuration. - [NPAW](analytics-npaw.txt): Report playback metrics to NPAW (Youbora) with the NPAW plugin: SDK installation, configuration, custom errors and events, App Analytics, and error filters. - [Broadpeak](analytics-broadpeak.txt): Broadpeak SmartLib analytics and server-side ad insertion (SSAI) tracking with the Broadpeak plugin: installation, configuration, session options, and ad events. - [Mux Data](analytics-mux-data.txt): Report playback metrics to Mux Data with the Mux Data plugin: SDK installation, configuration, option overrides, and custom events. ### Reference - [Migration guide](migration.txt): Changes to make when upgrading PRESTOplay for Web Apps between versions (v6.1 to v6.2). - [Changelog](changelog.txt): New features, changes, and fixes in each web SDK release. ## Shared concepts ### Core concepts - [Thumbnails](../thumbnails.txt): Thumbnail formats, DASH and HLS signaling, side-loaded tracks, and authoring recommendations for all SDKs. - [Common media data](../common-media-data.txt): Common Media Client Data (CMCD, CTA-5004) and Common Media Server Data (CMSD, CTA-5006) for cooperation between player and CDN. - [Server-guided ad insertion (SGAI)](../sgai.txt): Server-guided ad insertion (SGAI) concepts: HLS interstitials and DASH alternative MPDs. - [Glossary](../glossary.txt): Definitions of DRM and streaming terms used in this documentation. ## Code samples - [Code samples llms.txt](https://raw.githubusercontent.com/castlabs/prestoplay-web-code-samples/main/llms.txt): Runnable PRESTOplay for Web Apps samples, one self-contained HTML page each, with the core concepts and an index of the samples.