Skip to content

Commit

Permalink
Add build information to migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
dsilhavy committed Jan 22, 2025
1 parent 6f59786 commit aa80fa8
Showing 1 changed file with 38 additions and 8 deletions.
46 changes: 38 additions & 8 deletions pages/developers/migration-guides/4-to-5.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,43 @@ grand_parent: Developers

# Migration guide - 4.x to 5.0

dash.js version 5.0 introduces changes to the settings and the APIs. This guide will help you migrate your application
from dash.js version 4.x to 5.0.
dash.js version 5.0 introduces changes to the build files, settings and the APIs. This guide will help you migrate your
application from dash.js version 4.x to 5.0.

## Breaking changes

This section lists the breaking changes that you must consider when migrating from dash.js version 4.x to 5.0.

### Build

With version 5 of dash.js we introduced three different bundle formats:

* `UMD legacy`: A `UMD` build targeting legacy platforms by specifying the babel target `ie: '11'`. In addition,
`core.js` polyfills are enabled.
* `ESM modern`: An `ESM` build using `.browserslistrc` as target, with target set to `defaults`. **No** `core.js`
polyfills are enabled.
* `UMD modern`: A `UMD` build targeting modern platforms using `.browserslistrc` as target, with target set to
`defaults`. **No** `core.js` polyfills are enabled.

All the bundled files are located in the `dist` directory of the repository. The `legacy` folder inside the `dist`
folder contains the `UMD legacy` build. The `modern` folder inside the `dist` folder contains both the `ESM modern` and
the `UMD modern` build.

The following entry points are defined in the `package.json`:

````json
{
"types": "./index.d.ts",
"import": "./dist/modern/esm/dash.all.min.js",
"default": "./dist/modern/esm/dash.all.min.js",
"browser": "./dist/modern/umd/dash.all.min.js",
"script": "./dist/modern/umd/dash.all.min.js",
"require": "./dist/modern/umd/dash.all.min.js"
}
````

More information about installation and building can be found [here](../../quickstart/installation.html).

### Settings

#### ABR Rules
Expand All @@ -31,8 +61,8 @@ Moreover, a new `throughput` sub-section was added to the `abr` section of the s
you to specify the throughput calculation mode and fine tune sample and EWMA settings.

Since these changes are quite extensive we can not provide a direct one-to-one mapping in table format. Please refer to
the detailed [ABR settings](../../advanced/abr/settings.html),
the [throughput settings](../../advanced/abr/throughput-calculation.html) and make yourself familiar with the
the detailed [ABR settings](../../usage/abr/settings.html),
the [throughput settings](../../usage/abr/throughput-calculation.html) and make yourself familiar with the
new [settings structure](https://github.com/Dash-Industry-Forum/dash.js/blob/development/src/core/Settings.js).

#### Buffer Target
Expand All @@ -42,7 +72,7 @@ the buffer target for the top quality and long form content:

| v4 | v5 | Description |
|:-------------------|:--------------------|:-------------------------------------------------------------------------------------|
| `stableBufferTime` | `bufferTimeDefault` | See [Buffer Management](../../advanced/buffer-management.html) for more information. |
| `stableBufferTime` | `bufferTimeDefault` | See [Buffer Management](../../usage/buffer-management.html) for more information. |

#### changeType()

Expand Down Expand Up @@ -71,7 +101,7 @@ current selected Representation for a specific media type such as `video` or `au

The method `setQualityFor()` has been removed instead use `setRepresentationForTypeById()` or
`setRepresentationForTypeByIndex()`. A detailed description of how to switch qualities can be
found [here](../../advanced/abr/manual-quality-selection.html).
found [here](../../usage/abr/manual-quality-selection.html).

| v4 | v5 | Description |
|:----------------|:--------------------------------------------------------------------|:----------------------------------------------------------------------|
Expand Down Expand Up @@ -101,7 +131,7 @@ attribute `bitrateInKbit`.

The method `getDVRWindowSize` has been removed, use `getDvrWindow()` instead. A detailed explanation of how to get
information about the
DVR window can be found [here](../../advanced/timing-apis.html#playback-time).
DVR window can be found [here](../../usage/timing-apis.html#playback-time).

| v4 | v5 | Description |
|:---------------------|:-----------------|:----------------------------------------------------------------------------------------------------------|
Expand Down Expand Up @@ -159,7 +189,7 @@ start of the DVR window. Internally `DVRWindow.start` is added to the provided v
method
uses absolute presentation timestamp.

A more detailed explanation can be found [here](../../advanced/timing-apis.html#seeking).
A more detailed explanation can be found [here](../../usage/timing-apis.html#seeking).

| v4 | v5 | Description |
|:------------|:-------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
Expand Down

0 comments on commit aa80fa8

Please sign in to comment.