IVS: Passing token for private channel on video URL causes redirect and 403

0

Private channels recently stopped working for me using the IVS Web SDK. I generate my token server side, then call :

const player = IVSPlayer.create()
player.load(`${hlsURL}?token=${token}`)

Watching Chrome's network panel, it looks like the network request is cancelled by the player SDK, the token is removed, and the request is made again without the token, resulting in a 403.

Has anyone else experienced this? It's happening with player sdk v1.13 and v1.14. This was working but stopped at some point recently.

asked a year ago225 views
2 Answers
1

Hi There,

A few general recommendations going forward would be:

  • Manually ensuring via https://debug.ivsdemos.com that the specified playback URL and token are working as expected
  • Ensuring the token was created for the correct channel
  • Ensuring the token is not expired
  • Ensuring the aws:access-control-allow-origin parameter is either set correctly or not used when creating the token
  • Ensuring the token is valid with a tool such as https://jwt.io/

If you're still seeing the same behavior after the above, I'd recommend reaching out to AWS Support for further and more specific guidance - https://aws.amazon.com/contact-us/, so that they may further investigate internal logging and other relevant items.

profile picture
cbagdon
answered a year ago
0
Accepted Answer

I was able to fix this issue. The web player SDK appears to now be sensitive to the order some of the calls are made when initializing the player. Once I swapped the "attachHTMLVideoElement" / "setLiveLowLatencyEnabled" / "load" calls in my React app, it started working again for me.

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions