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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则