Add "isLivingRoomDeeplink" param to /player payload, and remove auto-refresh of browser based tokens
browser based tokens are fallbacks now.
This commit is contained in:
1 parent
ce32d2f762
commit
5c5fe19440
9 files changed
+14
-77
No files matched your search
@@ -180,8 +180,8 @@ export class PoTokenMinter {
|
||||
return now - device.mintedAt >= REFRESH_AGE_SECONDS;
|
||||
}
|
||||
|
||||
// Mints + uploads a poToken when the device's token needs refreshing, or always when forced.
|
||||
static async ensureDevicePoToken(force = false): Promise<EnsurePoTokenResult> {
|
||||
// Mints + uploads a poToken when the device's token needs refreshing.
|
||||
static async ensureDevicePoToken(): Promise<EnsurePoTokenResult> {
|
||||
let device: DevicePoToken;
|
||||
try {
|
||||
device = await PlayletApi.getDevicePoToken();
|
||||
@@ -194,7 +194,7 @@ export class PoTokenMinter {
|
||||
if (!identity) {
|
||||
return { status: "no-session" };
|
||||
}
|
||||
if (!force && !PoTokenMinter.shouldRefresh(device)) {
|
||||
if (!PoTokenMinter.shouldRefresh(device)) {
|
||||
return { status: "current" };
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user