Compare commits

..
8 Commits
Author SHA1 Message Date
Brahim Hadriche a07d92eaa9 Release v0.48.3 (#923) 2026-07-28 09:11:18 -04:00
Brahim Hadriche 4218dc7fd2 [chore] update dependencies (#920)
* update dependencies

* update token minter
2026-07-28 08:58:08 -04:00
Brahim Hadriche 95deab6ca4 telemetry fixes 2026-07-23 13:39:43 -04:00
Brahim Hadriche 156a4b5172 Remove volume handling from lounge 2026-07-19 15:36:56 -04:00
Brahim Hadriche a974670f8d Attempt to fix session data fetch errors 2026-07-18 22:33:48 -04:00
Brahim Hadriche e7cce7e71b Remove code branch where web app sends metadata 2026-07-17 19:22:14 -04:00
Brahim Hadriche d09facc9ff test fix 2026-07-16 21:57:27 -04:00
Brahim Hadriche 78102e747b Fixed display issues for 720p devices 2026-07-12 19:57:05 -04:00
61 changed files with 509 additions and 318 deletions

No files matched your search

+8
View File
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.48.3] - 2026-07-28
### Fixed
- Display issues for 720p devices
- Attempt to fix session data fetch errors
- Remove volume handing from cast, to avoid a possible "mute softlock" - feature will be added back later.
## [0.48.2] - 2026-07-11 ## [0.48.2] - 2026-07-11
### Fixed ### Fixed
+138 -17
View File
@@ -1,12 +1,12 @@
{ {
"name": "playlet", "name": "playlet",
"version": "0.48.2", "version": "0.48.3",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet", "name": "playlet",
"version": "0.48.2", "version": "0.48.3",
"hasInstallScript": true, "hasInstallScript": true,
"devDependencies": { "devDependencies": {
"@rokucommunity/bslint": "^0.8.44", "@rokucommunity/bslint": "^0.8.44",
@@ -14,13 +14,13 @@
"@types/fs-extra": "^11.0.4", "@types/fs-extra": "^11.0.4",
"@types/node": "^26.1.1", "@types/node": "^26.1.1",
"@types/xml2js": "^0.4.14", "@types/xml2js": "^0.4.14",
"argparse": "^2.0.1", "argparse": "^3.0.0",
"brighterscript": "0.73.0", "brighterscript": "0.73.0",
"brighterscript-formatter": "^1.8.1", "brighterscript-formatter": "^1.8.1",
"convert-svg-to-png": "^0.7.1", "convert-svg-to-png": "^0.7.1",
"crypto-js": "^4.2.0", "crypto-js": "^4.2.0",
"dotenv": "^17.4.2", "dotenv": "^17.4.2",
"fs-extra": "^11.3.6", "fs-extra": "^11.4.0",
"glob": "^13.0.6", "glob": "^13.0.6",
"imap": "^0.8.19", "imap": "^0.8.19",
"ip": "^2.0.1", "ip": "^2.0.1",
@@ -28,7 +28,7 @@
"mailparser": "^3.9.14", "mailparser": "^3.9.14",
"protocol-buffers-schema": "^3.6.1", "protocol-buffers-schema": "^3.6.1",
"puppeteer": "^25.3.0", "puppeteer": "^25.3.0",
"roku-deploy": "^3.17.7", "roku-deploy": "^3.18.2",
"roku-test-automation": "^2.2.2", "roku-test-automation": "^2.2.2",
"rooibos-roku": "5.16.4", "rooibos-roku": "5.16.4",
"rounded-rect-9patch": "^1.1.2", "rounded-rect-9patch": "^1.1.2",
@@ -869,10 +869,21 @@
"dev": true "dev": true
}, },
"node_modules/argparse": { "node_modules/argparse": {
"version": "2.0.1", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "resolved": "https://registry.npmjs.org/argparse/-/argparse-3.0.0.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "integrity": "sha512-BOp5NMrHqKxmq/OLr+clzzrRxgOKSLkcjmkWuChp7Irqwn4s74WjOBPIgWfA/HMcBnVkZ5XEuf9uUqzlpfCQ6A==",
"dev": true "dev": true,
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/puzrin"
},
{
"type": "github",
"url": "https://github.com/sponsors/nodeca"
}
],
"license": "Python-2.0"
}, },
"node_modules/array-flat-polyfill": { "node_modules/array-flat-polyfill": {
"version": "1.0.1", "version": "1.0.1",
@@ -2982,9 +2993,9 @@
} }
}, },
"node_modules/fs-extra": { "node_modules/fs-extra": {
"version": "11.3.6", "version": "11.4.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.6.tgz", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.4.0.tgz",
"integrity": "sha512-w8ZNZr2mKIc7qeNaQ9AVPT1+iFaI+Avd4xudVOvdDJ8VytREi1Ft5Ih7hd9jjehod8vAM5GMsfQ/TpPf4EyoEA==", "integrity": "sha512-EQsFzMUJkCKGr1ePqlYADkIUmHW1s3ZXr5Yqy6wbGrfUCphpl2maM/kyOIRA2HpP3AaFQTZXD4ldjek+nccddA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -3755,6 +3766,13 @@
"js-yaml": "bin/js-yaml.js" "js-yaml": "bin/js-yaml.js"
} }
}, },
"node_modules/js-yaml/node_modules/argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
"dev": true,
"license": "Python-2.0"
},
"node_modules/jsbn": { "node_modules/jsbn": {
"version": "0.1.1", "version": "0.1.1",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
@@ -6175,13 +6193,13 @@
} }
}, },
"node_modules/roku-deploy": { "node_modules/roku-deploy": {
"version": "3.17.7", "version": "3.18.2",
"resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.17.7.tgz", "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.18.2.tgz",
"integrity": "sha512-aEgi9Vq8/D0NhJzY97CtEUUgUwfR0/F20QR/JIMKXKDxAYt8alfgV217WShTbnFMyYYnJflTMRCHP2bJBbriGQ==", "integrity": "sha512-O0nO/hzhax6nhcwsk40Vdoq7RKm4n3OCJfc+Vr5OcV1YfSg5qeFt6gY3RG74QjZ+KrTO1A51XO0Oe1e4qV4O8w==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@types/request": "^2.48.13", "@rokucommunity/logger": "^0.4.1",
"chalk": "^2.4.2", "chalk": "^2.4.2",
"fast-glob": "^3.2.12", "fast-glob": "^3.2.12",
"fs-extra": "^7.0.1", "fs-extra": "^7.0.1",
@@ -6189,8 +6207,8 @@
"jsonc-parser": "^2.3.0", "jsonc-parser": "^2.3.0",
"jszip": "^3.6.0", "jszip": "^3.6.0",
"micromatch": "^4.0.4", "micromatch": "^4.0.4",
"needle": "^3.5.0",
"picomatch": "^2.3.2", "picomatch": "^2.3.2",
"postman-request": "^2.88.1-postman.48",
"semver": "^7.7.3", "semver": "^7.7.3",
"xml2js": "^0.5.0" "xml2js": "^0.5.0"
}, },
@@ -6198,6 +6216,69 @@
"roku-deploy": "dist/cli.js" "roku-deploy": "dist/cli.js"
} }
}, },
"node_modules/roku-deploy/node_modules/@rokucommunity/logger": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/@rokucommunity/logger/-/logger-0.4.1.tgz",
"integrity": "sha512-uONayZFyryEWTAm2BIs9sKZnVmA4DN/7/cV5s+ahNlhR7vUF4WKjfRANzxYVPLHgEoXqjjGS06g29zkMkWRB+g==",
"dev": true,
"license": "MIT",
"dependencies": {
"chalk": "^4.1.2"
}
},
"node_modules/roku-deploy/node_modules/@rokucommunity/logger/node_modules/chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"license": "MIT",
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/roku-deploy/node_modules/ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"license": "MIT",
"dependencies": {
"color-convert": "^2.0.1"
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
"node_modules/roku-deploy/node_modules/color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"color-name": "~1.1.4"
},
"engines": {
"node": ">=7.0.0"
}
},
"node_modules/roku-deploy/node_modules/color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"license": "MIT"
},
"node_modules/roku-deploy/node_modules/fs-extra": { "node_modules/roku-deploy/node_modules/fs-extra": {
"version": "7.0.1", "version": "7.0.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz",
@@ -6212,6 +6293,16 @@
"node": ">=6 <7 || >=8" "node": ">=6 <7 || >=8"
} }
}, },
"node_modules/roku-deploy/node_modules/has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/roku-deploy/node_modules/jsonfile": { "node_modules/roku-deploy/node_modules/jsonfile": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
@@ -6221,6 +6312,36 @@
"graceful-fs": "^4.1.6" "graceful-fs": "^4.1.6"
} }
}, },
"node_modules/roku-deploy/node_modules/needle": {
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/needle/-/needle-3.5.0.tgz",
"integrity": "sha512-jaQyPKKk2YokHrEg+vFDYxXIHTCBgiZwSHOoVx/8V3GIBS8/VN6NdVRmg8q1ERtPkMvmOvebsgga4sAj5hls/w==",
"dev": true,
"license": "MIT",
"dependencies": {
"iconv-lite": "^0.6.3",
"sax": "^1.2.4"
},
"bin": {
"needle": "bin/needle"
},
"engines": {
"node": ">= 4.4.x"
}
},
"node_modules/roku-deploy/node_modules/supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"license": "MIT",
"dependencies": {
"has-flag": "^4.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/roku-deploy/node_modules/universalify": { "node_modules/roku-deploy/node_modules/universalify": {
"version": "0.1.2", "version": "0.1.2",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
+4 -4
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet", "name": "playlet",
"version": "0.48.2", "version": "0.48.3",
"description": "Unofficial YouTube client for Roku", "description": "Unofficial YouTube client for Roku",
"devDependencies": { "devDependencies": {
"@rokucommunity/bslint": "^0.8.44", "@rokucommunity/bslint": "^0.8.44",
@@ -8,13 +8,13 @@
"@types/fs-extra": "^11.0.4", "@types/fs-extra": "^11.0.4",
"@types/node": "^26.1.1", "@types/node": "^26.1.1",
"@types/xml2js": "^0.4.14", "@types/xml2js": "^0.4.14",
"argparse": "^2.0.1", "argparse": "^3.0.0",
"brighterscript": "0.73.0", "brighterscript": "0.73.0",
"brighterscript-formatter": "^1.8.1", "brighterscript-formatter": "^1.8.1",
"convert-svg-to-png": "^0.7.1", "convert-svg-to-png": "^0.7.1",
"crypto-js": "^4.2.0", "crypto-js": "^4.2.0",
"dotenv": "^17.4.2", "dotenv": "^17.4.2",
"fs-extra": "^11.3.6", "fs-extra": "^11.4.0",
"glob": "^13.0.6", "glob": "^13.0.6",
"imap": "^0.8.19", "imap": "^0.8.19",
"ip": "^2.0.1", "ip": "^2.0.1",
@@ -22,7 +22,7 @@
"mailparser": "^3.9.14", "mailparser": "^3.9.14",
"protocol-buffers-schema": "^3.6.1", "protocol-buffers-schema": "^3.6.1",
"puppeteer": "^25.3.0", "puppeteer": "^25.3.0",
"roku-deploy": "^3.17.7", "roku-deploy": "^3.18.2",
"roku-test-automation": "^2.2.2", "roku-test-automation": "^2.2.2",
"rooibos-roku": "5.16.4", "rooibos-roku": "5.16.4",
"rounded-rect-9patch": "^1.1.2", "rounded-rect-9patch": "^1.1.2",
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "playlet-app", "name": "playlet-app",
"version": "0.48.2", "version": "0.48.3",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-app", "name": "playlet-app",
"version": "0.48.2" "version": "0.48.3"
} }
} }
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet-app", "name": "playlet-app",
"version": "0.48.2", "version": "0.48.3",
"description": "Unofficial YouTube client for Roku", "description": "Unofficial YouTube client for Roku",
"scripts": { "scripts": {
"prebuild": "node ../tools/rm.js ../build/playlet-app", "prebuild": "node ../tools/rm.js ../build/playlet-app",
+1 -1
View File
@@ -3,7 +3,7 @@ title=Playlet
# Do not update version manually, it is auto updated from package.json # Do not update version manually, it is auto updated from package.json
major_version=0 major_version=0
minor_version=48 minor_version=48
build_version=00002 build_version=00003
ui_resolutions=hd ui_resolutions=hd
uri_resolution_autosub=$$RES$$,480p,720p,1080p uri_resolution_autosub=$$RES$$,480p,720p,1080p
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "playlet-lib", "name": "playlet-lib",
"version": "0.48.2", "version": "0.48.3",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-lib", "name": "playlet-lib",
"version": "0.48.2" "version": "0.48.3"
} }
} }
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet-lib", "name": "playlet-lib",
"version": "0.48.2", "version": "0.48.3",
"description": "Unofficial YouTube client for Roku", "description": "Unofficial YouTube client for Roku",
"scripts": { "scripts": {
"prebuild": "node ../tools/rm.js ../build/playlet-lib", "prebuild": "node ../tools/rm.js ../build/playlet-lib",
@@ -38,7 +38,7 @@
<Group id="anchor"> <Group id="anchor">
<Poster <Poster
id="background" id="background"
uri="pkg:/images/button-ex.9.png"> uri="pkg:/images/button-ex.$$RES$$.9.png">
<Poster id="icon" /> <Poster id="icon" />
<Label <Label
id="label" id="label"
@@ -73,7 +73,7 @@
showRowLabel="[true]" showRowLabel="[true]"
rowFocusAnimationStyle="floatingfocus" rowFocusAnimationStyle="floatingfocus"
variableWidthItems="true" variableWidthItems="true"
focusBitmapUri="pkg:/images/focus-glow-padding-19.9.png" /> focusBitmapUri="pkg:/images/focus-glow-padding-30.$$RES$$.9.png" />
<Animation <Animation
id="scrollAnimation" id="scrollAnimation"
+6 -6
View File
@@ -15,14 +15,14 @@
height="720" height="720"
color="#242424" color="#242424"
opacity="0.9" opacity="0.9"
translation="[80,0]" translation="[62,0]"
visible="false"> visible="false">
</Rectangle> </Rectangle>
<Rectangle <Rectangle
id="Background" id="Background"
height="720" height="720"
width="80" width="62"
color="#242424" color="#242424"
opacity="0.9"> opacity="0.9">
@@ -30,13 +30,13 @@
id="LogoFav" id="LogoFav"
width="42" width="42"
height="42" height="42"
translation="[20, 48]" translation="[16, 48]"
uri="pkg:/images/logo-fav.png" /> uri="pkg:/images/logo-fav.png" />
<Poster <Poster
id="Logo" id="Logo"
width="106" width="106"
height="42" height="42"
translation="[20, 48]" translation="[16, 48]"
opacity="0" opacity="0"
uri="pkg:/images/logo-dark.png"> uri="pkg:/images/logo-dark.png">
<AppVersionLabel <AppVersionLabel
@@ -50,13 +50,13 @@
itemSize="[190,50]" itemSize="[190,50]"
itemComponentName="NavBarComponent" itemComponentName="NavBarComponent"
focusFootprintBitmapUri="" focusFootprintBitmapUri=""
focusBitmapUri="pkg:/images/white.9.png" focusBitmapUri="pkg:/images/white.$$RES$$.9.png"
focusBitmapBlendColor="0xFF1C30FF" focusBitmapBlendColor="0xFF1C30FF"
vertFocusAnimationStyle="floatingFocus" vertFocusAnimationStyle="floatingFocus"
numRows="7" numRows="7"
scrollSpeed="99999" scrollSpeed="99999"
itemSpacing="[0, 16]" itemSpacing="[0, 16]"
translation="[15, 150]"> translation="[13, 150]">
</MarkupList> </MarkupList>
</Rectangle> </Rectangle>
@@ -68,7 +68,7 @@
numRows="5" numRows="5"
vertFocusAnimationStyle="floatingFocus" vertFocusAnimationStyle="floatingFocus"
translation="[620,90]" translation="[620,90]"
focusBitmapUri="pkg:/images/focus-glow-padding-27.9.png" /> focusBitmapUri="pkg:/images/focus-glow-padding-42.$$RES$$.9.png" />
</Poster> </Poster>
</children> </children>
</component> </component>
@@ -43,7 +43,7 @@
showRowLabel="[true]" showRowLabel="[true]"
rowFocusAnimationStyle="floatingfocus" rowFocusAnimationStyle="floatingfocus"
variableWidthItems="true" variableWidthItems="true"
focusBitmapUri="pkg:/images/focus-glow-padding-19.9.png" /> focusBitmapUri="pkg:/images/focus-glow-padding-30.$$RES$$.9.png" />
</Group> </Group>
</children> </children>
</component> </component>
@@ -20,7 +20,7 @@
showRowLabel="[true]" showRowLabel="[true]"
rowFocusAnimationStyle="floatingfocus" rowFocusAnimationStyle="floatingfocus"
variableWidthItems="true" variableWidthItems="true"
focusBitmapUri="pkg:/images/focus-glow-padding-19.9.png" focusBitmapUri="pkg:/images/focus-glow-padding-30.$$RES$$.9.png"
/> />
</children> </children>
</component> </component>
@@ -33,7 +33,7 @@
itemSize="[500,500]" itemSize="[500,500]"
itemComponentName="BackendTypeRowListCell" itemComponentName="BackendTypeRowListCell"
rowFocusAnimationStyle="floatingfocus" rowFocusAnimationStyle="floatingfocus"
focusBitmapUri="pkg:/images/focus-glow-padding-19.9.png"> focusBitmapUri="pkg:/images/focus-glow-padding-30.$$RES$$.9.png">
<ContentNode role="content"> <ContentNode role="content">
<ContentNode> <ContentNode>
<!-- bs:disable-next-line LOCALE_MISSING_TRANSLATIONS --> <!-- bs:disable-next-line LOCALE_MISSING_TRANSLATIONS -->
@@ -17,6 +17,6 @@
focusXOffset="[165]" focusXOffset="[165]"
itemComponentName="ProfileRowListCell" itemComponentName="ProfileRowListCell"
rowFocusAnimationStyle="floatingfocus" rowFocusAnimationStyle="floatingfocus"
focusBitmapUri="pkg:/images/focus-glow-padding-19.9.png" /> focusBitmapUri="pkg:/images/focus-glow-padding-30.$$RES$$.9.png" />
</children> </children>
</component> </component>
@@ -35,7 +35,7 @@
numRows="4" numRows="4"
vertFocusAnimationStyle="floatingFocus" vertFocusAnimationStyle="floatingFocus"
translation="[40,120]" translation="[40,120]"
focusBitmapUri="pkg:/images/focus-glow-padding-27.9.png" /> focusBitmapUri="pkg:/images/focus-glow-padding-42.$$RES$$.9.png" />
</Rectangle> </Rectangle>
</children> </children>
</component> </component>
@@ -44,7 +44,7 @@
showRowLabel="[true]" showRowLabel="[true]"
rowFocusAnimationStyle="floatingfocus" rowFocusAnimationStyle="floatingfocus"
variableWidthItems="true" variableWidthItems="true"
focusBitmapUri="pkg:/images/focus-glow-padding-19.9.png" /> focusBitmapUri="pkg:/images/focus-glow-padding-30.$$RES$$.9.png" />
<Animation <Animation
id="scrollAnimation" id="scrollAnimation"
duration="0.3"> duration="0.3">
@@ -34,7 +34,7 @@
numRows="7" numRows="7"
vertFocusAnimationStyle="floatingFocus" vertFocusAnimationStyle="floatingFocus"
translation="[0,46]" translation="[0,46]"
focusBitmapUri="pkg:/images/white-border.9.png" /> focusBitmapUri="pkg:/images/white-border.$$RES$$.9.png" />
</children> </children>
</component> </component>
@@ -15,11 +15,11 @@
<children> <children>
<Poster <Poster
id="BackgroundFocused" id="BackgroundFocused"
uri="pkg:/images/white.9.png" uri="pkg:/images/white.$$RES$$.9.png"
visible="false" /> visible="false" />
<Poster <Poster
id="Background" id="Background"
uri="pkg:/images/white-border.9.png" /> uri="pkg:/images/white-border.$$RES$$.9.png" />
<LayoutGroup id="Container" itemSpacings="[5]"> <LayoutGroup id="Container" itemSpacings="[5]">
<Label id="DisplayTextLabel"> <Label id="DisplayTextLabel">
<Font role="font" uri="font:SystemFontFile" size="34" /> <Font role="font" uri="font:SystemFontFile" size="34" />
@@ -33,7 +33,7 @@
numRows="10" numRows="10"
vertFocusAnimationStyle="floatingFocus" vertFocusAnimationStyle="floatingFocus"
translation="[40,90]" translation="[40,90]"
focusBitmapUri="pkg:/images/focus-glow-padding-19.9.png" /> focusBitmapUri="pkg:/images/focus-glow-padding-30.$$RES$$.9.png" />
<ButtonEx <ButtonEx
id="saveButton" id="saveButton"
@@ -1,22 +1,17 @@
import "pkg:/components/JobSystem/Jobs.bs" import "pkg:/components/JobSystem/Jobs.bs"
import "pkg:/components/JobSystem/JobSystem.bs" import "pkg:/components/JobSystem/JobSystem.bs"
import "pkg:/components/Services/Innertube/Constants.bs" import "pkg:/components/Services/Innertube/Constants.bs"
import "pkg:/source/utils/StringUtils.bs"
function Init() function Init()
m.top.observeField("requestSessionData", FuncName(OnRequestSessionData))
end function end function
function OnNodeReady() function OnNodeReady()
QueueSessionDataJob() QueueSessionDataJob()
end function end function
function OnRequestSessionData() as void function EnsureSessionDataJob(_unused as dynamic) as object
sessionData = m.top.sessionData
if IsAssociativeArray(sessionData) and not StringUtils.IsNullOrEmpty(sessionData.visitorData) and not StringUtils.IsNullOrEmpty(sessionData.livingRoomPoTokenId)
return
end if
QueueSessionDataJob() QueueSessionDataJob()
return m.innertubeSessionDataJob
end function end function
function QueueSessionDataJob() as void function QueueSessionDataJob() as void
@@ -33,6 +28,9 @@ function QueueSessionDataJob() as void
end function end function
function OnInnertubeSessionDataJobDone(event as object) as void function OnInnertubeSessionDataJobDone(event as object) as void
JobSystem.UnobserveCallback(event.getRoSGNode()) node = event.getRoSGNode()
m.innertubeSessionDataJob = invalid JobSystem.UnobserveCallback(node)
if m.innertubeSessionDataJob <> invalid and m.innertubeSessionDataJob.isSameNode(node)
m.innertubeSessionDataJob = invalid
end if
end function end function
@@ -1,7 +1,7 @@
<component name="Innertube" extends="Node" includes="AutoBind"> <component name="Innertube" extends="Node" includes="AutoBind">
<interface> <interface>
<field id="sessionData" type="assocarray" alwaysNotify="true" /> <field id="sessionData" type="assocarray" alwaysNotify="true" />
<field id="requestSessionData" type="boolean" alwaysNotify="true" />
<field id="jobQueue" type="node" /> <field id="jobQueue" type="node" />
<function name="EnsureSessionDataJob" />
</interface> </interface>
</component> </component>
@@ -58,6 +58,7 @@ class LoungeApi
commandHandlers = {} commandHandlers = {}
commandHandlers[COMMAND_TYPE_NOOP] = m.HandleIgnoreCommand commandHandlers[COMMAND_TYPE_NOOP] = m.HandleIgnoreCommand
commandHandlers[COMMAND_TYPE_GET_VOLUME] = m.HandleIgnoreCommand commandHandlers[COMMAND_TYPE_GET_VOLUME] = m.HandleIgnoreCommand
commandHandlers[COMMAND_TYPE_SET_VOLUME] = m.HandleIgnoreCommand
commandHandlers[COMMAND_TYPE_GET_SUBTITLES_TRACK] = m.HandleIgnoreCommand commandHandlers[COMMAND_TYPE_GET_SUBTITLES_TRACK] = m.HandleIgnoreCommand
commandHandlers[COMMAND_TYPE_SET_SUBTITLES] = m.HandleIgnoreCommand commandHandlers[COMMAND_TYPE_SET_SUBTITLES] = m.HandleIgnoreCommand
commandHandlers[COMMAND_TYPE_SET_AUDIO_TRACK] = m.HandleIgnoreCommand commandHandlers[COMMAND_TYPE_SET_AUDIO_TRACK] = m.HandleIgnoreCommand
@@ -78,7 +79,6 @@ class LoungeApi
commandHandlers[COMMAND_TYPE_G_SESSION_ID] = m.HandleGSessionId commandHandlers[COMMAND_TYPE_G_SESSION_ID] = m.HandleGSessionId
commandHandlers[COMMAND_TYPE_LOUNGE_STATUS] = m.HandleLoungeStatus commandHandlers[COMMAND_TYPE_LOUNGE_STATUS] = m.HandleLoungeStatus
commandHandlers[COMMAND_TYPE_REMOTE_CONNECTED] = m.HandleRemoteConnected commandHandlers[COMMAND_TYPE_REMOTE_CONNECTED] = m.HandleRemoteConnected
commandHandlers[COMMAND_TYPE_SET_VOLUME] = m.HandleSetVolume
commandHandlers[COMMAND_TYPE_SET_PLAYLIST] = m.HandleSetPlaylist commandHandlers[COMMAND_TYPE_SET_PLAYLIST] = m.HandleSetPlaylist
commandHandlers[COMMAND_TYPE_UPDATE_PLAYLIST] = m.HandleUpdatePlaylist commandHandlers[COMMAND_TYPE_UPDATE_PLAYLIST] = m.HandleUpdatePlaylist
commandHandlers[COMMAND_TYPE_PAUSE] = m.HandlePause commandHandlers[COMMAND_TYPE_PAUSE] = m.HandlePause
@@ -422,20 +422,6 @@ class LoungeApi
LoungeDeviceConnected.ShowNotifcation(m.notificationsNode, deviceName, userName, userAvatarUri) LoungeDeviceConnected.ShowNotifcation(m.notificationsNode, deviceName, userName, userAvatarUri)
end function end function
function HandleSetVolume(_commandId as integer, _commandType as string, commandArgs as object, _messagesToSend as object) as void
player = m.videoQueueNode.player
if player = invalid
return
end if
volume = Val(commandArgs["volume"])
isMute = volume = 0
LogInfo("Setting volume is not supported:", volume, "but can mute:", isMute)
' TODO:P2 volume should be set to the lounge state.
' Also the state needs to be separate from the player, since SponsorBlock can mute sections.
player.mute = isMute
end function
function HandleSetPlaylist(_commandId as integer, commandType as string, commandArgs as object, _messagesToSend as object) function HandleSetPlaylist(_commandId as integer, commandType as string, commandArgs as object, _messagesToSend as object)
LogDebug(commandType, commandArgs) LogDebug(commandType, commandArgs)
' TODO:P2 ctt: credentialTransferToken ' TODO:P2 ctt: credentialTransferToken
@@ -1,7 +1,6 @@
' Outgoing commands ' Outgoing commands
const COMMAND_NOW_PLAYING = "nowPlaying" const COMMAND_NOW_PLAYING = "nowPlaying"
const COMMAND_ON_STATE_CHANGE = "onStateChange" const COMMAND_ON_STATE_CHANGE = "onStateChange"
const COMMAND_ON_VOLUME_CHANGED = "onVolumeChanged"
const COMMAND_ON_PREVIOUS_NEXT_CHANGE = "onHasPreviousNextChanged" const COMMAND_ON_PREVIOUS_NEXT_CHANGE = "onHasPreviousNextChanged"
const COMMAND_ON_PLAYBACK_SPEED_CHANGED = "onPlaybackSpeedChanged" const COMMAND_ON_PLAYBACK_SPEED_CHANGED = "onPlaybackSpeedChanged"
const COMMAND_LOUNGE_SCREEN_DISCONNECTED = "loungeScreenDisconnected" const COMMAND_LOUNGE_SCREEN_DISCONNECTED = "loungeScreenDisconnected"
@@ -58,8 +57,6 @@ const FIELD_LIST_ID = "listId"
const FIELD_MDX_EXPANDED_RECEIVER_VIDEO_ID_LIST = "mdxExpandedReceiverVideoIdList" const FIELD_MDX_EXPANDED_RECEIVER_VIDEO_ID_LIST = "mdxExpandedReceiverVideoIdList"
const FIELD_CURRENT_TIME = "currentTime" const FIELD_CURRENT_TIME = "currentTime"
const FIELD_DURATION = "duration" const FIELD_DURATION = "duration"
const FIELD_VOLUME = "volume"
const FIELD_MUTED = "muted"
const FIELD_CPN = "cpn" const FIELD_CPN = "cpn"
const FIELD_CTT = "ctt" const FIELD_CTT = "ctt"
const FIELD_CURRENT_INDEX = "currentIndex" const FIELD_CURRENT_INDEX = "currentIndex"
@@ -11,7 +11,7 @@
height="100" height="100"
opacity="0.9" opacity="0.9"
blendColor="#414141" blendColor="#414141"
uri="pkg:/images/white.9.png"> uri="pkg:/images/white.$$RES$$.9.png">
<CirclePoster <CirclePoster
id="thumbnailPoster" id="thumbnailPoster"
@@ -11,7 +11,7 @@
height="70" height="70"
opacity="0.8" opacity="0.8"
blendColor="#414141" blendColor="#414141"
uri="pkg:/images/white.9.png"> uri="pkg:/images/white.$$RES$$.9.png">
<Poster <Poster
uri="libpkg:/images/LogoSponsorBlockSimple256px.png" uri="libpkg:/images/LogoSponsorBlockSimple256px.png"
width="50" width="50"
@@ -48,6 +48,7 @@ function TelemetryLoop() as void
m.dist = GetDist(m.tags) m.dist = GetDist(m.tags)
m.userId = GetUserId() m.userId = GetUserId()
ReportSessionStart()
ReportLastExitCrash() ReportLastExitCrash()
m.top.observeField("LogInfo", msgPort) m.top.observeField("LogInfo", msgPort)
@@ -153,6 +154,18 @@ function TelemetryLoop() as void
end while end while
end function end function
function ReportSessionStart() as void
Sentry.SendEvents([{
level: "info"
message: "[SESSION] start"
fingerprint: ["session start"]
release: m.release
dist: m.dist
tags: m.tags
userId: m.userId
}])
end function
function GetTags() as object function GetTags() as object
appInfo = m.applicationInfo appInfo = m.applicationInfo
tags = appInfo@.GetAppInfo() tags = appInfo@.GetAppInfo()
@@ -33,58 +33,59 @@ function ExecuteJob() as void
service = new Invidious.InvidiousService(invidiousNode) service = new Invidious.InvidiousService(invidiousNode)
backend = preferencesNode["backend.selected"] backend = preferencesNode["backend.selected"]
metadata = contentNode.metadata backendId = ResolveBackendId(backend, service)
if not IsAssociativeArray(metadata) contentNode.addFields({ backend: backendId })
cancellation = JobGetCancellation() contentNode.backend = backendId
if backend = "playlet"
sessionData = GetSessionData(innertubeNode, cancellation) cancellation = JobGetCancellation()
if sessionData.cancel = true if backend = "playlet"
JobCancel()
return
end if
if sessionData.error <> invalid
JobError(sessionData.error)
return
end if
accessToken = invalid sessionData = GetSessionData(innertubeNode, cancellation)
onBehalfOfUser = invalid if sessionData.cancel = true
profileNode = invalid JobCancel()
profile = profilesService.currentProfile return
if profile <> invalid and profile.type = "youtube"
auth = ProfileContentAuthTokenUtils.EnsureFreshAccessToken(profile)
if auth.state = ProfileContentAuthTokenUtils.AccessTokenState.NeedsReauth
JobError(Locale.Dialogs.ProfileNeedsReauthMessage)
return
end if
if auth.state = ProfileContentAuthTokenUtils.AccessTokenState.Ok
accessToken = auth.token
onBehalfOfUser = auth.activeIdentifyToken
profileNode = profile
end if
end if
metadata = InnertubeService.GetVideoMetadata(contentNode.videoId, {
"cancellation": cancellation
"credentialTransferToken": loungeServiceNode.credentialTransferToken
"visitorData": sessionData.visitorData
"livingRoomPoTokenId": sessionData.livingRoomPoTokenId
"accessToken": accessToken
"onBehalfOfUser": onBehalfOfUser
"profileNode": profileNode
"profilesService": profilesService
})
if IsAssociativeArray(metadata)
contentNode.addFields({
potAttached: ValidBool(metadata.potAttached)
potSource: ValidString(metadata.potSource)
loggedIn: not StringUtils.IsNullOrEmpty(accessToken)
})
end if
else
metadata = service.GetVideoMetadata(contentNode.videoId, { cancellation: m.top.cancellation })
end if end if
if sessionData.error <> invalid
JobError(sessionData.error)
return
end if
accessToken = invalid
onBehalfOfUser = invalid
profileNode = invalid
profile = profilesService.currentProfile
if profile <> invalid and profile.type = "youtube"
auth = ProfileContentAuthTokenUtils.EnsureFreshAccessToken(profile)
if auth.state = ProfileContentAuthTokenUtils.AccessTokenState.NeedsReauth
JobError(Locale.Dialogs.ProfileNeedsReauthMessage)
return
end if
if auth.state = ProfileContentAuthTokenUtils.AccessTokenState.Ok
accessToken = auth.token
onBehalfOfUser = auth.activeIdentifyToken
profileNode = profile
end if
end if
metadata = InnertubeService.GetVideoMetadata(contentNode.videoId, {
"cancellation": cancellation
"credentialTransferToken": loungeServiceNode.credentialTransferToken
"visitorData": sessionData.visitorData
"livingRoomPoTokenId": sessionData.livingRoomPoTokenId
"accessToken": accessToken
"onBehalfOfUser": onBehalfOfUser
"profileNode": profileNode
"profilesService": profilesService
})
if IsAssociativeArray(metadata)
contentNode.addFields({
potAttached: ValidBool(metadata.potAttached)
potSource: ValidString(metadata.potSource)
loggedIn: not StringUtils.IsNullOrEmpty(accessToken)
})
end if
else
metadata = service.GetVideoMetadata(contentNode.videoId, { cancellation: m.top.cancellation })
end if end if
if JobIsCancelled() if JobIsCancelled()
@@ -180,17 +181,30 @@ function GetSessionData(innertubeNode as object, cancellation as object) as obje
return sessionData return sessionData
end if end if
callback = innertubeNode.callFunc("EnsureSessionDataJob", invalid)
port = CreateObject("roMessagePort") port = CreateObject("roMessagePort")
MessagePortUtils.ObserveFieldScopedExSafe(innertubeNode, "sessionData", port) MessagePortUtils.ObserveFieldScopedExSafe(innertubeNode, "sessionData", port)
MessagePortUtils.ObserveFieldScopedExSafe(callback, "done", port)
CancellationUtils.ObserveCancellationScoped(cancellation, port) CancellationUtils.ObserveCancellationScoped(cancellation, port)
innertubeNode.requestSessionData = true cancelled = false
message = wait(30000, port) while not SessionDataComplete(innertubeNode.sessionData) and callback.done <> true
message = wait(30000, port)
if message = invalid
exit while
end if
if CancellationUtils.IsCancellationEvent(cancellation, message)
cancelled = true
exit while
end if
end while
innertubeNode.unobserveFieldScoped("sessionData") innertubeNode.unobserveFieldScoped("sessionData")
callback.unobserveFieldScoped("done")
CancellationUtils.UnobserveCancellationScoped(cancellation) CancellationUtils.UnobserveCancellationScoped(cancellation)
if message <> invalid and CancellationUtils.IsCancellationEvent(cancellation, message) if cancelled
return { return {
cancel: true cancel: true
} }
@@ -210,6 +224,16 @@ function SessionDataComplete(sessionData as object) as boolean
return IsAssociativeArray(sessionData) and not StringUtils.IsNullOrEmpty(sessionData.visitorData) and not StringUtils.IsNullOrEmpty(sessionData.livingRoomPoTokenId) return IsAssociativeArray(sessionData) and not StringUtils.IsNullOrEmpty(sessionData.visitorData) and not StringUtils.IsNullOrEmpty(sessionData.livingRoomPoTokenId)
end function end function
function ResolveBackendId(backend as string, service as Invidious.InvidiousService) as string
if backend = "playlet"
return "playlet"
end if
if service.GetInstance() = Invidious.PLAYLET_BUILT_IN_INSTANCE
return "built-in"
end if
return "invidious"
end function
function CreateStreamUrls(metadata as object, service as Invidious.InvidiousService, preferences as object, backend as string, playletServerPort as integer) as object function CreateStreamUrls(metadata as object, service as Invidious.InvidiousService, preferences as object, backend as string, playletServerPort as integer) as object
instance = service.GetInstance() instance = service.GetInstance()
proxyVideos = preferences["invidious.proxy_videos"] proxyVideos = preferences["invidious.proxy_videos"]
@@ -805,7 +805,7 @@ function EnforceTransportFreeze(source as string) as void
LogErrorNoTelemetry(healInfo) LogErrorNoTelemetry(healInfo)
if m.healCount <= INV_D1_TELEMETRY_CAP if m.healCount <= INV_D1_TELEMETRY_CAP
LogTelemetryEvent({ LogTelemetryEvent({
level: "error" level: "warning"
message: healInfo message: healInfo
fingerprint: ["INV-D1 heal", m.transport.transportMode, source] fingerprint: ["INV-D1 heal", m.transport.transportMode, source]
}) })
@@ -842,7 +842,7 @@ end function
function SendHealSummary() as void function SendHealSummary() as void
if m.healCount > INV_D1_TELEMETRY_CAP if m.healCount > INV_D1_TELEMETRY_CAP
LogTelemetryEvent({ LogTelemetryEvent({
level: "error" level: "warning"
message: `INV-D1 heal: ${m.healCount} heals over one content (${m.healCount - INV_D1_TELEMETRY_CAP} past the telemetry cap)` message: `INV-D1 heal: ${m.healCount} heals over one content (${m.healCount - INV_D1_TELEMETRY_CAP} past the telemetry cap)`
fingerprint: ["INV-D1 heal suppressed"] fingerprint: ["INV-D1 heal suppressed"]
}) })
@@ -1152,7 +1152,7 @@ function OnVideoContentJobDone(event as object) as void
content = m.top.content content = m.top.content
if not info.success if not info.success
LogError("VideoContentJob FAILED:", info.error) LogError(`VideoContentJob FAILED: ${info.error}\nbackend: ${ContentBackend(content)}`)
decision = ErrorDialogController.DecideContentJobFailure(content, info.error) decision = ErrorDialogController.DecideContentJobFailure(content, info.error)
ShowErrorDialog(decision) ShowErrorDialog(decision)
Lounge.SendOnStateChange() Lounge.SendOnStateChange()
@@ -1442,6 +1442,13 @@ function GetPlayerErrorData(videoId as string, errorInfo as object) as object
return { title: title, body: body, fingerprint: fingerprint } return { title: title, body: body, fingerprint: fingerprint }
end function end function
function ContentBackend(content as object) as string
if content <> invalid and not StringUtils.IsNullOrEmpty(content.backend)
return content.backend
end if
return "unknown"
end function
' Send a stream error to telemetry. For malformed-data errors, attach the last generated DASH/HLS manifest and ' Send a stream error to telemetry. For malformed-data errors, attach the last generated DASH/HLS manifest and
' player response so the failure can be diagnosed from the report. ' player response so the failure can be diagnosed from the report.
function ReportVideoError(errorData as object, url as dynamic, urls as object, urlIndex as dynamic, shownInDialog as boolean) as void function ReportVideoError(errorData as object, url as dynamic, urls as object, urlIndex as dynamic, shownInDialog as boolean) as void
@@ -1464,21 +1471,19 @@ function ReportVideoError(errorData as object, url as dynamic, urls as object, u
data: ValidString(ReadAsciiFile("cachefs:/last_player_response.json")) data: ValidString(ReadAsciiFile("cachefs:/last_player_response.json"))
}] }]
end if end if
potAttached = "false" potAttached = false
potSource = "none" potSource = "none"
loggedIn = "false" loggedIn = false
content = m.top.content content = m.top.content
if content <> invalid if content <> invalid
if ValidBool(content.potAttached) potAttached = ValidBool(content.potAttached)
potAttached = "true" loggedIn = ValidBool(content.loggedIn)
end if
if not StringUtils.IsNullOrEmpty(content.potSource) if not StringUtils.IsNullOrEmpty(content.potSource)
potSource = content.potSource potSource = content.potSource
end if end if
if ValidBool(content.loggedIn)
loggedIn = "true"
end if
end if end if
backend = ContentBackend(content)
isLive = m.transport.isLive
message = [ message = [
errorData.title errorData.title
errorData.body errorData.body
@@ -1491,11 +1496,15 @@ function ReportVideoError(errorData as object, url as dynamic, urls as object, u
`pot_attached: ${potAttached}` `pot_attached: ${potAttached}`
`pot_source: ${potSource}` `pot_source: ${potSource}`
`logged_in: ${loggedIn}` `logged_in: ${loggedIn}`
`backend: ${backend}`
`is_live: ${isLive}`
].Join(Chr(10)) ].Join(Chr(10))
errorData.fingerprint.Push(shownInDialog) errorData.fingerprint.Push(shownInDialog)
errorData.fingerprint.Push(potAttached) errorData.fingerprint.Push(potAttached)
errorData.fingerprint.Push(potSource) errorData.fingerprint.Push(potSource)
errorData.fingerprint.Push(loggedIn) errorData.fingerprint.Push(loggedIn)
errorData.fingerprint.Push(backend)
errorData.fingerprint.Push(isLive)
if shownInDialog if shownInDialog
level = "error" level = "error"
else else
@@ -151,6 +151,10 @@ function TestPlaybackErrorDialog(errorFields as object) as object
playletStreamUrls: [] playletStreamUrls: []
playletStreamUrlIndex: 0 playletStreamUrlIndex: 0
}) })
if errorFields.backend <> invalid
content.addField("backend", "string", false)
content.backend = errorFields.backend
end if
m.top.content = content m.top.content = content
m.top.errorMsg = errorFields.errorMsg m.top.errorMsg = errorFields.errorMsg
@@ -183,6 +183,38 @@ namespace Tests
m.assertTrue(snap.title.Instr("dQw4w9WgXcQ") >= 0, "dialog title dropped the videoId") m.assertTrue(snap.title.Instr("dQw4w9WgXcQ") >= 0, "dialog title dropped the videoId")
end function end function
@it("the reported playback error carries the serving backend and the live flag")
function _()
m.top.callFunc("TestPlaybackErrorDialog", {
videoId: "dQw4w9WgXcQ"
errorMsg: "no valid bitrates"
errorCode: -5
errorStr: "buffer:loop:demux:Errors seen on all bitrates:last_err:503"
errorInfo: { category: "mediaerror", source: "buffer:loop:demux", ignored: false }
backend: "built-in"
})
reported = m.global.telemetry.LogEvent
m.assertTrue(reported.message.Instr("backend: built-in") > 0, "got: " + reported.message)
m.assertTrue(reported.message.Instr("is_live: false") > 0, "got: " + reported.message)
m.assertTrue(reported.message.Instr("pot_attached: false") > 0, "got: " + reported.message)
m.assertArrayContains(reported.fingerprint, "built-in")
end function
@it("a playback error on a content node with no backend reports it as unknown")
function _()
m.top.callFunc("TestPlaybackErrorDialog", {
videoId: "dQw4w9WgXcQ"
errorMsg: "no valid bitrates"
errorCode: -5
errorStr: "buffer:loop:demux:Errors seen on all bitrates:last_err:403"
errorInfo: { category: "mediaerror", source: "buffer:loop:demux", ignored: false }
})
reported = m.global.telemetry.LogEvent
m.assertTrue(reported.message.Instr("backend: unknown") > 0, "got: " + reported.message)
end function
' Up/Down reveal the chrome when it is hidden in idle (they otherwise do nothing). ' Up/Down reveal the chrome when it is hidden in idle (they otherwise do nothing).
@it("Up reveals the chrome when it is hidden in idle") @it("Up reveals the chrome when it is hidden in idle")
function _() function _()
@@ -11,7 +11,7 @@
width="500" width="500"
height="144" height="144"
opacity="0.9" opacity="0.9"
uri="pkg:/images/white.9.png"> uri="pkg:/images/white.$$RES$$.9.png">
<Poster <Poster
id="thumbnailPoster" id="thumbnailPoster"
@@ -50,7 +50,7 @@
numRows="6" numRows="6"
vertFocusAnimationStyle="floatingFocus" vertFocusAnimationStyle="floatingFocus"
translation="[20,90]" translation="[20,90]"
focusBitmapUri="pkg:/images/focus-glow-padding-27.9.png" /> focusBitmapUri="pkg:/images/focus-glow-padding-42.$$RES$$.9.png" />
</Rectangle> </Rectangle>
<Animation id="showAnimation" <Animation id="showAnimation"
@@ -36,7 +36,7 @@
<Poster <Poster
id="highlightPoster" id="highlightPoster"
blendColor="0xFF1C30" blendColor="0xFF1C30"
uri="pkg:/images/queue-highlight.9.png" uri="pkg:/images/queue-highlight.$$RES$$.9.png"
width="164" width="164"
height="94" /> height="94" />
<Label <Label
@@ -91,9 +91,6 @@ namespace Http
instance = m.invidiousService.GetInstance() instance = m.invidiousService.GetInstance()
contentNode = InvidiousContent.ToRowCellContentNode(payload, instance) contentNode = InvidiousContent.ToRowCellContentNode(payload, instance)
if IsAssociativeArray(payload.metadata)
contentNode.addFields({ metadata: payload.metadata })
end if
nodeType = contentNode.type nodeType = contentNode.type
File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 873 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 861 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 897 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 292 B

After

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1017 B

After

Width:  |  Height:  |  Size: 1017 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 985 B

After

Width:  |  Height:  |  Size: 985 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 721 B

+1 -1
View File
@@ -3,7 +3,7 @@ title=PlayletLib
# Do not update version manually, it is auto updated from package.json # Do not update version manually, it is auto updated from package.json
major_version=0 major_version=0
minor_version=48 minor_version=48
build_version=00002 build_version=00003
ui_resolutions=hd ui_resolutions=hd
uri_resolution_autosub=$$RES$$,480p,720p,1080p uri_resolution_autosub=$$RES$$,480p,720p,1080p
@@ -38,7 +38,7 @@ namespace Tests
msg = wait(1000, messagePort) msg = wait(1000, messagePort)
if msg = invalid if msg = invalid
m.testSuite.fail("Waiting for job messages timed out after 1000ms") m.fail("Waiting for job messages timed out after 1000ms")
exit while exit while
end if end if
@@ -85,7 +85,7 @@ namespace Tests
msg = wait(1000, messagePort) msg = wait(1000, messagePort)
if msg = invalid if msg = invalid
m.testSuite.fail("Waiting for job messages timed out after 1000ms") m.fail("Waiting for job messages timed out after 1000ms")
exit while exit while
end if end if
@@ -95,7 +95,7 @@ namespace Tests
if info.cancel and not info.success if info.cancel and not info.success
cancelCalls += 1 cancelCalls += 1
else if info.success else if info.success
m.testSuite.fail("Job should not have succeeded after cancellation") m.fail("Job should not have succeeded after cancellation")
exit while exit while
end if end if
end if end if
@@ -126,7 +126,7 @@ namespace Tests
msg = wait(1000, messagePort) msg = wait(1000, messagePort)
if msg = invalid if msg = invalid
m.testSuite.fail("Waiting for job messages timed out after 1000ms") m.fail("Waiting for job messages timed out after 1000ms")
exit while exit while
end if end if
@@ -136,7 +136,7 @@ namespace Tests
if info.cancel and not info.success if info.cancel and not info.success
cancelCalls += 1 cancelCalls += 1
else if info.success else if info.success
m.testSuite.fail("Job should not have succeeded after cancellation") m.fail("Job should not have succeeded after cancellation")
exit while exit while
end if end if
end if end if
@@ -161,11 +161,11 @@ namespace Tests
msg = wait(1000, messagePort) msg = wait(1000, messagePort)
if msg = invalid if msg = invalid
m.testSuite.fail("Waiting for job error message timed out after 1000ms") m.fail("Waiting for job error message timed out after 1000ms")
end if end if
if type(msg) <> "roSGNodeEvent" or msg.getField() <> "done" if type(msg) <> "roSGNodeEvent" or msg.getField() <> "done"
m.testSuite.fail("Expected a done event for the job error") m.fail("Expected a done event for the job error")
end if end if
done = msg.getData() done = msg.getData()
+141 -131
View File
@@ -1,34 +1,34 @@
{ {
"name": "playlet-web", "name": "playlet-web",
"version": "0.48.2", "version": "0.48.3",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "playlet-web", "name": "playlet-web",
"version": "0.48.2", "version": "0.48.3",
"devDependencies": { "devDependencies": {
"@sveltejs/vite-plugin-svelte": "^7.2.0", "@sveltejs/vite-plugin-svelte": "^7.2.0",
"@tailwindcss/postcss": "^4.3.2", "@tailwindcss/postcss": "^4.3.3",
"@tailwindcss/typography": "^0.5.20", "@tailwindcss/typography": "^0.5.20",
"@tsconfig/svelte": "^5.0.8", "@tsconfig/svelte": "^5.0.8",
"@vitejs/plugin-legacy": "^8.2.0", "@vitejs/plugin-legacy": "^8.2.2",
"autoprefixer": "^10.5.2", "autoprefixer": "^10.5.4",
"bgutils-js": "^3.2.0", "bgutils-js": "^4.0.2",
"daisyui": "^5.6.16", "daisyui": "^5.7.0",
"dotenv": "^17.4.2", "dotenv": "^17.4.2",
"ip": "^2.0.1", "ip": "^2.0.1",
"jszip": "^3.10.1", "jszip": "^3.10.1",
"postcss": "^8.5.16", "postcss": "^8.5.23",
"rollup-plugin-visualizer": "^7.0.1", "rollup-plugin-visualizer": "^7.0.1",
"svelte": "^5.56.4", "svelte": "^5.56.8",
"svelte-check": "^4.7.2", "svelte-check": "^4.7.3",
"svelte-preprocess": "6.0.3", "svelte-preprocess": "6.0.3",
"tailwindcss": "^4.3.2", "tailwindcss": "^4.3.3",
"terser": "^5.49.0", "terser": "^5.49.0",
"tslib": "^2.8.1", "tslib": "^2.8.1",
"typescript": "^5.9.3", "typescript": "^5.9.3",
"vite": "^8.1.4", "vite": "^8.1.5",
"vite-plugin-compression": "^0.5.1" "vite-plugin-compression": "^0.5.1"
} }
}, },
@@ -2006,49 +2006,49 @@
} }
}, },
"node_modules/@tailwindcss/node": { "node_modules/@tailwindcss/node": {
"version": "4.3.2", "version": "4.3.3",
"resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.2.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.3.tgz",
"integrity": "sha512-yWP/sqEcBLaD8JuA6zNwxoYKr75qxTioYwlRwekj5Jr/I5GXnoJfjetH/psLUIv74cYTH2lBUEzBkinthoYcBg==", "integrity": "sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@jridgewell/remapping": "^2.3.5", "@jridgewell/remapping": "^2.3.5",
"enhanced-resolve": "5.21.6", "enhanced-resolve": "^5.24.1",
"jiti": "^2.7.0", "jiti": "^2.7.0",
"lightningcss": "1.32.0", "lightningcss": "1.32.0",
"magic-string": "^0.30.21", "magic-string": "^0.30.21",
"source-map-js": "^1.2.1", "source-map-js": "^1.2.1",
"tailwindcss": "4.3.2" "tailwindcss": "4.3.3"
} }
}, },
"node_modules/@tailwindcss/oxide": { "node_modules/@tailwindcss/oxide": {
"version": "4.3.2", "version": "4.3.3",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.2.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.3.tgz",
"integrity": "sha512-z8ZgnzX8gdNoWLBLqBPoh/sjnxkwvf9ZuWjnO0l0yIzbLa5/9S+eC5QxGZKRobVHIC3/1BoMWjHblqWjcgFgag==", "integrity": "sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">= 20" "node": ">= 20"
}, },
"optionalDependencies": { "optionalDependencies": {
"@tailwindcss/oxide-android-arm64": "4.3.2", "@tailwindcss/oxide-android-arm64": "4.3.3",
"@tailwindcss/oxide-darwin-arm64": "4.3.2", "@tailwindcss/oxide-darwin-arm64": "4.3.3",
"@tailwindcss/oxide-darwin-x64": "4.3.2", "@tailwindcss/oxide-darwin-x64": "4.3.3",
"@tailwindcss/oxide-freebsd-x64": "4.3.2", "@tailwindcss/oxide-freebsd-x64": "4.3.3",
"@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.2", "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.3",
"@tailwindcss/oxide-linux-arm64-gnu": "4.3.2", "@tailwindcss/oxide-linux-arm64-gnu": "4.3.3",
"@tailwindcss/oxide-linux-arm64-musl": "4.3.2", "@tailwindcss/oxide-linux-arm64-musl": "4.3.3",
"@tailwindcss/oxide-linux-x64-gnu": "4.3.2", "@tailwindcss/oxide-linux-x64-gnu": "4.3.3",
"@tailwindcss/oxide-linux-x64-musl": "4.3.2", "@tailwindcss/oxide-linux-x64-musl": "4.3.3",
"@tailwindcss/oxide-wasm32-wasi": "4.3.2", "@tailwindcss/oxide-wasm32-wasi": "4.3.3",
"@tailwindcss/oxide-win32-arm64-msvc": "4.3.2", "@tailwindcss/oxide-win32-arm64-msvc": "4.3.3",
"@tailwindcss/oxide-win32-x64-msvc": "4.3.2" "@tailwindcss/oxide-win32-x64-msvc": "4.3.3"
} }
}, },
"node_modules/@tailwindcss/oxide-android-arm64": { "node_modules/@tailwindcss/oxide-android-arm64": {
"version": "4.3.2", "version": "4.3.3",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.2.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.3.tgz",
"integrity": "sha512-WHxqIuHpvZ5VtdX6GTl1Ik/Vp2YuN42Et+0CdeaVd/frQ9jAvGmvR8vLT+jk3e8/Q3x8kECB9+R17pgpp2BulA==", "integrity": "sha512-Y85A2gmPSkl5Ve5qR86GL4HT509cFqQh1aes9p3sSkyTPwt0Pppf3GkwGe4JPACcRYjgJIEhQgM6dBClnr0NYw==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -2063,9 +2063,9 @@
} }
}, },
"node_modules/@tailwindcss/oxide-darwin-arm64": { "node_modules/@tailwindcss/oxide-darwin-arm64": {
"version": "4.3.2", "version": "4.3.3",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.2.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.3.tgz",
"integrity": "sha512-GZypeUY/IDJW3877KeM+O67vbXr3MBnbtEL4aYhNErv/JWZhye2vGSWWG9tB6iiqR2MqRNkY8IOUy4NdSZV26w==", "integrity": "sha512-BiaWatpBcERQFDlOjRDpIVXuFK5PJez5SA4JMg6VYZdBYU+qKfV/vqjcIs+IYmtitf1xYQZTwXvU/8y4lfZUGw==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -2080,9 +2080,9 @@
} }
}, },
"node_modules/@tailwindcss/oxide-darwin-x64": { "node_modules/@tailwindcss/oxide-darwin-x64": {
"version": "4.3.2", "version": "4.3.3",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.2.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.3.tgz",
"integrity": "sha512-UIIzmefR6KO1sDU7MzRqAxC8iBpft/VhkGjTjnhoS6k7Z3rQ9wEgA1ODSiyH/tcSYssulNm4Ci3hOeK1jH7ccQ==", "integrity": "sha512-fAeUqfV5ndhxRwai8cXGzdLvul9utWOmeTkv69unv4ZXixjn61Z+p9lCWdwOwA3TYboG3BwdVuN/RDjhBRl0mw==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -2097,9 +2097,9 @@
} }
}, },
"node_modules/@tailwindcss/oxide-freebsd-x64": { "node_modules/@tailwindcss/oxide-freebsd-x64": {
"version": "4.3.2", "version": "4.3.3",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.2.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.3.tgz",
"integrity": "sha512-GN+uAmcI6DNspnCDwtOAZrTz6oukJnp337qZvxqCGLd3BHBzJpO0ZbTLRvJNdztOeAmTzewewGIMPb0tk2R4WA==", "integrity": "sha512-iyf5bV6+wnAlflVeEy7R25dupxTNECZN5QMI0qNT6eT+EgaGdZcKhGkr5SdoaWiLJ3spLqIY9VCeSGrwmtg4kw==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -2114,9 +2114,9 @@
} }
}, },
"node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": {
"version": "4.3.2", "version": "4.3.3",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.2.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.3.tgz",
"integrity": "sha512-4ABn7qSbdHRwTiDiuWNegCyb5+2FJ4vKIKc3DmKrvAFw7MU1Lm11dIkTPwUaFdTzc7IsOpDbqBrlh0x6y36U/w==", "integrity": "sha512-aAYUprJAJQWWbRrPvtjdroZ56Md+JM8pMiopS6xGEwDfLhqj+2ver2p4nU4Mb3CRqcMmNBjo8KkUgcxhkzVQGQ==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@@ -2131,9 +2131,9 @@
} }
}, },
"node_modules/@tailwindcss/oxide-linux-arm64-gnu": { "node_modules/@tailwindcss/oxide-linux-arm64-gnu": {
"version": "4.3.2", "version": "4.3.3",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.2.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.3.tgz",
"integrity": "sha512-wDgEIGwoM8w8pufh9LVt1PahDgNdKXrLC2qfAnV3vAmococ9RWbxeAw4pxPttd/TsJfwjyLf90Dg1y9y8I6Emw==", "integrity": "sha512-nDxldcEENOxZRzC2uu9jrutZdAAQtb+8WWDCSnWL1zvBk1+FN+x6MtDViPB5AJMfttVCUhehGWus3XBPgatM/w==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -2148,9 +2148,9 @@
} }
}, },
"node_modules/@tailwindcss/oxide-linux-arm64-musl": { "node_modules/@tailwindcss/oxide-linux-arm64-musl": {
"version": "4.3.2", "version": "4.3.3",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.2.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.3.tgz",
"integrity": "sha512-J5Nuk0uZQIiMTJj3LEx4sAA9tMFUoXQZFv1J6An+QGYe53HKRJuFDi0rpq/tuouCZeAbOBY3kQ6g8qeD4TUjtA==", "integrity": "sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -2165,9 +2165,9 @@
} }
}, },
"node_modules/@tailwindcss/oxide-linux-x64-gnu": { "node_modules/@tailwindcss/oxide-linux-x64-gnu": {
"version": "4.3.2", "version": "4.3.3",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.2.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.3.tgz",
"integrity": "sha512-kqCZpSKOBEJO4mz7OqWoofBZeXTAwaVGPj0ErAj7CojmhKpWVWVOnrt9dE8odoIraZq4oj3ausM37kXi+Tow8w==", "integrity": "sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -2182,9 +2182,9 @@
} }
}, },
"node_modules/@tailwindcss/oxide-linux-x64-musl": { "node_modules/@tailwindcss/oxide-linux-x64-musl": {
"version": "4.3.2", "version": "4.3.3",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.2.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.3.tgz",
"integrity": "sha512-cixpqbh2toJDmkuCRI68nXA8ZxNmdK9Y+9v5h3MC3ZQKy/0BO8AWzlkWyRM7JAFSGBlfig4YVTPsK6MVgqz1uw==", "integrity": "sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -2199,9 +2199,9 @@
} }
}, },
"node_modules/@tailwindcss/oxide-wasm32-wasi": { "node_modules/@tailwindcss/oxide-wasm32-wasi": {
"version": "4.3.2", "version": "4.3.3",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.2.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.3.tgz",
"integrity": "sha512-4ec2Z/LOmRsAgU23CS4xeJfcJlmRg94A/XrbGRCF1gyU/zdDfRLYDVsS+ynSZCmGNxQ1jQriQOKMQeQxBA3Isw==", "integrity": "sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ==",
"bundleDependencies": [ "bundleDependencies": [
"@napi-rs/wasm-runtime", "@napi-rs/wasm-runtime",
"@emnapi/core", "@emnapi/core",
@@ -2229,9 +2229,9 @@
} }
}, },
"node_modules/@tailwindcss/oxide-win32-arm64-msvc": { "node_modules/@tailwindcss/oxide-win32-arm64-msvc": {
"version": "4.3.2", "version": "4.3.3",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.2.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.3.tgz",
"integrity": "sha512-Zyr/M0+XcYZu3bZrUytc7TXvrk0ftWfl8gN2MwekNDzhqhKRUucMPSeOzM0o0wH5AWOU49BsKRrfKxI2atCPMQ==", "integrity": "sha512-3rc292Ca2ceK6Ulcc/bAVnTs/3nDtoPhyEKlgPv+yQJQi/JS/AMJlqzxvlDacL1nekbrcf6bTqp/jV4qgnPxNQ==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -2246,9 +2246,9 @@
} }
}, },
"node_modules/@tailwindcss/oxide-win32-x64-msvc": { "node_modules/@tailwindcss/oxide-win32-x64-msvc": {
"version": "4.3.2", "version": "4.3.3",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.2.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.3.tgz",
"integrity": "sha512-QI9BO7KlNZsp2GuO0jwAAj5jCDABOKXRkCk2XuKTSaNEFSdfzqswYVTtCHBNKHLsqyjFyFkqlDiwkNbTYSssMQ==", "integrity": "sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -2263,17 +2263,17 @@
} }
}, },
"node_modules/@tailwindcss/postcss": { "node_modules/@tailwindcss/postcss": {
"version": "4.3.2", "version": "4.3.3",
"resolved": "https://registry.npmjs.org/@tailwindcss/postcss/-/postcss-4.3.2.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/postcss/-/postcss-4.3.3.tgz",
"integrity": "sha512-rjVWYCa7Ngbi5AarT6k8TkxUG3Wl1QKzHdIZVsjZSzf36Jmo2IKZt/NHRAwly8oDkbBOH0YTu+CHuf9jPxMc+g==", "integrity": "sha512-JTSZZGQi1AyKirbLN3azmjVzef92tcX7h+iSqPdaeStyFpGpDlKvvpxeOE8njhbUanbRwr3z8DyzhICWnMtQeg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@alloc/quick-lru": "^5.2.0", "@alloc/quick-lru": "^5.2.0",
"@tailwindcss/node": "4.3.2", "@tailwindcss/node": "4.3.3",
"@tailwindcss/oxide": "4.3.2", "@tailwindcss/oxide": "4.3.3",
"postcss": "^8.5.15", "postcss": "^8.5.16",
"tailwindcss": "4.3.2" "tailwindcss": "4.3.3"
} }
}, },
"node_modules/@tailwindcss/typography": { "node_modules/@tailwindcss/typography": {
@@ -2322,9 +2322,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/@vitejs/plugin-legacy": { "node_modules/@vitejs/plugin-legacy": {
"version": "8.2.0", "version": "8.2.2",
"resolved": "https://registry.npmjs.org/@vitejs/plugin-legacy/-/plugin-legacy-8.2.0.tgz", "resolved": "https://registry.npmjs.org/@vitejs/plugin-legacy/-/plugin-legacy-8.2.2.tgz",
"integrity": "sha512-Im1k/PEBgSVs1N8s5+WMWpBd4G7jQAHJsIo+DUvP1H5HCqDSFtKwP2SFfFICD65cq85CYWS6PjEfsj0wTNt7KQ==", "integrity": "sha512-4RpSqLedwx9Ffu2MH3iCadVBIu7Swfr5O6R9SDnzPmBzQ6gyfKgNuQZKlBDYl5dM8XDsR7srPqbjbBgHVUWV3g==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -2334,10 +2334,10 @@
"@babel/preset-env": "^7.29.7", "@babel/preset-env": "^7.29.7",
"babel-plugin-polyfill-corejs3": "^0.14.2", "babel-plugin-polyfill-corejs3": "^0.14.2",
"babel-plugin-polyfill-regenerator": "^0.6.8", "babel-plugin-polyfill-regenerator": "^0.6.8",
"browserslist": "^4.28.4", "browserslist": "^4.28.6",
"browserslist-to-esbuild": "^2.1.1", "browserslist-to-esbuild": "^2.1.1",
"core-js": "^3.49.0", "core-js": "^3.49.0",
"magic-string": "^0.30.21", "magic-string": "^1.0.0",
"regenerator-runtime": "^0.14.1", "regenerator-runtime": "^0.14.1",
"systemjs": "^6.15.1" "systemjs": "^6.15.1"
}, },
@@ -2352,6 +2352,16 @@
"vite": "^8.0.0" "vite": "^8.0.0"
} }
}, },
"node_modules/@vitejs/plugin-legacy/node_modules/magic-string": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.1.0.tgz",
"integrity": "sha512-kS3VHe0nEPST2saQV4Rbkchcd3UBRkVTQHo1D3h/ZTwFDhai/mfKkmtPAtD129EOI7K3HlHIsFOt0WrI2/oU9g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@jridgewell/sourcemap-codec": "^1.5.5"
}
},
"node_modules/acorn": { "node_modules/acorn": {
"version": "8.16.0", "version": "8.16.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz",
@@ -2405,9 +2415,9 @@
} }
}, },
"node_modules/autoprefixer": { "node_modules/autoprefixer": {
"version": "10.5.2", "version": "10.5.4",
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.5.2.tgz", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.5.4.tgz",
"integrity": "sha512-rD5t5DwOjJdmSORcTq64j8MawTC+tbQ+HHqjR4NDumamy/ambn1UJrlKL+KdwujWxMkFjPM3pPHOEA9tl4767Q==", "integrity": "sha512-MaU0U/za7N3r6brxD4YB/l4NSrFzLPlANv6wEuQVaIPlD3L4W9rFcQPbL/EilY9BHhHvhfcz3gInDLrEtWT4EA==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@@ -2425,8 +2435,8 @@
], ],
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"browserslist": "^4.28.4", "browserslist": "^4.28.6",
"caniuse-lite": "^1.0.30001799", "caniuse-lite": "^1.0.30001806",
"fraction.js": "^5.3.4", "fraction.js": "^5.3.4",
"picocolors": "^1.1.1", "picocolors": "^1.1.1",
"postcss-value-parser": "^4.2.0" "postcss-value-parser": "^4.2.0"
@@ -2494,9 +2504,9 @@
} }
}, },
"node_modules/baseline-browser-mapping": { "node_modules/baseline-browser-mapping": {
"version": "2.10.42", "version": "2.11.1",
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.42.tgz", "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.1.tgz",
"integrity": "sha512-c/jurFrDLyui7o1J86yLkRu4LMsTYcBohveus7/I2Hzdn9KIP2bdJPTue/lR1KH46enoPbD77GKeSYNdyPoD3Q==", "integrity": "sha512-HYXq73DDpCtNzOmrFsm9eSwCvWCql0RzqjpDzXN9EadiLJ4DNat0nsZ/Bzmy+Ud12mb4/zKDY0cQ805ZzN+i0A==",
"dev": true, "dev": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"bin": { "bin": {
@@ -2507,9 +2517,9 @@
} }
}, },
"node_modules/bgutils-js": { "node_modules/bgutils-js": {
"version": "3.2.0", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/bgutils-js/-/bgutils-js-3.2.0.tgz", "resolved": "https://registry.npmjs.org/bgutils-js/-/bgutils-js-4.0.2.tgz",
"integrity": "sha512-CacO15JvxbclbLeCAAm9DETGlLuisRGWpPigoRvNsccSCPEC4pwYwA2g2x/pv7Om/sk79d4ib35V5HHmxPBpDg==", "integrity": "sha512-PyZRxSkwC2MyVtIidD0DejgeNQfb9p3N/wY/d9sa3zAFeMTg6nDMv99wPYoUMU8JhzgG22ZVTnCzAcbfzKPVfQ==",
"dev": true, "dev": true,
"funding": [ "funding": [
"https://github.com/sponsors/LuanRT" "https://github.com/sponsors/LuanRT"
@@ -2517,9 +2527,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/browserslist": { "node_modules/browserslist": {
"version": "4.28.5", "version": "4.28.7",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.5.tgz", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.7.tgz",
"integrity": "sha512-Cu2E6QejHWzuDMTkuwgpABFgDfZrXLQq5V13YOACZx4mFAG4IwGTbTfHPMr4WtxlHoXSM8FIuRwYYCz5XiabaQ==", "integrity": "sha512-JxV13hNrFxqjOc8alRbq9dK1MM79NEXYpma2B2J4wAtpWS5zIEIKqWPGCl7N4o7Uc7B7itylh7SuDujATRyyTw==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@@ -2537,10 +2547,10 @@
], ],
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"baseline-browser-mapping": "^2.10.42", "baseline-browser-mapping": "^2.10.44",
"caniuse-lite": "^1.0.30001800", "caniuse-lite": "^1.0.30001806",
"electron-to-chromium": "^1.5.387", "electron-to-chromium": "^1.5.393",
"node-releases": "^2.0.50", "node-releases": "^2.0.51",
"update-browserslist-db": "^1.2.3" "update-browserslist-db": "^1.2.3"
}, },
"bin": { "bin": {
@@ -2593,9 +2603,9 @@
} }
}, },
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001803", "version": "1.0.30001806",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001803.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001806.tgz",
"integrity": "sha512-g/uHREV2ZpK9qMalCsWaxmA6ol+DX8GYhuf3T40RKoP+oL7vhRJh8LNt73PCjpnR6l14FzfPrB5Yux4PKm2meg==", "integrity": "sha512-72Cuvd95zbSYPKq6Fhg8eDJRlzgWDf7/mtoZv6Qe/DYNCEBdNxoA3+rZAU2ZhGCpZlns3EssFavaZomckT5Uuw==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@@ -2752,9 +2762,9 @@
} }
}, },
"node_modules/daisyui": { "node_modules/daisyui": {
"version": "5.6.16", "version": "5.7.0",
"resolved": "https://registry.npmjs.org/daisyui/-/daisyui-5.6.16.tgz", "resolved": "https://registry.npmjs.org/daisyui/-/daisyui-5.7.0.tgz",
"integrity": "sha512-A5/IrcFCXyfzQ7M2fnKVPfMbKCVu0xeM7/G22gK1XRcp2dgA39kvFOeEAK8f2KpJJQJ+s9Jc5pZoJoYsPEJ8JQ==", "integrity": "sha512-2/kYbxaKtv349lPrTyxMKC9SHsyA7fBULMSabJljDE82D079cjqz+UyAzsogWgy4sTs5NDvD000acfcFqbO1XA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"funding": { "funding": {
@@ -2863,9 +2873,9 @@
} }
}, },
"node_modules/electron-to-chromium": { "node_modules/electron-to-chromium": {
"version": "1.5.389", "version": "1.5.396",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.389.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.396.tgz",
"integrity": "sha512-cEto7aeOqBfU1D+c5py5pE+ooscKE75JifxLBdFUZsqAxRS6y7kebtxAZvICszSl05gPjYHDTjY+lXpyGvpJbg==", "integrity": "sha512-yHiw2Y3C3H9U6TMbOfoWK/BPreiOPXRfTWPBwQBoZG6/8TB6eOPnsy5oaRYuatR7Fw2SJ4kKforgufeo7fq0EQ==",
"dev": true, "dev": true,
"license": "ISC" "license": "ISC"
}, },
@@ -2877,9 +2887,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/enhanced-resolve": { "node_modules/enhanced-resolve": {
"version": "5.21.6", "version": "5.24.3",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.21.6.tgz", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.24.3.tgz",
"integrity": "sha512-aNnGCvbJ/RIyWo1IuhNdVjnNF+EjH9wpzpNHt+ci/m9He9LJvUN8wrCcXjp9cWsGNAuvSpVFTx/vraAFQ8qGjQ==", "integrity": "sha512-PwKooW9JUzh5chmYfHM3IQl5OkK2u2Nm011MgeZrss3JmFraUx/fqrf78kk8GUMYoibx/14MdwTl/1WKkG7TpQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -3603,9 +3613,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/nanoid": { "node_modules/nanoid": {
"version": "3.3.12", "version": "3.3.16",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.16.tgz",
"integrity": "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==", "integrity": "sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@@ -3698,9 +3708,9 @@
} }
}, },
"node_modules/postcss": { "node_modules/postcss": {
"version": "8.5.16", "version": "8.5.23",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.16.tgz", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.23.tgz",
"integrity": "sha512-vuwillviilfKZsg0VGj5R/YwwcHx4SLsIOI/7K6mQkWx+l5cUHTjj5g0AasTBcyXsbfTgrwsUNmVUb5xVwyPwg==", "integrity": "sha512-g50586zr4bZmwFiTlflMu8E0bDTb5I5gertgwAKmsdUlTQIhZtunzUlD1WSzwcVWPoAVpsrA6vlfCD7oXvRwgg==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@@ -3718,7 +3728,7 @@
], ],
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"nanoid": "^3.3.12", "nanoid": "^3.3.16",
"picocolors": "^1.1.1", "picocolors": "^1.1.1",
"source-map-js": "^1.2.1" "source-map-js": "^1.2.1"
}, },
@@ -4111,9 +4121,9 @@
} }
}, },
"node_modules/svelte": { "node_modules/svelte": {
"version": "5.56.4", "version": "5.56.8",
"resolved": "https://registry.npmjs.org/svelte/-/svelte-5.56.4.tgz", "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.56.8.tgz",
"integrity": "sha512-/d0QHehmRuJW8gVz395MTkPcPozxzdjBMBE8oEYGz8O3b9KTMzzQ9ZHJQLuFKOHOPQbU6kx/X4iid/EBBzH7iw==", "integrity": "sha512-PY8LOw7xP6c8IOiVqdo0sbbZVYhXRSfklOQLAUyGBKqjTX0wx/z4l/9J+PmBpmlLnxzEb1NqltxQ5/wZme/Cmg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -4139,9 +4149,9 @@
} }
}, },
"node_modules/svelte-check": { "node_modules/svelte-check": {
"version": "4.7.2", "version": "4.7.3",
"resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-4.7.2.tgz", "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-4.7.3.tgz",
"integrity": "sha512-GoS4XJdGswlq0rIT1vtFLzJY1bvHtY37McY9H9Gkm1Ggw/ICdZYn8J/Z8Yi0BEL0i3R4+jtaWVePjyppMlij/A==", "integrity": "sha512-DHdTCGX62R0fCxBEaT+USdASAnoaRBaaNczkRJl0K7o3WyoCeVUbVxo6fKqpOll/B+WMWCsiFK0eFrJSNBKZIg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -4227,9 +4237,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/tailwindcss": { "node_modules/tailwindcss": {
"version": "4.3.2", "version": "4.3.3",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.2.tgz", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.3.tgz",
"integrity": "sha512-WtctNNSH8A9jlMIqxzuYumOHU5uGZyRv0Q5svQl+oEPy5w84YpBxdb7MdqyiSPQge5jTJ6zFQLq0PFygdccSBA==", "integrity": "sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ==",
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
@@ -4397,16 +4407,16 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/vite": { "node_modules/vite": {
"version": "8.1.4", "version": "8.1.5",
"resolved": "https://registry.npmjs.org/vite/-/vite-8.1.4.tgz", "resolved": "https://registry.npmjs.org/vite/-/vite-8.1.5.tgz",
"integrity": "sha512-bTT9PsdWO+MQMNG9ZXIP/qM9wGh37DFxTV/sPq9cFpHr3w4jkgef032PkAL9jAqhk3Nz8NQw3O8n6/xFkqO4QQ==", "integrity": "sha512-7ULLwsCdYx/nRyrpiEwvqb5TFHrMVZyBt+rg/OAXT7rgj/z+DtTDyKFeLAdDkubDVDKD8jOsndmy7m55XcfUsw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"lightningcss": "^1.32.0", "lightningcss": "^1.32.0",
"picomatch": "^4.0.5", "picomatch": "^4.0.5",
"postcss": "^8.5.16", "postcss": "^8.5.17",
"rolldown": "~1.1.4", "rolldown": "~1.1.5",
"tinyglobby": "^0.2.17" "tinyglobby": "^0.2.17"
}, },
"bin": { "bin": {
+11 -11
View File
@@ -1,6 +1,6 @@
{ {
"name": "playlet-web", "name": "playlet-web",
"version": "0.48.2", "version": "0.48.3",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
@@ -10,26 +10,26 @@
}, },
"devDependencies": { "devDependencies": {
"@sveltejs/vite-plugin-svelte": "^7.2.0", "@sveltejs/vite-plugin-svelte": "^7.2.0",
"@tailwindcss/postcss": "^4.3.2", "@tailwindcss/postcss": "^4.3.3",
"@tailwindcss/typography": "^0.5.20", "@tailwindcss/typography": "^0.5.20",
"@tsconfig/svelte": "^5.0.8", "@tsconfig/svelte": "^5.0.8",
"@vitejs/plugin-legacy": "^8.2.0", "@vitejs/plugin-legacy": "^8.2.2",
"autoprefixer": "^10.5.2", "autoprefixer": "^10.5.4",
"bgutils-js": "^3.2.0", "bgutils-js": "^4.0.2",
"daisyui": "^5.6.16", "daisyui": "^5.7.0",
"dotenv": "^17.4.2", "dotenv": "^17.4.2",
"ip": "^2.0.1", "ip": "^2.0.1",
"jszip": "^3.10.1", "jszip": "^3.10.1",
"postcss": "^8.5.16", "postcss": "^8.5.23",
"rollup-plugin-visualizer": "^7.0.1", "rollup-plugin-visualizer": "^7.0.1",
"svelte": "^5.56.4", "svelte": "^5.56.8",
"svelte-check": "^4.7.2", "svelte-check": "^4.7.3",
"svelte-preprocess": "6.0.3", "svelte-preprocess": "6.0.3",
"tailwindcss": "^4.3.2", "tailwindcss": "^4.3.3",
"terser": "^5.49.0", "terser": "^5.49.0",
"tslib": "^2.8.1", "tslib": "^2.8.1",
"typescript": "^5.9.3", "typescript": "^5.9.3",
"vite": "^8.1.4", "vite": "^8.1.5",
"vite-plugin-compression": "^0.5.1" "vite-plugin-compression": "^0.5.1"
} }
} }
+14 -22
View File
@@ -1,6 +1,9 @@
import { getHost } from "lib/Api/Host"; import { getHost } from "lib/Api/Host";
import { PlayletApi } from "lib/Api/PlayletApi"; import { PlayletApi } from "lib/Api/PlayletApi";
import { BG, buildURL, GOOG_API_KEY, type WebPoSignalOutput, type BgConfig } from "bgutils-js"; import { BotGuardClient, getChallenge } from "bgutils-js/botguard";
import { WebPoMinter } from "bgutils-js/webpo";
import { buildURL, getHeaders } from "bgutils-js/utils";
import type { WebPoSignalOutput } from "bgutils-js/shared-types";
// Fallback lifetime when GenerateIT reports no TTL. // Fallback lifetime when GenerateIT reports no TTL.
const DEFAULT_POTOKEN_TTL_SECONDS = 60 * 60 * 6; const DEFAULT_POTOKEN_TTL_SECONDS = 60 * 60 * 6;
@@ -23,7 +26,7 @@ interface DevicePoToken {
// Mints a GVS poToken in the browser (BotGuard) and hands it to the Roku. // Mints a GVS poToken in the browser (BotGuard) and hands it to the Roku.
export class PoTokenMinter { export class PoTokenMinter {
static webPoMinter: BG.WebPoMinter; static webPoMinter: WebPoMinter;
static webPoMinterPromise: Promise<void>; static webPoMinterPromise: Promise<void>;
static integrityTokenExpiresAtMs = 0; static integrityTokenExpiresAtMs = 0;
@@ -93,41 +96,30 @@ export class PoTokenMinter {
try { try {
const requestKey = 'O43z0dpjhgX20SCx4KAo'; const requestKey = 'O43z0dpjhgX20SCx4KAo';
const bgConfig: BgConfig = { const bgChallenge = await getChallenge({
fetch: (input: string | URL | globalThis.Request, init?: RequestInit) => PoTokenMinter.fetch(input, init),
globalObj: globalThis,
requestKey, requestKey,
identifier: '' fetchFunction: PoTokenMinter.fetch
}; });
const bgChallenge = await BG.Challenge.create(bgConfig); const interpreterJavascript = bgChallenge.interpreterJavascript?.privateDoNotAccessOrElseSafeScriptWrappedValue;
if (!bgChallenge) {
throw new Error('Could not get challenge');
}
const interpreterJavascript = bgChallenge.interpreterJavascript.privateDoNotAccessOrElseSafeScriptWrappedValue;
if (interpreterJavascript) { if (interpreterJavascript) {
new Function(interpreterJavascript)(); new Function(interpreterJavascript)();
} else { } else {
throw new Error('Could not load VM'); throw new Error('Could not load VM');
} }
const botguard = await BG.BotGuardClient.create({ const botguard = await BotGuardClient.create({
globalName: bgChallenge.globalName, globalName: bgChallenge.globalName,
globalObj: globalThis, globalObject: globalThis,
program: bgChallenge.program program: bgChallenge.program
}); });
const webPoSignalOutput: WebPoSignalOutput = []; const webPoSignalOutput: WebPoSignalOutput = [];
const botguardResponse = await botguard.snapshot({ webPoSignalOutput }); const botguardResponse = await botguard.snapshot({ webPoSignalOutput });
const integrityTokenResponse = await bgConfig.fetch(buildURL('GenerateIT', true), { const integrityTokenResponse = await PoTokenMinter.fetch(buildURL('GenerateIT', true), {
method: 'POST', method: 'POST',
headers: { headers: getHeaders(),
'content-type': 'application/json+protobuf',
'x-goog-api-key': GOOG_API_KEY,
'x-user-agent': 'grpc-web-javascript/0.1'
},
body: JSON.stringify([requestKey, botguardResponse]) body: JSON.stringify([requestKey, botguardResponse])
}); });
@@ -142,7 +134,7 @@ export class PoTokenMinter {
: DEFAULT_POTOKEN_TTL_SECONDS; : DEFAULT_POTOKEN_TTL_SECONDS;
PoTokenMinter.integrityTokenExpiresAtMs = Date.now() + ttlSeconds * 1000; PoTokenMinter.integrityTokenExpiresAtMs = Date.now() + ttlSeconds * 1000;
PoTokenMinter.webPoMinter = await BG.WebPoMinter.create({ integrityToken: response[0] }, webPoSignalOutput); PoTokenMinter.webPoMinter = await WebPoMinter.create({ integrityToken: response[0] }, webPoSignalOutput);
PoTokenMinter.webPoMinterPromise = null; PoTokenMinter.webPoMinterPromise = null;
resolve(); resolve();
} catch (error) { } catch (error) {