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.

已提問 2 年前檢視次數 233 次
2 個答案
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
已回答 2 年前
0
已接受的答案

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.

已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南