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.

demandé il y a 2 ans233 vues
2 réponses
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
répondu il y a 2 ans
0
Réponse acceptée

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.

répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions