|
| 1 | +--- |
| 2 | +layout: default |
| 3 | +title: Common Media Server Data |
| 4 | +parent: Usage |
| 5 | +--- |
| 6 | + |
| 7 | +# Common Media Server Data |
| 8 | + |
| 9 | +[CTA-5006 - Common Media Server Data](https://cdn.cta.tech/cta/media/media/resources/standards/pdfs/cta-5006-final.pdf) ( |
| 10 | +CMSD) defines a structure for data transmitted in the response to a request from a media player |
| 11 | +for an HTTP adaptive streaming media object. The response usually originates at an origin server |
| 12 | +and is then propagated through a series of intermediaries to the player. |
| 13 | + |
| 14 | +The purpose of the Common Media Server Data (CMSD) specification is to define a standard |
| 15 | +means by which every media server (intermediate and origin) can communicate data with each |
| 16 | +media object response and have it received and processed consistently by every intermediary |
| 17 | +and player, for the purpose of improving the efficiency and performance of distribution and |
| 18 | +ultimately the quality of experience enjoyed by the users. |
| 19 | + |
| 20 | +dash.js currently supports two CMSD keys, namely `etp` (estimated throughput) and `mb` (maximum suggested bitrate). |
| 21 | + |
| 22 | +## Configuration Options |
| 23 | + |
| 24 | +dash.js offers configuration options related to CMSD. The following settings can be configured: |
| 25 | + |
| 26 | +| Setting | Description | |
| 27 | +|----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
| 28 | +| `enabled` | Enable or disable the CMSD response headers parsing. | |
| 29 | +| `abr.applyMb` | Set to true if dash.js should apply the maximum suggested bitrate derived from the CMSD `mb` key in its ABR logic. | |
| 30 | +| `abr.etpWeightRatio` | Sets the weight ratio (between 0 and 1) that shall be applied on the value of the CMSD `etp` key compared to the measured throughput on client side. For instance, setting this value to 0.5 will result in an equal 50% weight on the throughput value provided by the server via CMSD and 50% weight on the throughput value calculated by dash.js on the client-side. | |
| 31 | + |
| 32 | +For a full documentation of all CMSD related options please refer to |
| 33 | +our [API documentation](https://cdn.dashjs.org/latest/jsdoc/module-Settings.html#~CmsdSettings). |
| 34 | + |
| 35 | +### Example configuration: |
| 36 | + |
| 37 | +````js |
| 38 | +player.updateSettings({ |
| 39 | + streaming: { |
| 40 | + cmsd: { |
| 41 | + enabled: true, |
| 42 | + abr: { |
| 43 | + applyMb: true, |
| 44 | + etpWeightRatio: 0.5 |
| 45 | + } |
| 46 | + }, |
| 47 | + }, |
| 48 | +}) |
| 49 | +```` |
| 50 | + |
0 commit comments