Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HLS Manifest requests shown up in requestFilter as having "undefined" type #2156

Closed
tri170391 opened this issue Sep 25, 2019 · 7 comments
Closed
Assignees
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@tri170391
Copy link

Have you read the FAQ and checked for duplicate open issues?
Yes

What version of Shaka Player are you using?
v2.5.5

Can you reproduce the issue with our latest release version?
Yes

Can you reproduce the issue with the latest code from master?
Yes

Are you using the demo app or your own custom app?
Custom app so I can add a request filter

If custom app, can you reproduce the issue using our demo app?
How can I add a request filter on the demo app?

What browser and OS are you using?
Chrome 76.0.3809.132 on Windows 10

For embedded devices (smart TVs, etc.), what model and firmware version are you using?
Not applicable for this issue.

What are the manifest and license server URIs?
https://storage.googleapis.com/shaka-demo-assets/bbb-dark-truths-hls/hls.m3u8

What did you do?

<html>
    <head>
        <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/shaka-player.compiled.min.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/mux.js"></script>
        <script>
            window.addEventListener("DOMContentLoaded", function() {
                shaka.polyfill.installAll();
                if (shaka.Player.isBrowserSupported()) {
                    var videoElement = document.getElementById('video');
                    var player = new shaka.Player(videoElement);
                    player.getNetworkingEngine().registerRequestFilter(function (type, request) {
                        console.log(type, request.uris);
                    });
                    player.load('https://storage.googleapis.com/shaka-demo-assets/bbb-dark-truths-hls/hls.m3u8');
                }
            });
        </script>
    </head>
    <body>
        <video controls autoplay muted id="video" width="640" height="380"></video>
    </body>
</html>

What did you expect to happen?
Manifest requests should have type 0, as logged to console.

What actually happened?
Actual test shows they have type undefined. Manifest requests property have type 0 when I play a DASH content.

@theodab
Copy link
Contributor

theodab commented Sep 25, 2019

If you load shaka-player.compiled.debug.js instead of shaka-player.compiled.min.js, it works as expected. So this looks like it might be a problem with how we are compiling.

How can I add a request filter on the demo app?

There's no good way at the moment; the demo resets the filters every time it loads an asset, so adding one manually via the developer console is a no-go. I tried this out by modifying the code of the demo page, though, and it reports the correct type.

@theodab theodab added type: bug Something isn't working correctly and removed needs triage labels Sep 25, 2019
@shaka-bot shaka-bot added this to the v2.6 milestone Sep 25, 2019
@CHaNGeTe
Copy link
Contributor

CHaNGeTe commented Nov 5, 2019

This issue is happening to me as well.
Always getting type undefined for HLS.
As loading the debug version is not an option. Is there any workaround for this?
Or in which version the bug was introduced?

@ismena
Copy link
Contributor

ismena commented Nov 5, 2019

@CHaNGeTe Does it still happen for you in the latest master?

(e g, if you try your content on our nightly demo page here: use the "+" button to try your manifest), are you still seeing the bug?

@TheModMaker
Copy link
Contributor

This should be fixed on master and will appear in v2.5.6 once I release it either today or later this week.

TheModMaker pushed a commit that referenced this issue Nov 6, 2019
Previously, the Closure compiler was causing a strange problem in
non-debug compiled builds in the HLS parser: when we make an alias for
shaka.net.NetworkingEngine.RequestType, if we access RequestType.SEGMENT
the value is undefined. However, if we store
shaka.net.NetworkingEngine.RequestType.SEGMENT in a variable, it works.
Looking at the compiled code, when shaka.net.NetworkingEngine.RequestType
is defined, SEGMENT seems to be treated as some special case, which might
explain this odd behavior.

Fixes #2156

Change-Id: I272dbc8b8db08ef8f9067c535c25890adae32440
@CHaNGeTe
Copy link
Contributor

CHaNGeTe commented Nov 7, 2019

@ismena is there any quick way to install nightlies via npm?

@CHaNGeTe
Copy link
Contributor

CHaNGeTe commented Nov 7, 2019

Thank you! it works on 2.5.6

@joeyparrish
Copy link
Member

Sorry, we only ship release builds (including betas) to npm, but not the nightly build. But I'm glad the new release is working for you!

@shaka-project shaka-project locked and limited conversation to collaborators Nov 24, 2019
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

7 participants