You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So when viewing a long video — especially if you pause it for a while and come back later — the viewer stops with an error message, and the load event handler is sent an error like this:
when Shaka's request for that next audio or video segment is denied with a 401 response.
(The players for other document types may have similar issues, but video is the one we're running into this issue with on a daily basis.)
To address this we need a few things:
Know when it's time to replace the token, by
a. detecting a "token expired" failure response when it happens, or
b. learning up-front what the token's lifetime is when it's first provided to the Preview, or
c. given a token, use some Box "tell me about this token" API to determine its expiration time.
Have some way to update the token used by the Preview.
Turns out this already exists! Preview has an updateToken method. Also, accessToken may be a Promise-returning function, in which case it might not need to do updateToken at all, just re-get using the already provided generator.
Downscoped tokens only live for about an hour.
So when viewing a long video — especially if you pause it for a while and come back later — the viewer stops with an error message, and the
load
event handler is sent an error like this:when Shaka's request for that next audio or video segment is denied with a 401 response.
(The players for other document types may have similar issues, but video is the one we're running into this issue with on a daily basis.)
To address this we need a few things:
a. detecting a "token expired" failure response when it happens, or
b. learning up-front what the token's lifetime is when it's first provided to the Preview, or
c. given a token, use some Box "tell me about this token" API to determine its expiration time.
updateToken
method. Also,accessToken
may be a Promise-returning function, in which case it might not need to doupdateToken
at all, just re-get using the already provided generator.The text was updated successfully, but these errors were encountered: