Skip to content

Commit

Permalink
Add additional information to migration guide v4 to v5
Browse files Browse the repository at this point in the history
  • Loading branch information
dsilhavy committed Jan 16, 2025
1 parent 2b08a46 commit b3d0b07
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
22 changes: 17 additions & 5 deletions pages/developers/migration-guides/4-to-5.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ version 5.

### APIs

#### getQualityFor()
#### Media Player

##### getQualityFor()

The method `getQualityFor()` has been removed instead use `getCurrentRepresentationForType(type)` which will return the
current selected Representation for a specific media type such as `video` or `audio`.
Expand All @@ -65,7 +67,7 @@ current selected Representation for a specific media type such as `video` or `au
|:----------------|:----------------------------------|:----------------------------------------------------------------------|
| `getQualityFor` | `getCurrentRepresentationForType` | Gets the current Representation for media type video, audio or images |

#### setQualityFor()
##### setQualityFor()

The method `setQualityFor()` has been removed instead use `setRepresentationForTypeById()` or
`setRepresentationForTypeByIndex()`. A detailed description of how to switch qualities can be
Expand All @@ -75,7 +77,7 @@ found [here](../../advanced/abr/manual-quality-selection.html).
|:----------------|:--------------------------------------------------------------------|:----------------------------------------------------------------------|
| `setQualityFor` | `setRepresentationForTypeById` or `setRepresentationForTypeByIndex` | Sets the current Representation for media type video, audio or images |

#### getTopBitrateInfoFor()
##### getTopBitrateInfoFor()

The method `getTopBitrateInfoFor()` has been removed. Instead, use `getRepresentationsByType(type)` which will return
all available Representations for a specific media type such as `video` or `audio`. Each `Representation` object has an
Expand All @@ -85,7 +87,7 @@ attribute `bitrateInKbit` that can be used to identify the highest bitrate.
|:-----------------------|:---------------------------|:--------------------------------------------|
| `getTopBitrateInfoFor` | `getRepresentationsByType` | Returns a list of available representations |

#### getBitrateInfoListFor()
##### getBitrateInfoListFor()

The method `getBitrateInfoListFor()` has been removed. Instead, use `getRepresentationsByType(type)` which will return
all available Representations for a specific media type such as `video` or `audio`. Each `Representation` object has an
Expand All @@ -95,7 +97,7 @@ attribute `bitrateInKbit`.
|:------------------------|:---------------------------|:--------------------------------------------|
| `getBitrateInfoListFor` | `getRepresentationsByType` | Returns a list of available representations |

#### getDVRWindowSize()
##### getDVRWindowSize()

The method `getDVRWindowSize` has been removed, use `getDvrWindow()` instead. A detailed explanation of how to get
information about the
Expand All @@ -105,6 +107,16 @@ DVR window can be found [here](../../advanced/timing-apis.html#playback-time).
|:---------------------|:-----------------|:----------------------------------------------------------------------------------------------------------|
| `getDVRWindowSize()` | `getDvrWindow()` | Returns information about the current DVR window including the start time, the end time, the window size. |

#### DashAdapter

##### getAdaptationForType()

The method `getAdaptationForType()` has been renamed, use `getMainAdaptationForType()` instead.

| v4 | v5 | Description |
|:-------------------------|:-----------------------------|:---------------------------------------------------------------------------------|
| `getAdaptationForType()` | `getMainAdaptationForType()` | Returns the AdaptationSet for a given mediaType and a given `streamInfo` object. |

## Recommended changes

This section lists the recommended changes that you should consider when migrating from dash.js version 4.x to 5.0.
Expand Down
2 changes: 1 addition & 1 deletion pages/quickstart/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ instance `v3.1.0`.
- [http://cdn.dashjs.org/vx.x.x/dash.all.min.js](http://cdn.dashjs.org/v3.1.0/dash.all.min.js)
- [http://cdn.dashjs.org/vx.x.x/dash.all.debug.js](http://cdn.dashjs.org/v3.1.0/dash.all.debug.js)

An overview of the dash.js releases can be found on [Github](https://github.com/Dash-Industry-Forum/dash.js/releases).
An overview of the dash.js releases can be found on [GitHub](https://github.com/Dash-Industry-Forum/dash.js/releases).

## Build dist files yourself

Expand Down

0 comments on commit b3d0b07

Please sign in to comment.