UNPKG

rx-player

Version:
891 lines (793 loc) 134 kB
# Changelog ## v4.3.0 ### Features - Add the possibility to rely on `ManagedMediaSource` on iOS devices [#1562] - DASH: Implement DASH Thumbnail tracks by adding `renderThumbnail` and `getAvailableThumbnailTracks` API [#1496] - DRM: Add `keySystems[].wantedSessionTypes` `loadVideo` option to also initialize a DRM config for future contents, not just the current one [#1604] - Add `experimentalOptions.enableRepresentationAvoidance` option to `loadVideo` to enable our new Representation avoidance mechanism [#1523] ### Bug fixes - Tracks API do not return unplayable representations by default [#1599] - MULTI_THREAD: Fix `onmessageerror` being undefined on older devices [#1585] - MULTI_THREAD: Do not attempt to play audio and/or video media data in a Worker whose codec is not supported specifically in a Worker context (previous behavior led to some fatal errors on Edge with HEVC support) [#1664] - Compat: On "FREEZING" try to un-freeze regardless of if the wanted position was reached to fix a remaining Tizen (Samsung) infinite rebuffering issue [#1586] - MULTI_THREAD: Fix error not being thrown on manifest update [#1653] - DRM: check that ec-3 codec is supported when encrypted [#1657] - DRM: fix typo which prevented `MediaKeys` reusage on some devices including desktop browsers [#1615] - DRM: Only ask for `"persistent-license"` `MediaKeySession` (and not also for `"temporary"` license) when only a `keySystems[].persistentLicenseConfig` is communicated [#1604] - DRM: Fix reusage of some `keySystems[]` option changing when reusing a `MediaKeySystemAccess` with a different `keySystems[]` configuration [#1616] - DRM: Fix `KEY_UPDATE_ERROR` which was mistakenly inheriting the code `KEY_LOAD_ERROR` [#1670] - Fix minor memory leak when switching RepresentationStream through ABR [#1665] - On Tizen, fix infinite loading that may occur in some condition if both the audio and video segments have a gap at the expected initial position [#1637] - fix rare infinite rebuffering issues that may happen when updating tracks in a `newAvailablePeriods` event [#1643] - MULTI_THREAD: Fix potential leak when cleaning now inexistant Period [#1644] ### Other improvements - Compat: Limit long "FREEZING" issues on Tizen (samsung) by awaiting for browser action before seeking ourselves over a discontinuity [#1587] - DRM: Only reuse cached `MediaKeySystemAccess` if none is more wanted for the current content [#1591] - MULTI_THREAD: Some `LOADING` and `RELOADING` attempts may have taken more time than necessary due to a wrong "initial Period prediction", this is fixed [#1628] - Improve `FREEZING` work-arounds by reloading if our initial strategies do not give a result [#1523] - DRM: Reuse cache even if key system type given in API is not the same [#1611] - DEBUG_ELEMENT: Add buffer size estimate to debug buffer content graph [#1558] - DEBUG_ELEMENT: Add `hdr` information to video Representation [#1583] - Set LogFormat to `full` on RxPlayer's debug mode [#1625] - Avoid error log when stopping a stream with a pending `BufferGarbageCollector` buffer removal [#1684] - tests: Our performance-regression tests now run on all RxPlayer updates to better protect against performance regressions [#1630] - CI/tests: CI integration tests on Edge and windows [#1621] ## v4.2.0 (2024-10-17) ### Features - Add `cmcd` object to `loadVideo` options to enable CMCD (Common Media Client Data) [#1461, #1518] - Add `checkManifestIntegrity` `loadVideo` option as a temporary work-around when you suspect your packager or CDN to sometimes deliver corrupted data [#1471] - Add `contentProtections` to the `representations` of the tracks API to know if they're considered encrypted [#1505] - Add `filterPlayableRepresentations` property to audio and video tracks API to get information on ALL representations, even those that won't be played [#1501] - Add `LogFormat` static property to the `RxPlayer` to try improving on bug reports [#1469] - Experimentally re-export config in v4 (only intended for debugging matters) [#1510] - Add `keySystems[].reuseMediaKeys` option to `loadVideo` [#1520] ### Bug fixes - Detect cases where an encrypted media's codec is not supported specifically when the media is encrypted and prevent the playback of such contents [#1484] - Work-around the "hulu issue" seen on firefox 129 and 130 (`1911283` and `1912238` on bugzilla) which also impacted the RxPlayer [#1495, #1498] - Fix rare cases where the active Period would not be advertised by the RxPlayer [#1502] - Actually trigger a `BUFFER_FULL_ERROR` when `QuotaExceededError` mitigations after `appendBuffer` MSE calls don't work #1546 - Fix issues when handling a `QuotaExceededError` after an `appendBuffer` MSE call [#1546, #1559] - Directfile/Compat: Fix `startAt.fromLastPosition` handling on Safari when playing directfile contents [#1548] - DRM/Compat: Re-create MediaKeys for each content on Philips' NETTV, and `KSTB40XX` set-top boxes [#1515] - DRM/Compat: fix content not starting on Safari because key are never considered usable for a track [#1479, #1512] - DASH_WASM: fix `Label` element never being parsed [#1541, #1540] - Fix RxPlayer not being exposed in release bundles [#1542] - Consider `stpp.ttml` codec for text format [#1557] - Prevent very rare cases of infinite rebuffering after getting errors from calling the `SourceBuffer.prototype.appendBuffer` and `SourceBuffer.prototype.remove` MSE API [#1560, #1561] - MULTI_THREAD: Fix rare `CancellationError` error happening when reloading while a reload is pending. [#1528] - MULTI_THREAD: fix wrong Period considered as current in multi-Period DASH contents with the multi-thread feature [#1527] - MULTI_THREAD: Fix rare occurrences of infinite loading on constrained devices [#1556] - MediaCapabilitiesProber checks generateRequest like the RxPlayer DRM selection algorithm [#1575] - Fixes a MultiThread debug element memory leak [#1564] - Fix the SyncOrAsync util syncValue transfer [#1568] - Fix off by one issue in when relying on `keySystems[].maxSessionCacheSize` [#1565] ### Other improvements - DASH: provide a more precize calculation for the timeshift buffer depth [#1483] - Handle `hev1` codec and `hvc1` codecs as part of the same family of codecs when trying to check for compatibility between the two [#1499] - Better handle `QuotaExceededError` issue after `appendBuffer` MSE calls when `wantedBufferAhead` is set to `Infinity` [#1546] - Code: Forbid the direct usage of MSE and HTML5 media TypeScript type in profit of our own compatible ones to facilitate testing and the addition of platform-specific differences [#1397]. - Demo: Remove standalone demo as we never relied on it [#1473] - Scripts: Automatize official releases and CHANGELOG.md updating through a script [#1524] - Add version of the RxPlayer in the debug element [#1573] ## v4.1.0 (2024-07-08) ### Features - DASH: Implement `ContentProtection` references [#1439] ### Bug fixes - DASH: support absolute path in URL resolution with RFC 3986 implementation [#1443, #1440] - DASH: fix cases of blinking subtitles [#1416, #1424] - Fix precision issues of the `maxVideoBufferSize` API [#1421] - DASH: Prevent multiple loading of the same segment for some DASH low-latency contents [#1422] - DRM/Compat: on Edge test comprehensively KeySystems before considering them as usable [#1434] - DRM/DASH: Ignore `0x0` key id found in DASH initialization segments are they are often linked to unencrypted data. [#1466, #1458] - DRM/Compat: On the PlayStation 5, reload directly when a decryption key become unusable to prevent fatal errors [#1399] - MULTI_THREAD: Perform several actions so that our `MULTI_THREAD` experimental feature now works on older browser and on the Playstation 4 [#1401, #1402] - Directfile/Compat: On safari on iOS no longer stay stuck in buffering when `autoPlay` is set to `false` or not set and the video element has the attribute "playsinline" [#1408, #1390] - Directfile/compat: On safari mobile in directfile mode, do not stay in an infinite `LOADING` state if the `duration` is set to `NaN` (rare issue in a normally-unsupported multiple RxPlayer-per-media-element scenario) [#1393] - Fix RxPlay error messages not properly displaying in Chrome's inspector since Chrome 126 [#1474] ### Other improvements - Signal an error if multiple active RxPlayer are linked to the same media element [#1394] - Undetermined audio and text track language now have a `normalized` property equal to `"und"` for better ISO 639-3 compatibility [#1428] - MULTI_THREAD: The experimental `MULTI_THREAD` feature does not need a `dashWasmUrl` anymore nor compatibility to WebAssembly [#1384] - MULTI_THREAD: The `DEBUG_ELEMENT` feature now allows to display all debug information even under the "multithreading" mode [#1438] - Generate TypeScript declaration maps [#1412] - Do not rely on the `performance.now` API if not available [#1402] - DRM: Refactor MediaKeys attachment logic to simplify device support updates [#1357] - tests: use exponential backoff to speed up integration tests [#1389] - code: Rely on the TypeScript `type` keyword at type imports to be sure they have no code impact on our final build [#1365] - code: Reorganize core RxPlayer code into a `src/main_thread` and `src/core` respectively for main thread and worker code in a "multithread" mode [#1365] - code: Rely on the `prettier` and `rustfmt` formatting tools in the codebase [#1387] - build: remove dependency to `webpack` [#1435, #1425, #1420] - tests: migrate all tests to the `vitest` framework to simplify and unify test-related dependencies and test writing [#1444, #1445] ## v4.0.0 (2024-02-21) ### Changes - Create `"FREEZING"` player state for cases where the playback position is currently not advancing due to an unknown reason, to separate it from regular `"BUFFERING"`. [#1146] - The `RELOADING` player state (gettable through the `getPlayerState` and `playerStateChange` API) can now happen at any time to unlock playback. - Remove bitrate API: `getAvailableVideoBitrates`, `getAvailableAudioBitrates`, `setAudioBitrate`, `setVideoBitrate`, `getAudioBitrate`, `getVideoBitrate` in profit of the Representations lock APIs [#1144] - Remove max bitrate API: `setMaxVideoBitrate`, `setMaxAudioBitrate`, `getMaxVideoBitrate` and `getMaxAudioBitrate` methods as well as the `maxVideoBitrate` and `maxAudioBitrate` options in profit of the Representations lock APIs - Remove min bitrate API: `setMinVideoBitrate`, `setMinAudioBitrate`, `getMinVideoBitrate` and `getMinAudioBitrate` methods as well as the `minVideoBitrate` and `minAudioBitrate` options in profit of the Representations lock APIs - Remove track preferences API (methods: `getPreferredAudioTracks`, `getPreferredVideoTracks`, `setPreferredAudioTracks` and `setPreferredVideoTracks`, types: `IAudioTrackPreference`, `ITextTrackPreference` and `IVideoTrackPreference`) in profit of the new tracks API - Remove `getManualVideoBitrate` and `getManualAudioBitrate` in profit of the new Representations lock APIs - Replace `initialAudioBitrate` and `initialVideoBitrate` constructor options with a single `baseBandwidth` option, which better translates what this option is actually doing and allows for future optimizations on our side. [#1155] - Rename `audioTrackSwitchingMode` loadVideo option into `defaultAudioTrackSwitchingMode` [#1030] - Remove `manualBitrateSwitchingMode` loadVideo option to instead rely on the `switchingMode` property of each `lockVideoRepresentations` and `lockAudioRepresentations` calls. [#1030] - Remove `audioBitrateChange` and `videoBitrateChange` events in profit of the new `audioRepresentationChange` and `videoRepresentationChange` events - Remove `availableAudioBitratesChange` and `availableVideoBitratesChange` events. Those are less needed with the new Representations lock API and can be mostly replicated through the `audioTrackChange` and `videoTrackChange` events - "Flatten" the `transportOptions` loadVideo options by putting all its inner properties directly at the top level of loadVideo options, to simplify its documentation and discoverability [#1149] - Remove `limitVideoWidth` constructor option in profit of the more configurable `videoResolutionLimit` constructor option - Rename `networkConfig` into `requestConfig` and re-organize its inner properties to pave the way for future request-related APIs. - Remove `stopAtEnd` `loadVideo` option and don't automatically stop when reaching the end by default. This behavior can be counter-intuitive and can be very easily implemented by the application. - Remove `decipherabilityUpdate` event as it appeared to be not easily exploitable and exposed internal logic too much [#1168] - Remove `getUrl` method in profit of the more powerful `getContentUrls` - Impossibility to play the content due to unsupported audio and/or video tracks now triggers an error with the `MANIFEST_INCOMPATIBLE_CODECS_ERROR` instead of `MANIFEST_PARSE_ERROR` - Remove methods: `getManifest`, `getCurrentAdaptations` and `getCurrentRepresentations`, as they reveal the RxPlayer's internals too much - The `"smooth"` transport now needs to be communicated the URL of the Manifest directly (previously, it was possible to redirect it to a XML or JSON file first due to Canal+ legacy reasons). - Remove the `supplementaryTextTracks` loadVideo option. You can use the `TextTrackRenderer` tool if you wish to diplay external subtitles on top of your content. - Rename `maximumBufferTime` in `positionUpdate` events to `maximumPosition` - Remove `getVideoPlayedTime` and `getVideoLoadedTime` methods. Their names was very confusing and can be re-implemented relatively easily using the media element's buffered property. - Rename `getVideoDuration` to `getMediaDuration`, to avoid confusion with the video track's duration. - Rename `getVideoBufferGap` to `getCurrentBufferGap`, to avoid confusion with the "buffer gap" specific to the video track. - Remove image-related API: `supplementaryImageTracks` `loadVideo` option, `imageTrackUpdate` event, `getImageTrackData` method. Those are better handled by an application. The `parseBifThumbnails` tool is still available. - Replace `keySystems[].licenseStorage` `keySystems` option (for a `loadVideo` call) by the better-named `persistentLicenseConfig`. The `persistentLicense` boolean (also a `keySystems` option) has also been removed because it was redundant with it) [#1147] - Remove `persistentStateRequired` API, in profit of the more powerful `persistentState` API [#1148] - Remove `distinctiveIdentifierRequired` API, in profit of the more powerful `distinctiveIdentifier` API [#1148] - Remove `keySystems[].fallbackOn` `loadVideo` property as it's now replaced by the more powerful `keySystems[].onKeyOutputRestricted` and `keySystems[].onKeyInternalError` properties. - Remove `keySystems[].onKeyStatusesChange` API as it seems to never be used [#1148] - Remove `keySystems[].throwOnLicenseExpiration` API as it can now be fully replaced by the `keySystems[].onKeyExpiration` option - Remove `aggressiveMode` from the `transportOptions` `loadVideo` option - Remove deprecated `throttleWhenHidden` player option in profit of `throttleVideoBitrateWhenHidden` - Change payload of `periodChange` events, so they emit only core properties related to a `Period`. - Change arguments given to a `transportOptions.segmentLoader` function (the `loadVideo` option): it now doesn't give the full `Manifest`, `Period`, `Adaptation`, `Representation` and `ISegment` structures in arguments but only core properties from it [#995] - Custom `manifestLoader` function added to what was previously the `loadVideo`'s `transportOptions` option now set an object as argument (with an `url`property), to let us bring improvements on it in the future [#995] - A Representation's `frameRate` is now always a number - in terms of frame per seconds - instead of a string. - Update the arguments of the `representationFilter` API - `Representations` (in methods: `getAvailableVideoTracks`, `getVideoTrack`, `representationFilter`, `getAvailableAudioTracks`, `getAudioTrack` and events: `audioTrackChange` and `videoTrackChange`) can have an `undefined` bitrate - Remove deprecated fullscreen related APIs (methods: `isFullscreen`, `setFullscreen`, `exitFullscreen`, event: `fullscreenChange`) as a a UI is much more adapted to that task and can also bring with it things like a progress bar or HTML text tracks - Remove deprecated `getNativeTextTrack` method. If advanced features are wanted, it's better to just use the HTML text track API - Remove deprecated `nativeTextTracksChange` event. Same reason than for `getNativeTextTrack` - Remove deprecated `hideNativeSubtitles` from `loadVideo` options. Same reason than for `getNativeTextTrack` - Remove `xhr` property from a `NetworkError`. Doing so stop us from using the fetch API - Remove deprecated `defaultAudioTrack` and `defaultTextTrack`in profit of new track APIs - Remove `bitrateEstimationChange` event as it is poorly understood (it's not always close to the expected bandwidth) and has a very complex relationship with the chosen quality. - Remove the notion of environment variables linked to personalized builds (e.g. RXP_DASH) in profit of the minimal RxPlayer. - Rename `IPersistentSessionStorage` type to `IPersistentLicenseConfig` [#1147] - Remove undocumented `audioRobustnesses` and `videoRobustnesses` properties of the `keySystems` option of `loadVideo` calls, as more powerful solutions now exist: respectively `audioCapabilitiesConfig` and `videoCapabilitiesConfig` [#1148] - Remove public types `ISupplementaryTextTrackOption` and `ISupplementaryImageTrackOption`. Those are the types respectively for `supplementaryTextTracks` and `supplementaryImageTracks` which have been removed - Remove public types `IBitrateEstimate` as no API depend on it anymore. - Remove public types `IManifest`, `IPeriod`, `IAdaptation`, `IRepresentation`, `IRepresentationInfos`, `IBifThumbnail`, `IBifObject` and `IExposedSegment` as no API depend on them anymore. - Remove public types `IDefaultAudioTrackOption` and `IDefaultTextTrackOption`. Those are the types respectively for `defaultAudioTrack` and `defaultTextTrack` `loadVideo` options which have been removed - Remove public types `IAudioTrackPreference`, `ITextTrackPreference` and `IVideoTrackPreference` as the corresponding API do not exist anymore. - Stop officially supporting the Internet Explorer 11 browser - The `MediaError`'s `trackInfo` property is now an array renamed as `tracksInfo` and similar `MediaError` are grouped in one [#1264] - The `manifestUpdateUrl` `loadVideo` option has been removed as it was unused [#1276] - `volumeChange` events are now sending both the audio volume and the muted status [#1348] - `mute`/`unMute`/`isMute` now rely on the `HTMLMediaElement`'s `muted` property and not the audio volume [#1348] - A `representationFilter`'s advertised `codec` has now been renamed to `codecs` and is an Array when defined [#1332] - `DASH_WASM` and `DEBUG_ELEMENT` are not experimental features anymore [#1339] - The `parseBifThumbnails` function is not an experimental tool anymore [#1339] - If all Representations from the current track become undecipherable, automatically switch to another track (also send a `trackUpdate` event) instead of stopping on error [#1234] - Only send `MediaError` errors with the `NO_PLAYABLE_REPRESENTATION` error code when no Representation from all tracks of a given type can be played [#1234] ### Features - Add `MULTI_THREAD` experimental feature to enable multithreading capabilities through a WebWorker - Add `attachWorker` method to attach a WebWorker to an RxPlayer instance. - `setAudioTrack`, `setVideoTrack` and `setTextTrack` now may take an object in argument, with the track's id set as a `trackId` property, to allow new features - Add `switchingMode` optional property to `setVideoTrack` and `setAudioTrack`, to configure the way in which the RxPlayer switches between the previous and new track - Add optional `periodId` property to `setAudioTrack`, `setVideoTrack` and `setTextTrack`, to allow setting the track of another, future or past, Period. - `getAvailableAudioTracks`, `getAvailableTextTracks`, `getAvailableVideoTracks`, `getAudioTrack`, `getTextTrack` and `getVideoTrack` can now optionally take a `periodId` argument to retrieve track information on a specific Period, different than the current one. - `disableTextTrack`, and`disableVideoTrack` can now optionally take a `periodId` argument to disable a track for a specific Period - Add optional `lockedRepresentations` property to `setAudioTrack` and `setVideoTrack`, to only filter some allowed Representations (i.e. qualities) after switching to the wanted track. - Add `getCurrentPeriod` method to retrieve information on the Period currently played - Add `getAvailablePeriods` method to retrieve information on all Periods on which a track or Representation choice can be made - Add `lockVideoRepresentations`, `lockAudioRepresentations`, `getLockedVideoRepresentations`, `getLockedAudioRepresentations`, `unlockVideoRepresentations` and `unlockAudioRepresentations` methods to allow a complex selection of Representations that are currently allowed to play. - Add `getVideoRepresentation` and `getAudioRepresentation` method to retrieve information on the currently loaded representations [#1144] - Add `audioRepresentationChange` and `videoRepresentationChange` events to be notified when the currently-loaded Representation for the current Period changes. - Add `getContentUrls` allowing to retrieve the one or several known URLs through which the current Manifest or content is reachable. - Add `videoResolutionLimit` constructor option allowing to automatically limit a video Representation's resolution. - Add `newAvailablePeriods` event to signal new Period on which a track and/or Representation choice can be made - Add `brokenRepresentationsLock` event for when a Representations lock could not be respected anymore - Add `trackUpdate` event for when a track has been updated for any type and Period - Add `distinctiveIdentifier` property in the `keySystems` option (given to the `loadVideo` method) to have full control over the MediaKeySystemConfiguration of the same name in the chosen key system [#1148] - Add `persistentState` property in the `keySystems` option (given to the `loadVideo` method) to have full control over the MediaKeySystemConfiguration of the same name in the chosen key system [#1148] - Add `keySystems[].onKeyOutputRestricted` and `keySystems[].onKeyInternalError` properties to configure the RxPlayer's behavior when a key switches to the status respectively `"output-restricted"` and `"internal-error"` - Add `audioCapabilitiesConfig` and `videoCapabilitiesConfig` properties in the `keySystems` option (given to the `loadVideo` method) to allow advanced configuration of respectively the "audioCapabilities" and "videoCapabilities" in the asked MediaKeySystemConfiguration [#1148] - Add `representationListUpdate` event for when the list of available Representation for a current track changes [#1240] - add `connectionTimeout` property to the `requestConfig` `loadVideo` option for both the manifest and segment requests to set a timeout just linked to HTTP connection establishment [#1319] - Add `relativeResumingPosition` property to the `setVideoTrack`and `setAudioTrack` options [#1331] - types: export type `ICompatibleKeySystem` to the public API [#1340] - types: Add `ISegmentLoaderContext` public type for the first argument of the `segmentLoader` API - types: Add `IRepresentationFilterRepresentation` public type for the first argument of the `representationFilter` API - types: Add `IRepresentationContext` public type for the second argument of the `representationFilter` API - types: Add `IManifestLoaderInfo` public type for the first argument of the `manifestLoader` API - types: Add `IPeriodChangeEvent` public type to define the properties send through a `periodChange` event - types: Add `IPeriod` public type to define a Period object returned by methods like `getAvailablePeriods` or `getCurrentPeriod` - types: Add `IVideoTrackSwitchingMode` public type to define the type of the `switchingMode` property optionally given to `setAudioTrack` - types: Add `IAudioRepresentationsSwitchingMode` public type to define the type of the `switchingMode` property optionally given to `lockAudioRepresentations` - types: Add `IVideoRepresentationsSwitchingMode` public type to define the type of the `switchingMode` property optionally given to `lockAudioRepresentations` - types: Add `IBrokenRepresentationsLockContext` public type to define the type sent as a payload of the `brokenRepresentationsLock` event - types: Add `ITrackUpdateEventPayload` public type to define the type sent as a payload of the `trackUpdate` event - types: Add `ILockedVideoRepresentationsSettings` public type to define the object that should be given to the new `lockVideoRepresentation` method - types: Add `ILockedAudioRepresentationsSettings` public type to define the object that should be given to the new `lockAudioRepresentation` method - types: Add `IAudioTrackSetting` public type to define the object that may be given to the `setAudioTrack` method - types: Add `IVideoTrackSetting` public type to define the object that may be given to the `setVideoTrack` method - types: Add `ITextTrackSetting` public type to define the object that may be given to the `setTextTrack` method ### Bug fixes - Tizen (Samsung TVs): Try again to work around all potential issues that could arise due to tizen seeking back by itself [#1327, #1355] - dash: Don't unnecessarily reload external `<UTCTiming>` resources at each refresh if it failed for the first request of the Manifest [#1370] - dash: The `DASH_WASM` feature do not rely on WebAssembly's sign-extension operators anymore as that is poorly supported on older Samsung and LG TVs [#1372] ### Other improvements - Provide both commonJS and ES6-style exports to improve compatibilities with applications - Implement better error messages by not repeating the Error Type in it [#1290] - DRM: Reload when playback is unexpectedly frozen with encrypted but only decipherable data in the buffer to work-around rare encryption-related issues [#1236] - Add cache when checking for codec support, improving performance on some devices and potentially working around some xbox bugs on long-lived pages [#1324] - Demo: Add possibility to see the debug element in the demo page ## v3.33.0 (2024-01-24) ### Features - Add `getLivePosition` RxPlayer method [#1300] - Add `startAt.fromLivePosition` `loadVideo` option [#1300] - Add the possibility to set a new `keySystems` option on the `reload` API [#1308] ### Bug fixes - Fix subtitles "blinking" in some specific conditions, especially with some DASH low-latency contents [#1314] - DASH: Fix Period overlap resolution logic for when the first Period is removed [#1311] - TTML: Fix handling of the `tts:lineHeight` attribute [#1320] - Fix import of the `LOCAL_MANIFEST` experimental feature - Avoid very rarely skipping segments which initially were too big to be pushed due to memory limitations [#1323] - Fix issue arising when using track APIs at the exact last possible position of a Period with no consecutive Period [#1337] - Starting at the end (through a `startAt` `loadVideo` option) or reloading at the end led to the restart of the content [#1338] - DRM/Safari: also perform Safari DRM work-arounds when the page is launched from the dock [#1351, #1356] ### Other improvements - DASH: rely on SCTE214 `supplementalCodecs` instead of `codecs` if it's supported to better support backward compatible Dolby Vision contents [#1307] - DASH: Provide better support of the `availabilityTimeOffset` attribute [#1300] - DEBUG_ELEMENT: Add unsupported and undecipherable bitrates to the debug element [#1321] - DEBUG_ELEMENT: update buffer graph maximum size so it becomes more readable for lengthy contents [#1316] - DEBUG_ELEMENT: always synchronize inventory of segments before rendering it [#1317] - Remove remaining RxPlayer dependency removing possibility of some application-side bundling errors [#1312] - Add exception to text Garbage collection logic to avoid unnecessarily reload text segments frequently [#1325] - Avoid logging too much the buffer's content when our debugging UI or the demo is used [#1341] - Demo: Fix reporting of live position in demo page [#1313] - build: automatically install Rust and WASM toolchain locally if unavailable when building the RxPlayer [#1373] - doc: Update our documentation generator and fix all invalid anchors in it - npm: prevent the publishing of unnecessary files on the npm registry [#1377, #1378] ## v3.32.1 (2023-10-19) ### Features - DASH: add optional `isSpatialAudio` boolean property to Representation returned by `getAvailableAudioTracks`, `getAudioTrack`, corresponding events, and `trackInfo` optional property of `MediaError` objects to signal Dolby Atmos techology [#1275] - `LOCAL`: add `isSpatialAudio` property to Representation of the experiment `"local"` transport (used for offline playback) [#1275] - `addFeatures` static method is now available on all RxPlayer builds. It was previously only in the minimal (`rx-player/minimal` import path) [#1287] - The `NATIVE_TEXT_BUFFER`, `HTML_TEXT_BUFFER` and `IMAGE_BUFFER` features are now totally optional [#1287, #1293] ### Bug fixes - Fix `setVideoBitrate` and `setAudioBitrate` API which may have led to a higher quality than wanted in the default `"seamless"` `manualBitrateSwitchingMode` if our buffer-based adaptive logic decided to [#1267, #1271] - On the PlayStation 5, only switch to the `"LOADED"` state once the HTMLMediaElement's `readyState` of `4` has been reached, as it seems to switch to `3` too soon there [#1257] - DASH: Fix potential track duplication if more than two `AdaptationSet` have an `adaptation-set-switching` `<SupplementalProperty>` between one another [#1279] - DASH-WASM: availabilityTimeOffset is actually a floating number [#1278] ### Other improvements - Do not load the last text segment if the current position goes after it as it is unnecessary [#1256] - Implement better `NetworkError` messages [#1274] - Set a better error message for when no `keySystems` option is set when playing an encrypted content - Fix very small memory leak when reloading a content [#1286] - Re-check for segments to load immediately after the manifest has been refreshed [#1282] - When "fallbacking" an undecipherable Representation, now empty the whole buffer if we can't make out where content was in the buffer [#1283] - Improve segment start detection in buffer when there's unknown data buffered before it [#1284] - DRM: Selection of alternative EME API like those used on IE11 or Safari has been refactored to facilitate future developments [#1261] ### Deprecated - Deprecate the `manifestUpdateUrl` `loadVideo` option as it doesn't seem used anymore [#1288] - Deprecate the `NATIVE_TEXT_BUFFER`, `HTML_TEXT_BUFFER` and `IMAGE_BUFFER` features as they are now unneeded [#1287, #1293] ## v3.31.0 (2023-06-14) ### Features - Add `isContentLoaded`, `isBuffering`, `isPaused`, and `getLastStoredContentPosition` methods [#1248] - Add `play` and `paused` events [#1253] - Add `trackInfo` property to some `MediaError` to expose information on the track that caused the error [#1241] ### Bug fixes - DASH: Fix issue which could lead to infinite rebuffering when switching between multiple Periods [#1232] - Return actual ending duration through the `getVideoDuration` method when playing dynamic contents whose future end is already known [#1235] - DASH/WASM: actually reject the `DASH_WASM.initialize`'s Promise if it fails [#1238] - On the PlayStation 5, set `Infinity` MediaSource duration for live contents to prevent playback issues [#1250] ### Other improvements - adaptive: Perform various adaptive tweaks to avoid switching too much between qualities in some conditions [#1237] - Directfile: Detect "forced" subtitles on Safari when playing directfile contents (such as HLS) [#1239] - Improve `"direct"` `audioTrackSwitchingMode` compatibility by re-seeking [#1246] - The `DEBUG_ELEMENT` feature now uses the `monospace` fallback font as a default for a better rendering on apple devices - doc: externalize documentation-generator code ## v3.30.0 (2023-03-07) ### Features - Add `updateContentUrls` API, allowing to update the Manifest's URL during playback [#1182] - DASH: implement forced-subtitles, adding the `forced` property to the audio tracks API and selecting by default a forced text track linked to the audio track's language if present [#1187] - DRM: add the `getKeySystemConfiguration` method to the RxPlayer [#1202] - add experimental `DEBUG_ELEMENT` feature and `createDebugElement` method to render a default debugging HTML element [#1200] ### Deprecated - Deprecate the `getVideoLoadedTime` method which can be easily replaced (see Deprecated method documentation) - Deprecate the `getVideoPlayedTime` method which can be easily replaced (see Deprecated method documentation) - Deprecate the `transportOptions.aggressiveMode` option - DRM: Deprecate the `keySystems[].onKeyStatusesChange` callback as no good use case was found for it. ### Bug fixes - Fix segment requesting error when playing a DASH content without an url and without BaseURL elements [#1192] - API: Stop sending events if the content is stopped due to a side-effect of one of the event handler [#1197] - text-tracks/ttml: fix inconsistent line spacing when resizing the `textTrackElement` [#1191] - DRM: Fix race condition leading to a JS error instead of a `NO_PLAYABLE_REPRESENTATION` [#1201] - DRM/Compat: Renew MediaKeys at each `loadVideo` on all WebOS (LG TV) platforms to work around issues [#1188] ### Other improvements - DASH: better detect closed captions [#1187] - DASH: handle `endNumber` DASH attribute [#1186] - DASH: Do not merge AdaptationSet with role "main" anymore [#1214] - DASH: parse `transferCharacteristics` property in the MPD to better detect hdr [#1212] - Support encrypted contents on Panasonic 2019 TVs [#1226] - Better handle SourceBuffer's QuotaExceededError, responsible for `MediaError` with the `BUFFER_FULL_ERROR` code [#1221] - API: send available...TracksChange events in the very unlikely scenario where tracks are added after a manifest update [#1197] - Completely remove RxJS dependency from the RxPlayer's source code [#1193] - DRM: Request PR recommendation when PlayReady is asked and try default recommendation robustnesses [#1189] ## v3.29.0 (2022-11-16) ### Features - add `networkConfig.segmentRequestTimeout` and `networkConfig.manifestRequestTimeout` options to loadVideo to configure the timeout of respectively segment and manifest requests [#1156] - add `timeout` property to the first argument communicated to a `segmentLoader` (from `loadVideo`'s `transportOptions`) [#1156] - add `timeout` property to a new third argument communicated to a `manifestLoader` (from `loadVideo`'s `transportOptions`) [#1156] - DRM: add `keySystems[].onKeyExpiration` to `loadVideo` options to configure the behavior the RxPlayer should have on key expiration [#1157] - DRM: add `keyStatuses` property to an `EncryptedMediaError` with the `KEY_STATUS_CHANGE_ERROR` code to communicate which key id and key statuses caused issues. [#1157] ### Deprecated - DRM: Deprecate `keySystems[].throwOnLicenseExpiration` `loadVideo` option as this boolean can be replaced with more customizability by the new `keySystems[].onKeyExpiration` `loadVideo` option [#1157] ### Bug fixes - Directfile: Fix long-running issues with rare "directfile" contents and some browsers/platforms (seen on Chrome PC and PlayStation 5) where playback would stay in `LOADING` state indefinitely despite playing [#1174] - DRM: Fix undocumented `keySystems[].videoRobustnesses` `loadVideo` option. `audioRobustnesses` was previously used even for video capabilities [#1171] - Compat/Directfile: Fix an issue with WebOS (LG TVs) when playing multiple directfile contents with the `stopAtEnd` player option set to `true` [#1154] - Compat/DRM: Fix infinite loading on WebOS (LG TVs) 2021 and 2022 when loading more than once an encrypted content by resetting decryption capabilities each time [#1175] - Compat: To work around an issue on WebOS (LG TVs), also specify a request timeout manually through a `setTimeout` call when XMLHttpRequests are created for Manifest and segment requests [#1152] - Compat/Directfile: Fix an issue on Tizen (Samsung TVs) where playing directfile contents could randomly lead to not having audio [#1170] - Compat: Fix issue with Tizen (Samsung TVs) where starting playback on a discontinuity could lead to infinite rebuffering [#1140, #1176] - Compat/Directfile: For `"directfile"` contents, also consider `AudioTrack` with a `description` (without an "s") as audio-description audio tracks to work-around what seems to be a Safari typo [#1160] - DRM: When using persistent licenses, create new MediaKeySession when `load` resolves with `false`, instead of relying the same, to fix issues with such persistent sessions if the browser cleaned it up [#1139] - Only call "MediaSource.endOfStream" once, the most visible side-effect should have been repeated logs [#1163] ### Other improvements - DASH: Improve multi-CDN configurations, by smartly selecting the right CDN depending on past status [#1165] - Allow reverse playback use cases by not skipping gaps and most discontinuities when the playback rate has been set to `0` or a negative value [#1138] - In the experimental "local" transport, add `incomingRanges` property to signal the time ranges of remaining data, allowing better discontinuity handling and duration estimates for sill-loading dowloaded contents [#1151] - Only send, through `"warning"` events, one `EncryptedMediaError` with a `KEY_STATUS_CHANGE_ERROR` code when multiple ones arises at the same time [#1157] ## v3.28.0 (2022-07-12) ### Features - Add `label` to audio, video and text track APIs (such as `getAvailableAudioTracks`) which gives a human-readable description of the corresponding track, if available in the Manifest [#1105, #1109] - Automatically set the LogLevel to `"DEBUG"` if a global `__RX_PLAYER_DEBUG_MODE__` constant is set to `true`, to simplify debugging [#1115] ### Bug fixes - Use the first **compatible** codec of the current AdaptationSet when creating a SourceBuffer [#1094] - DASH/DRM: Fix potential infinite rebuffering when a KID is not announced in the MPD [#1113] - DRM: Fix quality fallback when loading a content whose license has been cached under an extended `singleLicensePer` setting and when starting (and staying) with a quality whose key id is not in it [#1133] - DASH: Avoid infinite loop due to rounding errors while parsing multi-Periods MPDs [#1111, #1110] - After a `RELOADING` state, stay in `PAUSED` if the media element was paused synchronously before the side-effect which triggered the reloading (usually coming from the API) was perform [#1132] - Fix issue with `maxVideoBufferSize` setting which could lead to too much data being buffered [#1125] - Prevent possibility of requests loops and infinite rebuffering when a pushed segment is always completely and immediately garbage collected by the browser [#1123] - DASH: Fix potential rare memory leak when stopping the content after it has reloaded at least once [#1135] - Directfile: Properly announce the audio track's `audioDescription` accessibility attribute in directfile mode on Safari [#1136] - DASH: Fix issues that could arise if a segment is calculated to start at a negative position [#1122] - DASH: Fix possibility of wrong segments being requested when a SegmentTimeline in a given Period (whose Period@end is set) had an S@r set to `-1` at its end [#1098] - DASH: If the first `<S>` has its S@t attribute not set, make as if it is set to `0` [#1118] ### Other improvements - TTML: Add support for percent based thickness for textOutline in TTML Subtitles [#1108] - Improve TypeScript's language servers auto import feature with the RxPlayer by better redirecting to the exported type [#1126] - If seeking after the last potential position, load last segments before ending [#1097] - The duration set on the media element is now only relative to the current chosen tracks (it was previously relative to all potential track). This allows to seek later when switching e.g. to a longer video track [#1102] - Errors coming from an HTMLMediaElement now have the browser's error message if it exists [#1112] - TTML: Better handle EBU-TT subtitles by handling the `tt` XML namespace in our TTML parser [#1131] - DRM: Information on persisted DRM sessions are now automatically updated to their last version when possible [#1096] - Only log values which are relatively inexpensive to stringify to reduce the difference between debugging sessions and what is usually seen in production [#1116] ## v3.27.0 (2022-03-31) ### Features - Add a `maxVideoBufferSize` constructor option and `{get,set}MaxVideoBufferSize` methods to limit the size of loaded video data buffered at the same time [#1041, #1054] - DRM: Add a `"periods"` mode to the `keySystems[].singleLicensePer` `loadVideo` option, allowing to obtain decryption license for groups of Periods allowing a compromise between optimization, features and compatibility [#1028, #1061] - Add a `"reload"` `audioTrackSwitchingMode` to work-around rare compatibility issues when switching audio tracks [#1089] ### Bug fixes - subtitles: Fix rare issue where subtitles could be skipped due to a rounding error [#1064] - DASH: fix issue where the wrong segments would be requested on $Number$-based MPD with a SegmentTimeline older than the `timeShiftBufferDepth` [#1052, #1060] - directfile: disable all audio tracks before enabling one to work-around Safari issue on MacOS Monterey [#1067] - avoid performing a small seek when changing the audio track [#1080] - api: allow switching to RELOADING state synchronously after LOADED [#1083] - Safari Mobile: Improve decryption support on Safari mobile by relying on the vendored `WebKitMediaKeys` API [#1072] - DASH: Fix issue which prevented the integrity check of most MP4 DASH segments when `transportOptions.checkMediaSegmentIntegrity` was set to `true` - avoid unnecessary warning logs when loading some initialization segments [#1049] - TypeScript: Add forgotten TypeScript types in the exposed segment and manifest loader APIs [#1057] - DRM: Avoid decryption issues when a license is persisted in a `singleLicensePer` `"init-data"` mode but loaded in a `"content"` mode [#1031, #1042] - DRM: Totally avoid the theoretical possibility of leaking MediaKeySessions when a `generateRequest` or `load` call takes multiple seconds [#1093] ### Other improvements - DASH: always consider that the non-last Period is finished when it contains SegmentTimeline elements [#1047] - add better buffer cleaning logic on a browser's `QuotaExceededError` to better handle memory limitations [#1065] - DASH: Prioritize selectionPriority attribute over a "main" Role when ordering AdaptationSets [#1082] - directfile/Safari: use the `getStartDate` method in `getWallClockTime`, `seekTo` and the `positionUpdate` event when available to obtain true offseted "wall-clock" times when playing HLS contents on Safari [#1055] - DRM: Improve DRM Session caches performance when `singleLicensePer` is set to `"content"` - DRM: Stop retrying closing MediaKeySessions multiple times when it fails, instead doing it only once when it should work [#1093] - TypeScript: Add IBitrateEstimate, IPositionUpdate and IPlayerState types to the exported types [#1084] - Remove dependency on pinkie's promise ponyfill [#1058, #1090] - tests: add performance tests, to better catch and avoid performance regressions [#1053, #1062] - DRM: Refactor DRM logic for better maintainability. DRM-linked logs are now prefixed by `DRM:` instead of `EME:` like previously [#1042] ## v3.26.2 (2022-01-11) ### Bug fixes - API: re-switch to SEEKING state instead of BUFFERING when seeking to already-buffered data [#1015] - DASH: provide default startNumber attribute for number-based SegmentTemplate indexes with a SegmentTimeline [#1009] - TTML (subtitles): interpret percentages as relative to the computed cell size and not as the percentage of the inherited font size in the page [#1013] - subtitles: Work-around recent Chrome issue where the content of a native `<track>` element would still be visible despite being removed from the DOM (issue only reproducible in the `"native"` `textTrackMode`) [#1039] - API: Fix rare issue happening when switching rapidly between Representations, which led to multiple APIs such as `getAvailableVideoBitrate` or `getAvailableAudioTracks` returning either incorrect or empty results [#1018] - Improve prevention of rare segment-loading loops by fixing an issue with the clean-up of the short-term buffer history we maintain [#1045] ### Other improvements - DASH-LL: Improve adaptive bitrate logic on low-latency contents by implementing a specific algorithm for those [#1025, #1036] - DASH-LL: Improve handling of $Time$-based DASH-LL contents [#1020] - DASH: Support UTCTiming element with the `urn:mpeg:dash:utc:http-xsdate:2014` scheme [#1021] - DOC: Important refactoring of the RxPlayer API documentation to improve readability, discoverability and to add search capability to it [#1016] - DASH: handle ContentProtection elements that have been defined at the Representation-level (and not at the AdaptationSet-level, as defined by the DASH-IF IOP) [#1027] - DASH: Be resilient when the resource behind an UTCTiming element leads to an error (usually due to an HTTP-related issue) - instead of failing with an error like now [#1026] - Better estimate the duration of ISOBMFF segments with multiple moof boxes [#1037] - EME: Add hex-encoded key id to the `KEY_STATUS_CHANGE_ERROR` error message so we can know which key we're talking about when debugging [#1033] - dev/scripts: for the "modular" (a.k.a. minimal) RxPlayer build now rely on TypeScript's const enums, instead of uglily using sed, to replace compile-time constants. [#1014] - dev/scripts: remove reliance on environment variables when running the RxPlayer build scripts [#1004] - dev/scripts: add esbuild devdependency and add "s" script to allow faster checks for RxPlayer developpers [#1003] - CI: Rely on Github actions instead of Travis for most CI-related matters [#1046] - code/refacto: replace central `Clock` concept (Observable bringing media-related updates to the RxPlayer at a regular pace) by a more flexible `PlaybackObserver` class [#1002] ## v3.26.1 (2021-09-14) ### Bug fixes - ttml: Do not throw if a TTML subtitles file doesn't contain any `<body>` tag, just ignore it [#993] - Auto-detect when playback is unexplicably frozen and try to unlock it through a small seek [#982] - Properly send `available{Audio,Video}BitratesChange` event for multi-Period contents [#983] - DASH/MetaPlaylist/Local: fix rare infinite rebuffering issue which could happen when changing or disabling the track of a future Period [#1000] - compat: Prevent rare segment-loading loops by automatically detecting when segments are garbage collected by the browser immediately after being pushed [#987, #990] - compat/DRM: In some Safari versions, communicating a license as a JS `ArrayBuffer` could throw, this is now fixed [#974] - DASH_WASM: Don't stop with a fatal error if an expected ISO8601 duration value is empty in the MPD - DASH_WASM: Parse `<Event>` elements which contain an XML namespace defined outside that element [#981] - DASH_WASM: Drastically reduce wasm compilation time and file size [#980] ### Other improvements - Request initialization segment and the first media segments at the same time when possible, potentially reducing loading times [#973] - Remove cached segment request detection in the adaptive logic, as it is sensible to false positives, leading to a poor bitrate in some short contents [#977] - Export more needed types through the `rx-player/types` path [#972, #976] - demo: Expose some player options in the demo page [#999] - dev: Rewrite build logic from bash to node.js to improve its maintainability - dev: Replace internal `info` script by more helpful and interactive `list` script [#991] - dev/code: Forbid the usage of TypeScript's type `any` in most of the RxPlayer's code - performing runtime type-checking in some cases (in DEV mode only) [#994] - dev/code: Remove RxJS from the transports code [#962] ## v3.26.0 (2021-06-10) ### Features - Add HDR information through the `hdrInfo` property on video Representation/tracks as returned by APIs such as `getVideoTrack`, `getAvailableVideoTracks`, the `videoTrackChange` event, `getManifest`, `getCurrentAdaptations` and `getCurrentRepresentations` [#946] - Add the `DASH_WASM` experimental feature, allowing faster MPD parsing using WebAssembly [#937] - Add the experimental `VideoThumbnailLoader` tool, which uses "trickmodes" DASH AdaptationSet to generate thumbnails [#647] - Add `preferTrickModeTracks` option to `setPlaybackRate`, to switch on or off trickmode tracks w