question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

invalid parameter when adding a token to a m3u8 url

See original GitHub issue

Hello! I am using "@mux/mux-node": "^3.1.0"

I am able to get a livestream and an assets video playback id just fine, but when I add a token query parameters has shown in the documentation

const token = Mux.JWT.sign('some-playback-id');
// https://stream.mux.com/some-playback-id.m3u8?token=${token}

(request then looks like this ```https://stream.mux.com/jqSQn4Vq3SmbRxGj9cZLEFJB7Eb00015jbYa3EY9dQE.m3u8?token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IlptZ…``

I get a the following error

{error: {messages: ["Invalid Parameters"], type: "invalid_parameters"}}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
dylanjhacommented, Dec 14, 2020

Thanks for the details @BjMrq. This is a support issue, not something specific to this particular library. If you don’t mind, I would still like to direct the conversation to support channels.

Since we’re here though, it looks like this playback ID (OzJrJ431iiyW702b4iceBClDHdRe01giL4lTcOIbxb98g) might be a public playback ID. In order to use tokens, make sure that you are dealing with a signed playback ID: https://docs.mux.com/docs/security-signed-urls

It’s an intentional design decision that token= cannot be used successfully with public playback IDs (we wouldn’t want users to be using tokens and give themselves the illusion of security, when in fact their playback ID is public).

If there is an issue with this particular SDK, we can open this back up, but for now let’s direct this towards Mux support (help@mux.com or the intercom chat bubble in the web application and we’ll be happy to help). Thanks!

0reactions
BjMrqcommented, Dec 14, 2020

Thanks for the clarifications @dylanjha !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding parameter to m3u8 url to all ts · Issue #4501
I have a m3u8 which is suppose like this, http://domain/hls/video.m3u8?token=variable. Now the thing is when exoplayer opens, the url passes ...
Read more >
Enabling URL token validation | Fastly Help Guides
To enable token validation, you'll need to create a Varnish configuration named vcl_recv and add the following example code to it.
Read more >
video streaming - ExoPlayer in Android not load with M3U8 ...
As described in the ExoPlayer docs, InvalidResponseCodeException is thrown when an attempt to open a connection results in a response code ...
Read more >
Alibaba Cloud CDN:M3U8 encryption and rewrite
After an M3U8 file is rewritten, encryption parameters are appended to the #EXT-X-KEY tag of the file. The encryption parameters include the ...
Read more >
Securing Video Content with Signed URLs | Mux blog
Supply the JWT in the resource URL using the 'token' query parameter. The Mux Video service will enforce the inspect and validate the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found