shaka-player: [ViacomCBS] - 4001 Error with Dash Manifests on Xbox

Have you read the Tutorials? Yes I have read it

Have you read the FAQ and checked for duplicate open issues? Yes I’ve read FAQ and couldn’t find relevant question. Also looked for duplicate open issues and didn’t see any.

What version of Shaka Player are you using? 3.2.0

Please ask your question

On Xbox whenever I attempt to play any Dash manifest I get this following error: 4001: MANIFEST.DASH_INVALID_XML

This only occurs on Xbox and not other platforms. Also this does not happen with Shaka Player 3.0.13. Not sure if anything changed with later versions of the player, or there is a problem with the XML schema. I’ve tried this with few different Dash manifests, including the following test asset from Bitmovin: https://bitmovin-a.akamaihd.net/content/MI201109210084_1/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd

This occurs on Shaka 3.2.0 prod release and I also tried master branch and can reproduce on both. I thought I would first ask question, before I file a ticket. I searched and didn’t find any duplicate tickets. Is this a known issue?

I tried this with very simple vanilla Shaka player configuration:

        const url = 'https://bitmovin-a.akamaihd.net/content/MI201109210084_1/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd';
        const video = document.querySelector('video');
        shaka.polyfill.installAll();
        shaka.log.setLevel(shaka.log.Level.DEBUG);
        const player = new shaka.Player(video);
        const config = player.getConfiguration();
        player.configure(config);

        player.load(url, 1500)
            .then((e) => {
                console.log('ready');
            })
            .catch((e) => {
                onError(e);
            });

        function onErrorEvent(event) {
            onError(event.detail);
        }

        function onError(error) {
            console.error('Error code', error.code, 'object', error);
        }

Some sort of guidance on this problem would be greatly appreciated.

20210915_110708

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (17 by maintainers)

Commits related to this issue

Most upvoted comments

We’re all going to get whiplash here. The debugger was printing the XML element objects in lowercase, even though the source isn’t.

So… no idea what’s wrong yet. 😢

@agajassi, we are happy to help. I’m only sorry it took so long to work out the root cause!

Please try with a TextDecoder polyfill installed, as we do in our demo and tests. This is a requirement for platforms without a native implementation, and not having it will cause shaka.Player.isBrowserSupported() to return false. This could be the root of your problem if you don’t have such a polyfill in your application on Xbox.

We install fastestsmallesttextencoderdecoder and load node_modules/fastestsmallesttextencoderdecoder/EncoderDecoderTogether.min.js. There is a brief mention in our v3 Upgrade Guide, but if this was too difficult to find, we can put something more obvious into the README.

Does this help? Does this change your test results? Does this explain the issue in your application?

My test code was run in the context of Karma, Jasmine, and our automated tests. shaka.test is defined there. If you’re extracting the code to run it in another way, you’ll need to make some changes.

shaka.test.Util.fetch can be replaced with the browser’s Fetch API (assuming Xbox has implemented that) or XMLHttpRequest, or even shaka.net.NetworkingEngine.request, though none of those have exactly the same API.

shaka.test.Loader.loadShaka is a utility to load the compiled bundle of Shaka Player into a local variable (instead of the global namespace). This may not be necessary. You can just skip the last test case (from const compiledShaka to manifest2), and try with the production build instead of debug to get the same effect.