HTML character references is not decoded correctly in Bitmovin player for DASH stream

Bitmovin team,
We encountered playback issue for DASH stream. On preliminary analysis, we found that the segment requests failed to resolve. Meanwhile we are getting successful response for the manifest request. Checking the payload for the manifest request and segment request we noticed a discrepancy. On further investigation it is confirmed that the Bitmovin Player is not decoding the HTML character references for the segment request. We have double confirmed that the stream is having functional playback in a Bitmovin test player. Please find the screenshots attached.

Attaching screenshot of payload of manifest request

Attaching screenshot of response of segment request

Hi @sanal.nandakumar , welcome to Bitmovin community and thanks for sharing this issue. Normally the query parameters required by your origin server/CDN should be also part of the segment URL’s provided in DASH MPD file. From above information it is not clear if the segment URL in DASH MPD contains required query parameters.

To allow us look into it can you please provide following additional information?

  • A sample player page where we can replicate this behaviour?
  • Sample DASH asset URL
  • A network trace of failing session(either HAR export or Charles capture)

Please find our response below :

  • A sample player page where we can replicate this behaviour?

Please follow the below steps to replicate the behavior
URL : Web UI

Username : 13754
Password : 12345678

Search for the asset : ‘Morgana: La Detective Genial’
Play the First Episode.

  • Sample DASH asset URL

MANIFEST URL - https://d24b4000n87410.cloudfront.net/mso_dish_mx/out/v1/bf7391e084e4463ca5296ddab09c3b89/1e6e97208715426abc619e4629cc173e/a3b7607296c04f9793c426b577caa68d/index.mpd?Policy=eyJTdGF0ZW1lbnQiOiBbeyJSZXNvdXJjZSI6Imh0dHBzOi8vZDI0YjQwMDBuODc0MTAuY2xvdWRmcm9udC5uZXQvbXNvX2Rpc2hfbXgvb3V0L3YxL2JmNzM5MWUwODRlNDQ2M2NhNTI5NmRkYWIwOWMzYjg5LzFlNmU5NzIwODcxNTQyNmFiYzYxOWU0NjI5Y2MxNzNlLyoiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE2ODgzMjEwNDB9fX1dfQ__&Signature=jXu1BIsu-NN05~Cg7RGkxfGjoMzUUDoXmMnm~sE9iv9hBTVyCyGGEkwuL3uAiDqDeK80-fYtNSEz2anAH9gvkgXko4PWjmff1y4ovcoSyy62zJqrfU3fuEvRruE3HrCOztjtT7pRKq1tuF-CoRQGacBRQOEZdIfSQj6pNjhOP7d8OrudTuEflp4~Iva7e0EQN6velGoP6YZU5P2SY5GrDP3Amjbbh1F4tYl-JPv1wSbMPoZss9aCUwTpOpIXrn0cC68goxp175JEBgq9zUUpkE7rVJDjwNo4xzp5aswUtt0y97Kl-r4XRoz1h5CYKUK7yA3H6qROw3ivmNZZCQcSFw__&Key-Pair-Id=KQE7CFI1XG05C&provider=ole0&cid=63ee387bf00a561a6bd61577

  • A network trace of failing session(either HAR export or Charles capture)

Please find the HAR export and Manifest files attached in the dropbox.
Dropbox - Bitmovin - HTML CR issue - Simplify your life

Thanks for sharing the details. I can replicate the behaviour and see that & encoding is present in the query parameters in segment URL’s in MPD file. This encoding is normally needed when & is being used in text in an HTML page. This is not required inside MPD file.

In HTML, the ampersand character (“&”) declares the beginning of an entity reference (a special character). If you want one to appear in text on a web page you should use the encoded named entity “&”

As a quick solution, you can use following network configuration to rewrite MPD response to replace all & with & and this should resolve the issue with segment requests.

    network: {
      preprocessHttpResponse: function (type, response) {         
        if (type === 'manifest/dash') {
          response.body = response.body.replaceAll(/&/g, '&');
        }
        return Promise.resolve(response);
      },
    },

Please let us know if this solution helps.

Hello Goyal,

Thank you for the response. We will check with the content provider with the given update. We will get back to you if in need of any further updates.

Sanal