Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note: This is the full changelog combining all previous v4 beta releases (and removing things since released in v3 releases or bug fixes which only fix v4 issues)
Changelog
Changes
"FREEZING"
player state for cases where the playback position is currently not advancing due to an unknown reason, to separate it from regular"BUFFERING"
. [[V4] Add FREEZING state #1146]RELOADING
player state (gettable through thegetPlayerState
andplayerStateChange
API) can now happen at any time to unlock playback.getAvailableVideoBitrates
,getAvailableAudioBitrates
,setAudioBitrate
,setVideoBitrate
,getAudioBitrate
,getVideoBitrate
in profit of the Representations lock APIs [[V4] Remove all bitrate-based API #1144]setMaxVideoBitrate
,setMaxAudioBitrate
,getMaxVideoBitrate
andgetMaxAudioBitrate
methods as well as themaxVideoBitrate
andmaxAudioBitrate
options in profit of the Representations lock APIssetMinVideoBitrate
,setMinAudioBitrate
,getMinVideoBitrate
andgetMinAudioBitrate
methods as well as theminVideoBitrate
andminAudioBitrate
options in profit of the Representations lock APIsgetPreferredAudioTracks
,getPreferredVideoTracks
,setPreferredAudioTracks
andsetPreferredVideoTracks
, types:IAudioTrackPreference
,ITextTrackPreference
andIVideoTrackPreference
) in profit of the new tracks APIgetManualVideoBitrate
andgetManualAudioBitrate
in profit of the new Representations lock APIsinitialAudioBitrate
andinitialVideoBitrate
constructor options with a singlebaseBandwidth
option, which better translates what this option is actually doing and allows for future optimizations on our side. [[Proposal] [v4] Remove initialVideoBitrate and initialAudioBitrate, add baseBandwidth #1155]audioTrackSwitchingMode
loadVideo option intodefaultAudioTrackSwitchingMode
[[WIP] Add a promise priotizer #1030]manualBitrateSwitchingMode
loadVideo option to instead rely on theswitchingMode
property of eachlockVideoRepresentations
andlockAudioRepresentations
calls. [[WIP] Add a promise priotizer #1030]audioBitrateChange
andvideoBitrateChange
events in profit of the newaudioRepresentationChange
andvideoRepresentationChange
eventsavailableAudioBitratesChange
andavailableVideoBitratesChange
events. Those are less needed with the new Representations lock API and can be mostly replicated through theaudioTrackChange
andvideoTrackChange
eventstransportOptions
loadVideo options by putting all its inner properties directly at the top level of loadVideo options, to simplify its documentation and discoverability [[V4] Flatten transportOptions loadVideo option #1149]limitVideoWidth
constructor option in profit of the more configurablevideoResolutionLimit
constructor optionnetworkConfig
intorequestConfig
and re-organize its inner properties to pave the way for future request-related APIs.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.decipherabilityUpdate
event as it appeared to be not easily exploitable and exposed internal logic too much [[v4] Remove decipherabilityUpdate event #1168]getUrl
method in profit of the more powerfulgetContentUrls
MANIFEST_INCOMPATIBLE_CODECS_ERROR
instead ofMANIFEST_PARSE_ERROR
getManifest
,getCurrentAdaptations
andgetCurrentRepresentations
, as they reveal the RxPlayer's internals too much"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).supplementaryTextTracks
loadVideo option. You can use theTextTrackRenderer
tool if you wish to diplay external subtitles on top of your content.maximumBufferTime
inpositionUpdate
events tomaximumPosition
getVideoPlayedTime
andgetVideoLoadedTime
methods. Their names was very confusing and can be re-implemented relatively easily using the media element's buffered property.getVideoDuration
togetMediaDuration
, to avoid confusion with the video track's duration.getVideoBufferGap
to `getCurrentBufferGap, to avoid confusion with the "buffer gap" specific to the video track.supplementaryImageTracks
loadVideo
option,imageTrackUpdate
event,getImageTrackData
method. Those are better handled by an application. TheparseBifThumbnails
tool is still available.keySystems[].licenseStorage
keySystems
option (for aloadVideo
call) by the better-namedpersistentLicenseConfig
. ThepersistentLicense
boolean (also akeySystems
option) has also been removed because it was redundant with it) [[V4] DRM: Remove persistentLicense keySystems option and rename licenseStorage to persistentLicenseConfig #1147]persistentStateRequired
API, in profit of the more powerfulpersistentState
API [[V4] Various DRM-related API updates #1148]distinctiveIdentifierRequired
API, in profit of the more powerfuldistinctiveIdentifier
API [[V4] Various DRM-related API updates #1148]keySystems[].fallbackOn
loadVideo
property as it's now replaced by the more powerfulkeySystems[].onKeyOutputRestricted
andkeySystems[].onKeyInternalError
properties.keySystems[].onKeyStatusesChange
API as it seems to never be used [[V4] Various DRM-related API updates #1148]keySystems[].throwOnLicenseExpiration
API as it can now be fully replaced by thekeySystems[].onKeyExpiration
optionaggressiveMode
from thetransportOptions
loadVideo
optionthrottleWhenHidden
player option in profit ofthrottleVideoBitrateWhenHidden
periodChange
events, so they emit only core properties related to aPeriod
.transportOptions.segmentLoader
function (theloadVideo
option): it now doesn't give the fullManifest
,Period
,Adaptation
,Representation
andISegment
structures in arguments but only core properties from it [Future-proof the transport code for a v4.0.0 #995]manifestLoader
function added to what was previously theloadVideo
'stransportOptions
option now set an object as argument (with anurl
property), to let us bring improvements on it in the future [Future-proof the transport code for a v4.0.0 #995]frameRate
is now always a number - in terms of frame per seconds - instead of a string.representationFilter
APIRepresentations
(in methods:getAvailableVideoTracks
,getVideoTrack
,representationFilter
,getAvailableAudioTracks
,getAudioTrack
and events:audioTrackChange
andvideoTrackChange
) can have anundefined
bitrateisFullscreen
,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 tracksgetNativeTextTrack
method. If advanced features are wanted, it's better to just use the HTML text track APInativeTextTracksChange
event. Same reason than forgetNativeTextTrack
hideNativeSubtitles
fromloadVideo
options. Same reason than forgetNativeTextTrack
xhr
property from aNetworkError
. Doing so stop us from using the fetch APIdefaultAudioTrack
anddefaultTextTrack
in profit of new track APIsbitrateEstimationChange
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.IPersistentSessionStorage
type toIPersistentLicenseConfig
[[V4] DRM: Remove persistentLicense keySystems option and rename licenseStorage to persistentLicenseConfig #1147]audioRobustnesses
andvideoRobustnesses
properties of thekeySystems
option ofloadVideo
calls, as more powerful solutions now exist: respectivelyaudioCapabilitiesConfig
andvideoCapabilitiesConfig
[[V4] Various DRM-related API updates #1148]ISupplementaryTextTrackOption
andISupplementaryImageTrackOption
. Those are the types respectively forsupplementaryTextTracks
andsupplementaryImageTracks
which have been removedIBitrateEstimate
as no API depend on it anymore.IManifest
,IPeriod
,IAdaptation
,IRepresentation
,IRepresentationInfos
,IBifThumbnail
,IBifObject
andIExposedSegment
as no API depend on them anymore.IDefaultAudioTrackOption
andIDefaultTextTrackOption
. Those are the types respectively fordefaultAudioTrack
anddefaultTextTrack
loadVideo
options which have been removedIAudioTrackPreference
,ITextTrackPreference
andIVideoTrackPreference
as the corresponding API do not exist anymore.MediaError
'strackInfo
property is now an array renamed astracksInfo
and similarMediaError
are grouped in one [[Proposal] [v4] Errors: Replace trackInfo prop by tracksInfo to group similar errors #1264]manifestUpdateUrl
loadVideo
option has been removed as it was unused [[Proposal] "Remove"manifestUpdateUrl
loadVideo option for the v4 #1276]volumeChange
events are now sending both the audio volume and the muted status [Set more standard mute/unMute behaviors #1348]mute
/unMute
/isMute
now rely on theHTMLMediaElement
'smuted
property and not the audio volume [Set more standard mute/unMute behaviors #1348]representationFilter
's advertisedcodec
has now been renamed tocodecs
and is an Array when defined [Rename codec to codecs in the representationFilter for the v4 #1332]DASH_WASM
andDEBUG_ELEMENT
are not experimental features anymore [DASH_WASM
,DEBUG_ELEMENT
become non-experimental features andparseBifThumbnails
a non-experimental tool #1339]parseBifThumbnails
function is not an experimental tool anymore [DASH_WASM
,DEBUG_ELEMENT
become non-experimental features andparseBifThumbnails
a non-experimental tool #1339]trackUpdate
event) instead of stopping on error [ImproveNO_PLAYABLE_REPRESENTATION
behavior for the v4 #1234]MediaError
errors with theNO_PLAYABLE_REPRESENTATION
error code when no Representation from all tracks of a given type can be played [ImproveNO_PLAYABLE_REPRESENTATION
behavior for the v4 #1234]Features
MULTI_THREAD
experimental feature to enable multithreading capabilities through a WebWorkersetAudioTrack
,setVideoTrack
andsetTextTrack
now may take an object in argument, with the track's id set as atrackId
property, to allow new featuresswitchingMode
optional property tosetVideoTrack
andsetAudioTrack
, to configure the way in which the RxPlayer switches between the previous and new trackperiodId
property tosetAudioTrack
,setVideoTrack
andsetTextTrack
, to allow setting the track of another, future or past, Period.getAvailableAudioTracks
,getAvailableTextTracks
,getAvailableVideoTracks
,getAudioTrack
,getTextTrack
andgetVideoTrack
can now optionally take aperiodId
argument to retrieve track information on a specific Period, different than the current one.disableTextTrack
, anddisableVideoTrack
can now optionally take aperiodId
argument to disable a track for a specific PeriodlockedRepresentations
property tosetAudioTrack
andsetVideoTrack
, to only filter some allowed Representations (i.e. qualities) after switching to the wanted track.getCurrentPeriod
method to retrieve information on the Period currently playedgetAvailablePeriods
method to retrieve information on all Periods on which a track or Representation choice can be madelockVideoRepresentations
,lockAudioRepresentations
,getLockedVideoRepresentations
,getLockedAudioRepresentations
,unlockVideoRepresentations
andunlockAudioRepresentations
methods to allow a complex selection of Representations that are currently allowed to play.getVideoRepresentation
andgetAudioRepresentation
method to retrieve information on the currently loaded representations [[V4] Remove all bitrate-based API #1144]audioRepresentationChange
andvideoRepresentationChange
events to be notified when the currently-loaded Representation for the current Period changes.getContentUrls
allowing to retrieve the one or several known URLs through which the current Manifest or content is reachable.videoResolutionLimit
constructor option allowing to automatically limit a video Representation's resolution.newAvailablePeriods
event to signal new Period on which a track and/or Representation choice can be madebrokenRepresentationsLock
event for when a Representations lock could not be respected anymoretrackUpdate
event for when a track has been updated for any type and PerioddistinctiveIdentifier
property in thekeySystems
option (given to theloadVideo
method) to have full control over the MediaKeySystemConfiguration of the same name in the chosen key system [[V4] Various DRM-related API updates #1148]persistentState
property in thekeySystems
option (given to theloadVideo
method) to have full control over the MediaKeySystemConfiguration of the same name in the chosen key system [[V4] Various DRM-related API updates #1148]keySystems[].onKeyOutputRestricted
andkeySystems[].onKeyInternalError
properties to configure the RxPlayer's behavior when a key switches to the status respectively"output-restricted"
and"internal-error"
audioCapabilitiesConfig
andvideoCapabilitiesConfig
properties in thekeySystems
option (given to theloadVideo
method) to allow advanced configuration of respectively the "audioCapabilities" and "videoCapabilities" in the asked MediaKeySystemConfiguration [[V4] Various DRM-related API updates #1148]representationListUpdate
event for when the list of available Representation for a current track changes [AddrepresentationListUpdate
event for the v4 #1240]connectionTimeout
property to therequestConfig
loadVideo
option for both the manifest and segment requests to set a timeout just linked to HTTP connection establishment [feature: add a connection timeout #1319]relativeResumingPosition
property to thesetVideoTrack
andsetAudioTrack
options [feat: change position on audio track change #1331]ICompatibleKeySystem
to the public API [types: export type IcompatibleKeySystem to the public API #1340]ISegmentLoaderContext
public type for the first argument of thesegmentLoader
APIIRepresentationFilterRepresentation
public type for the first argument of therepresentationFilter
APIIRepresentationContext
public type for the second argument of therepresentationFilter
APIIManifestLoaderInfo
public type for the first argument of themanifestLoader
APIIPeriodChangeEvent
public type to define the properties send through aperiodChange
eventIPeriod
public type to define a Period object returned by methods likegetAvailablePeriods
orgetCurrentPeriod
IVideoTrackSwitchingMode
public type to define the type of theswitchingMode
property optionally given tosetAudioTrack
IAudioRepresentationsSwitchingMode
public type to define the type of theswitchingMode
property optionally given tolockAudioRepresentations
IVideoRepresentationsSwitchingMode
public type to define the type of theswitchingMode
property optionally given tolockAudioRepresentations
IBrokenRepresentationsLockContext
public type to define the type sent as a payload of thebrokenRepresentationsLock
eventITrackUpdateEventPayload
public type to define the type sent as a payload of thetrackUpdate
eventILockedVideoRepresentationsSettings
public type to define the object that should be given to the newlockVideoRepresentation
methodILockedAudioRepresentationsSettings
public type to define the object that should be given to the newlockAudioRepresentation
methodIAudioTrackSetting
public type to define the object that may be given to thesetAudioTrack
methodIVideoTrackSetting
public type to define the object that may be given to thesetVideoTrack
methodITextTrackSetting
public type to define the object that may be given to thesetTextTrack
methodBug fixes
Other improvements