Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
510d81b872 | ||
|
|
ebabb6ca99 | ||
|
|
1678bee3b5 | ||
|
|
c055260023 | ||
|
|
e0f5c9691b | ||
|
|
9da9bdf06f | ||
|
|
fea1c22aa9 | ||
|
|
48b10e8618 | ||
|
|
7286c099a0 | ||
|
|
f29b0f0af8 |
No files matched your search
@@ -8,6 +8,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
update_wiki_stats:
|
update_wiki_stats:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 20
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|||||||
@@ -5,6 +5,12 @@ 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.4] - 2026-09-24
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Default audio track is now the regular audio instead of "Voice Boost" or "Stable Volume", which are now separate tracks
|
||||||
|
|
||||||
## [0.48.3] - 2026-07-28
|
## [0.48.3] - 2026-07-28
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
Generated
+176
-660
File diff suppressed because it is too large.
Load diff
+12
-17
@@ -1,16 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet",
|
"name": "playlet",
|
||||||
"version": "0.48.3",
|
"version": "0.48.4",
|
||||||
"description": "Unofficial YouTube client for Roku",
|
"description": "Unofficial YouTube client for Roku",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rokucommunity/bslint": "^0.8.44",
|
"@rokucommunity/bslint": "^0.8.45",
|
||||||
"@types/crypto-js": "^4.2.2",
|
"@types/crypto-js": "^4.2.2",
|
||||||
"@types/fs-extra": "^11.0.4",
|
"@types/fs-extra": "^11.0.4",
|
||||||
"@types/node": "^26.1.1",
|
"@types/node": "^26.4.1",
|
||||||
"@types/xml2js": "^0.4.14",
|
"@types/xml2js": "^0.4.14",
|
||||||
"argparse": "^3.0.0",
|
"argparse": "^3.0.1",
|
||||||
"brighterscript": "0.73.0",
|
"brighterscript": "0.73.1",
|
||||||
"brighterscript-formatter": "^1.8.1",
|
"brighterscript-formatter": "^1.8.2",
|
||||||
"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",
|
||||||
@@ -19,21 +19,20 @@
|
|||||||
"imap": "^0.8.19",
|
"imap": "^0.8.19",
|
||||||
"ip": "^2.0.1",
|
"ip": "^2.0.1",
|
||||||
"json5": "^2.2.3",
|
"json5": "^2.2.3",
|
||||||
"mailparser": "^3.9.14",
|
"mailparser": "^3.9.20",
|
||||||
"protocol-buffers-schema": "^3.6.1",
|
"protocol-buffers-schema": "^3.6.1",
|
||||||
"puppeteer": "^25.3.0",
|
"puppeteer": "^25.10.0",
|
||||||
"roku-deploy": "^3.18.2",
|
"roku-deploy": "^3.18.4",
|
||||||
"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",
|
|
||||||
"semver": "^7.8.5",
|
"semver": "^7.8.5",
|
||||||
"shelljs": "^0.10.0",
|
"shelljs": "^0.10.0",
|
||||||
"telnet-client": "^2.2.13",
|
"telnet-client": "^2.2.14",
|
||||||
"ts-node": "^10.9.2",
|
"ts-node": "^10.9.2",
|
||||||
"typescript": "6.0.3",
|
"typescript": "6.0.3",
|
||||||
"xml2js": "^0.6.2",
|
"xml2js": "^0.6.2",
|
||||||
"yaml": "^2.9.0",
|
"yaml": "^2.9.0",
|
||||||
"youtubei.js": "^17.2.0"
|
"youtubei.js": "^18.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "22"
|
"node": "22"
|
||||||
@@ -68,20 +67,16 @@
|
|||||||
"test:integration:player": "npx tsx ./integration-tests/vpd-run-player.ts",
|
"test:integration:player": "npx tsx ./integration-tests/vpd-run-player.ts",
|
||||||
"version-sync": "node tools/version-sync.js",
|
"version-sync": "node tools/version-sync.js",
|
||||||
"manifest-git-hash": "node tools/update-manifest-git-hash.js",
|
"manifest-git-hash": "node tools/update-manifest-git-hash.js",
|
||||||
"sign-released-package": "node tools/sign-released-package.js",
|
|
||||||
"screenshot": "node tools/screenshot.js",
|
"screenshot": "node tools/screenshot.js",
|
||||||
"convert-images": "node tools/convert-images.js",
|
"convert-images": "node tools/convert-images.js",
|
||||||
"update-rale-component": "cd tools/RALE && rm TrackerTask.xml && curl -o TrackerTask.zip https://devtools.web.roku.com/roku-advanced-layout-editor/app/TrackerTask.zip && unzip TrackerTask.zip && rm TrackerTask.zip",
|
"update-rale-component": "cd tools/RALE && rm TrackerTask.xml && curl -o TrackerTask.zip https://devtools.web.roku.com/roku-advanced-layout-editor/app/TrackerTask.zip && unzip TrackerTask.zip && rm TrackerTask.zip",
|
||||||
"postinstall": "cd playlet-lib && npm install && cd ../playlet-app && npm install && cd ../playground && npm install && cd ../playlet-web && npm install",
|
"postinstall": "cd playlet-lib && npm install && cd ../playlet-app && npm install && cd ../playground && npm install && cd ../playlet-web && npm install",
|
||||||
"update-deps": "npx npm-check-updates --deep --upgrade --install always --reject typescript,svelte-preprocess",
|
"update-deps": "npx npm-check-updates --deep --upgrade --install always --reject typescript",
|
||||||
"registry:write": "node tools/registry.js --input registry.json",
|
"registry:write": "node tools/registry.js --input registry.json",
|
||||||
"registry:read": "node tools/registry.js --output registry.json",
|
"registry:read": "node tools/registry.js --output registry.json",
|
||||||
"registry:clear": "node tools/registry.js --clear",
|
"registry:clear": "node tools/registry.js --clear",
|
||||||
"restart-app": "node tools/restart-app.js",
|
"restart-app": "node tools/restart-app.js",
|
||||||
"check-for-updates": "node tools/check-for-updates.js",
|
"check-for-updates": "node tools/check-for-updates.js",
|
||||||
"shutdown": "node tools/shutdown.js"
|
"shutdown": "node tools/shutdown.js"
|
||||||
},
|
|
||||||
"optionalDependencies": {
|
|
||||||
"@rollup/rollup-linux-x64-gnu": "^4.62.2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.48.3",
|
"version": "0.48.4",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.48.3"
|
"version": "0.48.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-app",
|
"name": "playlet-app",
|
||||||
"version": "0.48.3",
|
"version": "0.48.4",
|
||||||
"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",
|
||||||
|
|||||||
@@ -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=00003
|
build_version=00004
|
||||||
|
|
||||||
ui_resolutions=hd
|
ui_resolutions=hd
|
||||||
uri_resolution_autosub=$$RES$$,480p,720p,1080p
|
uri_resolution_autosub=$$RES$$,480p,720p,1080p
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ function Main(args as object) as void
|
|||||||
|
|
||||||
Registry.ClearPlayletLibUrlsIfNeeded(args)
|
Registry.ClearPlayletLibUrlsIfNeeded(args)
|
||||||
Registry.ClearRegistryIfNeeded(args)
|
Registry.ClearRegistryIfNeeded(args)
|
||||||
|
Registry.ClearUnsupportedPlayletLibUrls()
|
||||||
|
|
||||||
scene = screen.CreateScene("BootstrapScene")
|
scene = screen.CreateScene("BootstrapScene")
|
||||||
screen.show()
|
screen.show()
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
namespace PlayletLibUrls
|
||||||
|
|
||||||
|
const RELEASE_URL_PATTERN = "^https://github\.com/iBicha/playlet/releases/download/v(\d+\.\d+\.\d+)/"
|
||||||
|
|
||||||
|
' v0.11.0 is the first release without HomeGridScreen, which still crashes on the devices
|
||||||
|
' pinned to v0.7.0 - v0.10.3.
|
||||||
|
const MIN_VERSION = "0.11.0"
|
||||||
|
|
||||||
|
function IsUnsupported(entry as object) as boolean
|
||||||
|
matches = CreateObject("roRegex", RELEASE_URL_PATTERN, "").Match(entry.link)
|
||||||
|
if matches.Count() <> 2
|
||||||
|
return false
|
||||||
|
end if
|
||||||
|
|
||||||
|
return CompareVersions(matches[1], MIN_VERSION) < 0
|
||||||
|
end function
|
||||||
|
|
||||||
|
function CompareVersions(left as string, right as string) as integer
|
||||||
|
leftParts = left.Tokenize(".")
|
||||||
|
rightParts = right.Tokenize(".")
|
||||||
|
|
||||||
|
for i = 0 to leftParts.Count() - 1
|
||||||
|
leftPart = leftParts[i].ToInt()
|
||||||
|
rightPart = rightParts[i].ToInt()
|
||||||
|
|
||||||
|
if leftPart < rightPart
|
||||||
|
return -1
|
||||||
|
end if
|
||||||
|
if leftPart > rightPart
|
||||||
|
return 1
|
||||||
|
end if
|
||||||
|
end for
|
||||||
|
|
||||||
|
return 0
|
||||||
|
end function
|
||||||
|
|
||||||
|
end namespace
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
namespace Tests
|
||||||
|
|
||||||
|
@suite
|
||||||
|
class PlayletLibUrlsTests extends Rooibos.BaseTestSuite
|
||||||
|
|
||||||
|
@describe("PlayletLibUrls.IsUnsupported")
|
||||||
|
|
||||||
|
@it("reports a tagged release below the minimum version")
|
||||||
|
@params("https://github.com/iBicha/playlet/releases/download/v0.7.0/playlet-lib.zip")
|
||||||
|
@params("https://github.com/iBicha/playlet/releases/download/v0.9.0/playlet-lib.zip")
|
||||||
|
@params("https://github.com/iBicha/playlet/releases/download/v0.10.3/playlet-lib.zip")
|
||||||
|
@params("https://github.com/iBicha/playlet/releases/download/v0.10.3/playlet-lib.squashfs.pkg")
|
||||||
|
function _(link as string)
|
||||||
|
m.assertTrue(PlayletLibUrls.IsUnsupported({ type: "custom", link: link }))
|
||||||
|
end function
|
||||||
|
|
||||||
|
@it("reports nothing for a tagged release at or above the minimum version")
|
||||||
|
@params("https://github.com/iBicha/playlet/releases/download/v0.11.0/playlet-lib.zip")
|
||||||
|
@params("https://github.com/iBicha/playlet/releases/download/v0.11.1/playlet-lib.zip")
|
||||||
|
@params("https://github.com/iBicha/playlet/releases/download/v0.48.3/playlet-lib.squashfs.pkg")
|
||||||
|
@params("https://github.com/iBicha/playlet/releases/download/v1.0.0/playlet-lib.zip")
|
||||||
|
function _(link as string)
|
||||||
|
m.assertFalse(PlayletLibUrls.IsUnsupported({ type: "custom", link: link }))
|
||||||
|
end function
|
||||||
|
|
||||||
|
@it("reports nothing for a url that carries no version")
|
||||||
|
@params("https://github.com/iBicha/playlet/releases/latest/download/playlet-lib.zip")
|
||||||
|
@params("https://github.com/iBicha/playlet/releases/download/canary/playlet-lib.zip")
|
||||||
|
@params("https://github.com/iBicha/playlet/releases/download/0.10.3/playlet-lib.zip")
|
||||||
|
@params("http://192.168.1.10:8888/playlet-lib.zip")
|
||||||
|
@params("pkg:/lib/playlet-lib.zip")
|
||||||
|
@params("")
|
||||||
|
function _(link as string)
|
||||||
|
m.assertFalse(PlayletLibUrls.IsUnsupported({ type: "custom", link: link }))
|
||||||
|
end function
|
||||||
|
|
||||||
|
@describe("PlayletLibUrls.CompareVersions")
|
||||||
|
|
||||||
|
@it("reports the same version as equal")
|
||||||
|
function _()
|
||||||
|
m.assertEqual(PlayletLibUrls.CompareVersions("0.11.0", "0.11.0"), 0)
|
||||||
|
end function
|
||||||
|
|
||||||
|
@it("orders by the first part that differs")
|
||||||
|
@params("0.10.3", "0.11.0")
|
||||||
|
@params("0.11.0", "0.11.1")
|
||||||
|
@params("0.11.0", "1.0.0")
|
||||||
|
function _(older as string, newer as string)
|
||||||
|
m.assertEqual(PlayletLibUrls.CompareVersions(older, newer), -1)
|
||||||
|
m.assertEqual(PlayletLibUrls.CompareVersions(newer, older), 1)
|
||||||
|
end function
|
||||||
|
|
||||||
|
@it("compares parts as numbers, not text")
|
||||||
|
function _()
|
||||||
|
m.assertEqual(PlayletLibUrls.CompareVersions("0.9.0", "0.11.0"), -1)
|
||||||
|
m.assertEqual(PlayletLibUrls.CompareVersions("0.11.0", "0.9.0"), 1)
|
||||||
|
end function
|
||||||
|
|
||||||
|
end class
|
||||||
|
|
||||||
|
end namespace
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import "pkg:/source/PlayletLibUrls.bs"
|
||||||
|
|
||||||
namespace Registry
|
namespace Registry
|
||||||
|
|
||||||
function ReadKey(key as string, section as string) as dynamic
|
function ReadKey(key as string, section as string) as dynamic
|
||||||
@@ -41,6 +43,23 @@ namespace Registry
|
|||||||
Logger.Log("Cleared key playlet_lib_urls from registry")
|
Logger.Log("Cleared key playlet_lib_urls from registry")
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
' BootstrapScene's load-failure fallback never reaches a pinned lib that loads and then
|
||||||
|
' crashes, so the device stays on it across every channel update.
|
||||||
|
function ClearUnsupportedPlayletLibUrls() as void
|
||||||
|
urls = GetPlayletLibUrlsFromRegistry()
|
||||||
|
if urls = invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
for each entry in urls
|
||||||
|
if PlayletLibUrls.IsUnsupported(entry)
|
||||||
|
DeleteKey("playlet_lib_urls", "Playlet")
|
||||||
|
Logger.Log(`Cleared key playlet_lib_urls from registry: ${entry.link} is no longer supported`)
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
end for
|
||||||
|
end function
|
||||||
|
|
||||||
function ClearRegistryIfNeeded(launchArgs as object) as void
|
function ClearRegistryIfNeeded(launchArgs as object) as void
|
||||||
if launchArgs = invalid or launchArgs.clearRegistry = invalid
|
if launchArgs = invalid or launchArgs.clearRegistry = invalid
|
||||||
return
|
return
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.48.3",
|
"version": "0.48.4",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.48.3"
|
"version": "0.48.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-lib",
|
"name": "playlet-lib",
|
||||||
"version": "0.48.3",
|
"version": "0.48.4",
|
||||||
"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",
|
||||||
|
|||||||
@@ -255,6 +255,7 @@ class DashManifest
|
|||||||
xtagsInfo = m.GetXtagsInfo(format)
|
xtagsInfo = m.GetXtagsInfo(format)
|
||||||
format.xtagsInfo = xtagsInfo
|
format.xtagsInfo = xtagsInfo
|
||||||
format.isDrc = xtagsInfo.isDrc
|
format.isDrc = xtagsInfo.isDrc
|
||||||
|
format.isVoiceBoost = xtagsInfo.isVoiceBoost
|
||||||
format.isDubbed = xtagsInfo.isDubbed
|
format.isDubbed = xtagsInfo.isDubbed
|
||||||
format.isAutoDubbed = xtagsInfo.isAutoDubbed
|
format.isAutoDubbed = xtagsInfo.isAutoDubbed
|
||||||
format.isDescriptive = xtagsInfo.isDescriptive
|
format.isDescriptive = xtagsInfo.isDescriptive
|
||||||
@@ -277,12 +278,7 @@ class DashManifest
|
|||||||
audioTrackId = format.audioTrack.id
|
audioTrackId = format.audioTrack.id
|
||||||
end if
|
end if
|
||||||
|
|
||||||
drc = ""
|
groupId = `${mimeType}-${justCodec}-${colorInfo}-${audioTrackId}${m.GetAudioVariantSuffix(format)}`
|
||||||
if format.isDrc = true
|
|
||||||
drc = "drc"
|
|
||||||
end if
|
|
||||||
|
|
||||||
groupId = `${mimeType}-${justCodec}-${colorInfo}-${audioTrackId}-${drc}`
|
|
||||||
|
|
||||||
if groupInfo[groupId] = invalid
|
if groupInfo[groupId] = invalid
|
||||||
groupInfo[groupId] = []
|
groupInfo[groupId] = []
|
||||||
@@ -441,7 +437,7 @@ class DashManifest
|
|||||||
end for
|
end for
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if IsAssociativeArray(firstFormat.audioTrack) or firstFormat.isDrc = true
|
if IsAssociativeArray(firstFormat.audioTrack) or firstFormat.isDrc = true or firstFormat.isVoiceBoost = true
|
||||||
' Roles
|
' Roles
|
||||||
roles = m.GetTrackRoles(firstFormat)
|
roles = m.GetTrackRoles(firstFormat)
|
||||||
for each role in roles
|
for each role in roles
|
||||||
@@ -474,9 +470,7 @@ class DashManifest
|
|||||||
if IsAssociativeArray(stream.audioTrack) and IsString(stream.audioTrack.id)
|
if IsAssociativeArray(stream.audioTrack) and IsString(stream.audioTrack.id)
|
||||||
representationId = `${representationId}-${stream.audioTrack.id}`
|
representationId = `${representationId}-${stream.audioTrack.id}`
|
||||||
end if
|
end if
|
||||||
if stream.isDrc = true
|
representationId = `${representationId}${m.GetAudioVariantSuffix(stream)}`
|
||||||
representationId = `${representationId}-drc`
|
|
||||||
end if
|
|
||||||
|
|
||||||
representationAttributes = {
|
representationAttributes = {
|
||||||
"id": representationId
|
"id": representationId
|
||||||
@@ -739,7 +733,10 @@ class DashManifest
|
|||||||
|
|
||||||
function GetTrackRoles(format as object) as object
|
function GetTrackRoles(format as object) as object
|
||||||
roles = []
|
roles = []
|
||||||
if format.isOriginal = true
|
' Within the preferred language, the device defaults to a "main" track (a set
|
||||||
|
' without a Role counts as main) regardless of bitrate or manifest order.
|
||||||
|
' Stable Volume and Voice Boost are opt-in re-mixes of the original.
|
||||||
|
if format.isOriginal = true and format.isDrc <> true and format.isVoiceBoost <> true
|
||||||
roles.Push("main")
|
roles.Push("main")
|
||||||
else
|
else
|
||||||
roles.Push("alternate")
|
roles.Push("alternate")
|
||||||
@@ -753,13 +750,28 @@ class DashManifest
|
|||||||
roles.Push("description")
|
roles.Push("description")
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if format.isDrc = true
|
' The device's audio menu ignores Label: it lists tracks by language, and this
|
||||||
|
' role is what shows a same-language variant separately, as "Enhanced audio".
|
||||||
|
if format.isVoiceBoost = true
|
||||||
roles.Push("enhanced-audio-intelligibility")
|
roles.Push("enhanced-audio-intelligibility")
|
||||||
end if
|
end if
|
||||||
|
|
||||||
return roles
|
return roles
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
' Stable Volume and Voice Boost are re-mixes of the same itag: without the suffix
|
||||||
|
' they share an AdaptationSet (and Representation ids) with the regular mix.
|
||||||
|
function GetAudioVariantSuffix(format as object) as string
|
||||||
|
suffix = ""
|
||||||
|
if format.isDrc = true
|
||||||
|
suffix = `${suffix}-drc`
|
||||||
|
end if
|
||||||
|
if format.isVoiceBoost = true
|
||||||
|
suffix = `${suffix}-vb`
|
||||||
|
end if
|
||||||
|
return suffix
|
||||||
|
end function
|
||||||
|
|
||||||
function GenerateImageAdaptationSets(xml as object, storyboards as object, id as integer) as integer
|
function GenerateImageAdaptationSets(xml as object, storyboards as object, id as integer) as integer
|
||||||
' https://developer.roku.com/en-ca/docs/developer-program/media-playback/trick-mode/hls-and-dash.md#dash-standard-thumbnail-tiles
|
' https://developer.roku.com/en-ca/docs/developer-program/media-playback/trick-mode/hls-and-dash.md#dash-standard-thumbnail-tiles
|
||||||
for i = storyboards.Count() - 1 to 0 step -1
|
for i = storyboards.Count() - 1 to 0 step -1
|
||||||
@@ -885,6 +897,7 @@ class DashManifest
|
|||||||
lang: ""
|
lang: ""
|
||||||
acont: ""
|
acont: ""
|
||||||
isDrc: false
|
isDrc: false
|
||||||
|
isVoiceBoost: false
|
||||||
isDubbed: false
|
isDubbed: false
|
||||||
isAutoDubbed: false
|
isAutoDubbed: false
|
||||||
isDescriptive: false
|
isDescriptive: false
|
||||||
@@ -921,6 +934,8 @@ class DashManifest
|
|||||||
result.acont = tags[key]
|
result.acont = tags[key]
|
||||||
else if key = "drc" and tags[key] = "1"
|
else if key = "drc" and tags[key] = "1"
|
||||||
result.isDrc = true
|
result.isDrc = true
|
||||||
|
else if key = "vb" and tags[key] = "1"
|
||||||
|
result.isVoiceBoost = true
|
||||||
end if
|
end if
|
||||||
end for
|
end for
|
||||||
|
|
||||||
|
|||||||
@@ -1496,6 +1496,12 @@ namespace Innertube
|
|||||||
return invalid
|
return invalid
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
' "Explore more" tileRenderer, opens a search with a predefined query, like TILE_CONTENT_TYPE_EDU below
|
||||||
|
if TileRendererHasSearchEndpoint(nodeData["onSelectCommand"])
|
||||||
|
LogWarnNoTelemetry("Skipping tileRenderer without contentType for search endpoint")
|
||||||
|
return invalid
|
||||||
|
end if
|
||||||
|
|
||||||
Warning("TileRenderer without contentType", nodeData, context)
|
Warning("TileRenderer without contentType", nodeData, context)
|
||||||
return invalid
|
return invalid
|
||||||
end if
|
end if
|
||||||
@@ -1526,6 +1532,29 @@ namespace Innertube
|
|||||||
return invalid
|
return invalid
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function TileRendererHasSearchEndpoint(onSelectCommand as object) as boolean
|
||||||
|
if not IsAssociativeArray(onSelectCommand)
|
||||||
|
return false
|
||||||
|
end if
|
||||||
|
|
||||||
|
if IsAssociativeArray(onSelectCommand["searchEndpoint"])
|
||||||
|
return true
|
||||||
|
end if
|
||||||
|
|
||||||
|
commands = ObjectUtils.Dig(onSelectCommand, ["commandExecutorCommand", "commands"])
|
||||||
|
if not IsArray(commands)
|
||||||
|
return false
|
||||||
|
end if
|
||||||
|
|
||||||
|
for each command in commands
|
||||||
|
if IsAssociativeArray(command) and IsAssociativeArray(command["searchEndpoint"])
|
||||||
|
return true
|
||||||
|
end if
|
||||||
|
end for
|
||||||
|
|
||||||
|
return false
|
||||||
|
end function
|
||||||
|
|
||||||
function TileRendererTypeVideo(nodeData as object, context as object) as object
|
function TileRendererTypeVideo(nodeData as object, context as object) as object
|
||||||
videoId = nodeData["contentId"]
|
videoId = nodeData["contentId"]
|
||||||
if not IsString(videoId)
|
if not IsString(videoId)
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ namespace Innertube
|
|||||||
if sessionData = invalid or not IsInt(sessionData.timestamp)
|
if sessionData = invalid or not IsInt(sessionData.timestamp)
|
||||||
return false
|
return false
|
||||||
end if
|
end if
|
||||||
|
if StringUtils.IsNullOrEmpty(sessionData.visitorData)
|
||||||
|
return false
|
||||||
|
end if
|
||||||
nowSeconds = TimeUtils.Now().AsSeconds()
|
nowSeconds = TimeUtils.Now().AsSeconds()
|
||||||
return nowSeconds - sessionData.timestamp <= INNERTUBE_VISITOR_DATA_LIFESPAN_SECONDS
|
return nowSeconds - sessionData.timestamp <= INNERTUBE_VISITOR_DATA_LIFESPAN_SECONDS
|
||||||
end function
|
end function
|
||||||
|
|||||||
@@ -48,14 +48,14 @@ function TelemetryLoop() as void
|
|||||||
m.dist = GetDist(m.tags)
|
m.dist = GetDist(m.tags)
|
||||||
m.userId = GetUserId()
|
m.userId = GetUserId()
|
||||||
|
|
||||||
ReportSessionStart()
|
|
||||||
ReportLastExitCrash()
|
|
||||||
|
|
||||||
m.top.observeField("LogInfo", msgPort)
|
m.top.observeField("LogInfo", msgPort)
|
||||||
m.top.observeField("LogWarn", msgPort)
|
m.top.observeField("LogWarn", msgPort)
|
||||||
m.top.observeField("LogError", msgPort)
|
m.top.observeField("LogError", msgPort)
|
||||||
m.top.observeField("LogEvent", msgPort)
|
m.top.observeField("LogEvent", msgPort)
|
||||||
|
|
||||||
|
ReportSessionStart()
|
||||||
|
ReportLastExitCrash()
|
||||||
|
|
||||||
#if SUPPORTS_BATCHING
|
#if SUPPORTS_BATCHING
|
||||||
debouceMs = 2000
|
debouceMs = 2000
|
||||||
debounceCountLimit = 20
|
debounceCountLimit = 20
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
# VideoPlayerDev
|
# VideoPlayerDev
|
||||||
|
|
||||||
The custom video player intended to replace `components/VideoPlayer` — a stock-OS-trickplay replica plus a
|
The custom video player that replaced `components/VideoPlayer` — a stock-OS-trickplay replica plus a control
|
||||||
control button row. It is selected at **compile time** by `#const USE_DEV_PLAYER` in `VideoQueue.bs` (default
|
button row. It is selected at **compile time** by `#const USE_DEV_PLAYER` in `VideoQueue.bs`, currently `true`:
|
||||||
`false`). Build with the flag `true` to run it (and the integration suite).
|
this is the player that ships. Build with the flag `false` to fall back to the stock `VideoPlayer` (the
|
||||||
|
integration suite asserts the dev player, so it only passes with the flag on).
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
|
|||||||
@@ -418,7 +418,7 @@ function TrySponsorBlockSkip() as boolean
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
' OK/Select — the one shared key. Priority (after the SponsorBlock skip, handled in OnKeyEvent): commit (if a
|
' OK/Select — the one shared key. Priority (after the SponsorBlock skip, handled in OnKeyEvent): commit (if a
|
||||||
' transport is active) -> chrome/pause toggle. OK is the VOD pause key (there is no separate ECP Pause). So
|
' transport is active) -> chrome/pause toggle. OK is the VOD pause key. So
|
||||||
' while idle: VOD = play/pause toggle (reveals chrome + LargePause); live = chrome toggle only (no pause).
|
' while idle: VOD = play/pause toggle (reveals chrome + LargePause); live = chrome toggle only (no pause).
|
||||||
function OnOkPress() as boolean
|
function OnOkPress() as boolean
|
||||||
' commit an active transport.
|
' commit an active transport.
|
||||||
|
|||||||
@@ -84,6 +84,14 @@ function TestSetup() as void
|
|||||||
m.top.unobserveField(deviceField)
|
m.top.unobserveField(deviceField)
|
||||||
end for
|
end for
|
||||||
|
|
||||||
|
' The mock node is shared across tests and `duration` is not alwaysNotify, so a leftover duration=100
|
||||||
|
' swallows the next test's identical write and OnDuration never fires. Reset with the observers off.
|
||||||
|
m.top.state = VideoState.None
|
||||||
|
m.top.control = VideoControl.None
|
||||||
|
m.top.position = 0
|
||||||
|
m.top.duration = 0
|
||||||
|
m.top.seek = 0
|
||||||
|
|
||||||
OnNodeReady()
|
OnNodeReady()
|
||||||
end function
|
end function
|
||||||
|
|
||||||
@@ -118,6 +126,13 @@ function TestSetLive(edgeMs as integer) as void
|
|||||||
m.transport.OnPosition(edgeMs)
|
m.transport.OnPosition(edgeMs)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
' TestSeedSponsorBlock — the segments job's result, minus the job. Writing m.top.position afterwards runs the
|
||||||
|
' REAL OnPosition, which is what arms the manual notice.
|
||||||
|
function TestSeedSponsorBlock(segments as object) as void
|
||||||
|
m.sponsorblock.enabled = true
|
||||||
|
m.sponsorblock.segments = segments
|
||||||
|
end function
|
||||||
|
|
||||||
' TestFireLiveBadgeHold — fire the liveBadgeHold timer's handler now (the spec can't wait out the real timer).
|
' TestFireLiveBadgeHold — fire the liveBadgeHold timer's handler now (the spec can't wait out the real timer).
|
||||||
function TestFireLiveBadgeHold() as void
|
function TestFireLiveBadgeHold() as void
|
||||||
OnLiveBadgeHoldFire()
|
OnLiveBadgeHoldFire()
|
||||||
@@ -214,6 +229,7 @@ function TestSnapshot() as object
|
|||||||
focusTarget: m.focusTarget
|
focusTarget: m.focusTarget
|
||||||
focusedButton: m.focusedButton
|
focusedButton: m.focusedButton
|
||||||
nudgeCount: m.top.nudgeCount
|
nudgeCount: m.top.nudgeCount
|
||||||
|
sponsorNoticeShown: SponsorBlock.GetCurrentNotification(m.notifications) <> invalid
|
||||||
forceLiveBadge: m.trickPlayBar.forceLiveBadge
|
forceLiveBadge: m.trickPlayBar.forceLiveBadge
|
||||||
liveBadgeShown: m.trickPlayBar.findNode("liveLabel").visible
|
liveBadgeShown: m.trickPlayBar.findNode("liveLabel").visible
|
||||||
barRemainingText: m.trickPlayBar.findNode("remainingLabel").text
|
barRemainingText: m.trickPlayBar.findNode("remainingLabel").text
|
||||||
|
|||||||
@@ -52,6 +52,7 @@
|
|||||||
<function name="TestWireQueueClose" />
|
<function name="TestWireQueueClose" />
|
||||||
<function name="TestSetControl" />
|
<function name="TestSetControl" />
|
||||||
<function name="TestSetLive" />
|
<function name="TestSetLive" />
|
||||||
|
<function name="TestSeedSponsorBlock" />
|
||||||
<function name="TestFireLiveBadgeHold" />
|
<function name="TestFireLiveBadgeHold" />
|
||||||
<function name="TestKillAutoHide" />
|
<function name="TestKillAutoHide" />
|
||||||
<function name="TestFinishChromeFadeOut" />
|
<function name="TestFinishChromeFadeOut" />
|
||||||
|
|||||||
@@ -216,11 +216,18 @@ namespace Tests
|
|||||||
end function
|
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 and Down each reveal the chrome when it is hidden in idle")
|
||||||
function _()
|
function _()
|
||||||
m.assertFalse(m.Snap().chromeShown) ' starts hidden after setup
|
m.assertFalse(m.Snap().chromeShown) ' starts hidden after setup
|
||||||
m.top.callFunc("TestKey", RemoteKeys.Up, true)
|
m.top.callFunc("TestKey", RemoteKeys.Up, true)
|
||||||
m.assertTrue(m.Snap().chromeShown, "Up revealed the chrome")
|
m.assertTrue(m.Snap().chromeShown, "Up revealed the chrome")
|
||||||
|
|
||||||
|
' back to fully hidden: the reveal only fires from Hidden, not mid fade-out.
|
||||||
|
m.top.callFunc("TestKey", RemoteKeys.Back, true)
|
||||||
|
m.top.callFunc("TestFinishChromeFadeOut")
|
||||||
|
m.assertFalse(m.Snap().chromeShown)
|
||||||
|
m.top.callFunc("TestKey", RemoteKeys.Down, true)
|
||||||
|
m.assertTrue(m.Snap().chromeShown, "Down revealed the chrome")
|
||||||
end function
|
end function
|
||||||
|
|
||||||
' =========================================================================================
|
' =========================================================================================
|
||||||
@@ -349,6 +356,121 @@ namespace Tests
|
|||||||
m.assertTrue(m.top.videoQueue.closePlayer, "rung 4: Back closes")
|
m.assertTrue(m.top.videoQueue.closePlayer, "rung 4: Back closes")
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
' =========================================================================================
|
||||||
|
' Key router — the branches that decide WHICH handler runs.
|
||||||
|
' =========================================================================================
|
||||||
|
|
||||||
|
' The segment shape SponsorBlockSegmentsJob returns.
|
||||||
|
function ManualSegment(startS as float, endS as float) as object
|
||||||
|
return [{ start: startS, end: endS, option: "manual_skip", title: "Sponsor", shortTitle: "Sponsor", actionText: "Press OK to skip", showNotification: true, UUID: "seg-manual", category: "sponsor" }]
|
||||||
|
end function
|
||||||
|
|
||||||
|
' Minimize is the discriminator: activating it would have hidden the chrome.
|
||||||
|
@it("an armed SponsorBlock notice outranks the buttons tier: OK skips instead of activating the button")
|
||||||
|
function _()
|
||||||
|
m.top.duration = 100
|
||||||
|
m.top.callFunc("TestSeedSponsorBlock", m.ManualSegment(10.0, 40.0))
|
||||||
|
m.top.position = 12.0 ' the REAL OnPosition arms the manual notice
|
||||||
|
m.assertTrue(m.Snap().sponsorNoticeShown, "the notice is up")
|
||||||
|
|
||||||
|
m.top.callFunc("TestKey", RemoteKeys.Up, true) ' reveal -> bar tier
|
||||||
|
m.top.callFunc("TestKey", RemoteKeys.Up, true) ' bar -> buttons tier
|
||||||
|
m.top.callFunc("TestKey", RemoteKeys.Right, true) ' highlight minimize
|
||||||
|
m.assertEqual(m.Snap().focusedButton, 1)
|
||||||
|
|
||||||
|
m.top.callFunc("TestKey", RemoteKeys.Ok, true)
|
||||||
|
after = m.Snap()
|
||||||
|
m.assertEqual(Int(m.top.seek * 1000), 40000, "OK skipped to the segment end, not into the focused button")
|
||||||
|
m.assertFalse(after.sponsorNoticeShown, "the skip took the notice down")
|
||||||
|
m.assertTrue(after.chromeShown, "minimize never ran -- it would have hidden the chrome")
|
||||||
|
end function
|
||||||
|
|
||||||
|
@it("an armed SponsorBlock notice outranks the Back ladder: Back dismisses the notice, not the player")
|
||||||
|
function _()
|
||||||
|
m.top.duration = 100
|
||||||
|
m.top.callFunc("TestSeedSponsorBlock", m.ManualSegment(10.0, 40.0))
|
||||||
|
m.top.position = 12.0
|
||||||
|
m.assertTrue(m.Snap().sponsorNoticeShown)
|
||||||
|
m.assertFalse(m.Snap().chromeShown, "chrome hidden: an unrouted Back here would CLOSE the player")
|
||||||
|
seekBefore = m.top.seek
|
||||||
|
|
||||||
|
m.top.callFunc("TestKey", RemoteKeys.Back, true)
|
||||||
|
after = m.Snap()
|
||||||
|
m.assertFalse(after.sponsorNoticeShown, "Back took the notice down")
|
||||||
|
m.assertFalse(m.top.videoQueue.closePlayer, "Back acted on the notice, NOT on the player")
|
||||||
|
m.assertEqual(m.top.seek, seekBefore, "dismissing is not skipping")
|
||||||
|
|
||||||
|
' one-shot: with the notice gone the next Back is the ordinary ladder again (rung 4 -> close).
|
||||||
|
m.top.callFunc("TestKey", RemoteKeys.Back, true)
|
||||||
|
m.assertTrue(m.top.videoQueue.closePlayer, "the notice consumed one Back, not every Back")
|
||||||
|
end function
|
||||||
|
|
||||||
|
@it("an armed notice on a segment at the video end finishes playback instead of seeking")
|
||||||
|
function _()
|
||||||
|
m.top.duration = 100
|
||||||
|
m.top.callFunc("TestSeedSponsorBlock", m.ManualSegment(90.0, 99.5)) ' ends within 2s of duration
|
||||||
|
m.top.position = 92.0
|
||||||
|
m.assertTrue(m.Snap().sponsorNoticeShown)
|
||||||
|
seekBefore = m.top.seek
|
||||||
|
|
||||||
|
m.top.callFunc("TestKey", RemoteKeys.Ok, true)
|
||||||
|
m.assertEqual(m.top.seek, seekBefore, "no seek was issued: the skip resolved to finish")
|
||||||
|
m.assertTrue(m.top.videoQueue.closePlayer, "no next video -> the finish closed the player")
|
||||||
|
end function
|
||||||
|
|
||||||
|
@it("the non-transport keys act on the key-DOWN edge only")
|
||||||
|
function _()
|
||||||
|
' Back goes first: only from the start state does its DOWN edge close the player.
|
||||||
|
m.assertFalse(m.top.callFunc("TestKey", RemoteKeys.Back, false), "the Back key-up is not consumed")
|
||||||
|
m.assertFalse(m.top.videoQueue.closePlayer, "the Back key-up must not close the player")
|
||||||
|
|
||||||
|
m.top.callFunc("TestKey", RemoteKeys.Ok, true) ' reveal
|
||||||
|
m.top.callFunc("TestKey", RemoteKeys.Ok, true) ' pause
|
||||||
|
m.top.callFunc("TestSetState", VideoState.Paused)
|
||||||
|
m.assertEqual(m.Snap().control, VideoControl.Pause)
|
||||||
|
|
||||||
|
m.assertFalse(m.top.callFunc("TestKey", RemoteKeys.Ok, false), "the OK key-up is not consumed")
|
||||||
|
m.assertFalse(m.top.callFunc("TestKey", RemoteKeys.Play, false), "the Play key-up is not consumed")
|
||||||
|
m.assertFalse(m.top.callFunc("TestKey", RemoteKeys.PlayOnly, false), "the PlayOnly key-up is not consumed")
|
||||||
|
m.assertFalse(m.top.callFunc("TestKey", RemoteKeys.Pause, false), "the Pause key-up is not consumed")
|
||||||
|
m.assertEqual(m.Snap().control, VideoControl.Pause, "no key-up toggled the pause back to playing")
|
||||||
|
end function
|
||||||
|
|
||||||
|
@it("Play commits an active transport, like OK")
|
||||||
|
function _()
|
||||||
|
m.top.callFunc("TestKey", RemoteKeys.Left, true)
|
||||||
|
m.top.callFunc("TestKey", RemoteKeys.Left, false)
|
||||||
|
m.assertEqual(m.Snap().transportMode, TransportController.Mode.Scrub)
|
||||||
|
|
||||||
|
m.top.callFunc("TestKey", RemoteKeys.Play, true)
|
||||||
|
after = m.Snap()
|
||||||
|
m.assertEqual(after.transportMode, TransportController.Mode.Idle, "Play committed the scrub")
|
||||||
|
m.assertTrue(after.seekSettling, "the commit emitted a play-through seek, not a play/pause toggle")
|
||||||
|
end function
|
||||||
|
|
||||||
|
@it("PlayOnly toggles play/pause, like Play")
|
||||||
|
function _()
|
||||||
|
m.top.callFunc("TestKey", RemoteKeys.PlayOnly, true)
|
||||||
|
m.assertEqual(m.Snap().control, VideoControl.Pause, "PlayOnly paused the playing video")
|
||||||
|
m.top.callFunc("TestSetState", VideoState.Paused)
|
||||||
|
m.top.callFunc("TestKey", RemoteKeys.PlayOnly, true)
|
||||||
|
m.assertEqual(m.Snap().control, VideoControl.Resume, "PlayOnly resumed the paused video")
|
||||||
|
end function
|
||||||
|
|
||||||
|
@it("the transport keys fall through the buttons tier to the transport")
|
||||||
|
function _()
|
||||||
|
m.top.callFunc("TestKey", RemoteKeys.Up, true) ' reveal -> bar tier
|
||||||
|
m.top.callFunc("TestKey", RemoteKeys.Up, true) ' bar -> buttons tier
|
||||||
|
m.assertEqual(m.Snap().focusTarget, PlayerCoordinatorLogic.FocusTarget.Buttons)
|
||||||
|
|
||||||
|
m.top.callFunc("TestKey", RemoteKeys.Rewind, true)
|
||||||
|
m.top.callFunc("TestKey", RemoteKeys.Rewind, false)
|
||||||
|
after = m.Snap()
|
||||||
|
m.assertEqual(after.transportMode, TransportController.Mode.Scan, "Rev started the scan from the buttons tier")
|
||||||
|
m.assertEqual(after.focusTarget, PlayerCoordinatorLogic.FocusTarget.Bar, "a transport key moves focus to the bar")
|
||||||
|
m.assertEqual(after.nudgeCount, 0, "the row did not treat it as one of its own keys")
|
||||||
|
end function
|
||||||
|
|
||||||
' The point of the bar-default: Left/Right seek and OK pauses with no navigation at all, straight off a
|
' The point of the bar-default: Left/Right seek and OK pauses with no navigation at all, straight off a
|
||||||
' fresh reveal. Pinned as its own test rather than left as a side effect of the tier round-trip tests.
|
' fresh reveal. Pinned as its own test rather than left as a side effect of the tier round-trip tests.
|
||||||
@it("a fresh idle reveal defaults focus to the bar: Left/Right seek and OK pauses with no navigation")
|
@it("a fresh idle reveal defaults focus to the bar: Left/Right seek and OK pauses with no navigation")
|
||||||
@@ -555,6 +677,61 @@ namespace Tests
|
|||||||
m.assertEqual(snap.focusedButton, 1, "the highlight is untouched")
|
m.assertEqual(snap.focusedButton, 1, "the highlight is untouched")
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
' Each arm is asserted: a state that silently failed to arm makes every row that follows vacuous.
|
||||||
|
function ArmRouterState(state as string) as void
|
||||||
|
m.top.callFunc("TestSetup")
|
||||||
|
m.top.callFunc("TestSetState", VideoState.Playing) ' opens the brain's ready-gate, as beforeEach does
|
||||||
|
if state = "idle hidden"
|
||||||
|
m.assertFalse(m.Snap().chromeShown, "armed: " + state)
|
||||||
|
else if state = "chrome/bar"
|
||||||
|
m.top.callFunc("TestKey", RemoteKeys.Up, true)
|
||||||
|
snap = m.Snap()
|
||||||
|
m.assertTrue(snap.chromeShown, "armed: " + state)
|
||||||
|
m.assertEqual(snap.focusTarget, PlayerCoordinatorLogic.FocusTarget.Bar, "armed: " + state)
|
||||||
|
else if state = "chrome/buttons"
|
||||||
|
m.top.callFunc("TestKey", RemoteKeys.Up, true)
|
||||||
|
m.top.callFunc("TestKey", RemoteKeys.Up, true)
|
||||||
|
snap = m.Snap()
|
||||||
|
m.assertTrue(snap.chromeShown, "armed: " + state)
|
||||||
|
m.assertEqual(snap.focusTarget, PlayerCoordinatorLogic.FocusTarget.Buttons, "armed: " + state)
|
||||||
|
else if state = "transport"
|
||||||
|
m.top.callFunc("TestKey", RemoteKeys.Left, true)
|
||||||
|
m.top.callFunc("TestKey", RemoteKeys.Left, false)
|
||||||
|
m.assertEqual(m.Snap().transportMode, TransportController.Mode.Scrub, "armed: " + state)
|
||||||
|
end if
|
||||||
|
end function
|
||||||
|
|
||||||
|
' BrighterScript enums are compile-time constants with no runtime form, so a new RemoteKeys member
|
||||||
|
' cannot fail this until someone lists it below — these lists are the decision record, not reflection.
|
||||||
|
@it("every remote key's disposition is pinned in every router state")
|
||||||
|
function _()
|
||||||
|
ownedEverywhere = [RemoteKeys.Left, RemoteKeys.Right, RemoteKeys.Rewind, RemoteKeys.FastForward, RemoteKeys.Replay, RemoteKeys.Ok, RemoteKeys.Back, RemoteKeys.Play, RemoteKeys.PlayOnly]
|
||||||
|
' AppController's, not the player's.
|
||||||
|
passedEverywhere = [RemoteKeys.Options, RemoteKeys.Pause, RemoteKeys.OkLongPress, RemoteKeys.OptionsLongPress]
|
||||||
|
' the tier keys are owned only while there is a tier to move through or a chrome to reveal.
|
||||||
|
tierKeys = [RemoteKeys.Up, RemoteKeys.Down]
|
||||||
|
|
||||||
|
for each state in ["idle hidden", "chrome/bar", "chrome/buttons", "transport"]
|
||||||
|
for each key in ownedEverywhere
|
||||||
|
m.ArmRouterState(state)
|
||||||
|
m.assertTrue(m.top.callFunc("TestKey", key, true), "'" + key + "' must be consumed in state " + state)
|
||||||
|
end for
|
||||||
|
for each key in passedEverywhere
|
||||||
|
m.ArmRouterState(state)
|
||||||
|
m.assertFalse(m.top.callFunc("TestKey", key, true), "'" + key + "' must pass to the parent in state " + state)
|
||||||
|
end for
|
||||||
|
for each key in tierKeys
|
||||||
|
m.ArmRouterState(state)
|
||||||
|
consumed = m.top.callFunc("TestKey", key, true)
|
||||||
|
if state = "transport"
|
||||||
|
m.assertFalse(consumed, "'" + key + "' has nothing to do under a transport -- it passes to the parent")
|
||||||
|
else
|
||||||
|
m.assertTrue(consumed, "'" + key + "' moves focus or reveals the chrome in state " + state)
|
||||||
|
end if
|
||||||
|
end for
|
||||||
|
end for
|
||||||
|
end function
|
||||||
|
|
||||||
' The coordinator twin of the brain's unmodeled-axis meta-test: every m.* field on the coordinator must
|
' The coordinator twin of the brain's unmodeled-axis meta-test: every m.* field on the coordinator must
|
||||||
' be consciously classified here. A NEW coordinator field fails this until someone decides what it is —
|
' be consciously classified here. A NEW coordinator field fails this until someone decides what it is —
|
||||||
' a state axis needs transition coverage, a flag needs its consuming path tested.
|
' a state axis needs transition coverage, a flag needs its consuming path tested.
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
||||||
<!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc.-->
|
|
||||||
<path fill="#EBEBEB" d="M416 208c0 45.9-14.9 88.3-40 122.7l126.6 126.7c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208M208 352c79.5 0 144-64.5 144-144S287.5 64 208 64 64 128.5 64 208s64.5 144 144 144"/>
|
<path fill="#EBEBEB" d="M416 208c0 45.9-14.9 88.3-40 122.7l126.6 126.7c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208M208 352c79.5 0 144-64.5 144-144S287.5 64 208 64 64 128.5 64 208s64.5 144 144 144"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 533 B After Width: | Height: | Size: 365 B |
@@ -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=00003
|
build_version=00004
|
||||||
|
|
||||||
ui_resolutions=hd
|
ui_resolutions=hd
|
||||||
uri_resolution_autosub=$$RES$$,480p,720p,1080p
|
uri_resolution_autosub=$$RES$$,480p,720p,1080p
|
||||||
|
|||||||
@@ -1,4 +1,27 @@
|
|||||||
' Credits to https://github.com/kazuhikoarase/qrcode-generator/pull/110
|
' QR code generation ported from https://github.com/kazuhikoarase/qrcode-generator
|
||||||
|
' (PR #110).
|
||||||
|
'
|
||||||
|
' Original work: Copyright (c) 2009 Kazuhiko Arase - MIT License (full text below).
|
||||||
|
' Modifications: Copyright (c) Playlet contributors - AGPL-3.0, as part of this project.
|
||||||
|
'
|
||||||
|
' Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
' of this software and associated documentation files (the "Software"), to deal
|
||||||
|
' in the Software without restriction, including without limitation the rights
|
||||||
|
' to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
' copies of the Software, and to permit persons to whom the Software is
|
||||||
|
' furnished to do so, subject to the following conditions:
|
||||||
|
'
|
||||||
|
' The above copyright notice and this permission notice shall be included in all
|
||||||
|
' copies or substantial portions of the Software.
|
||||||
|
'
|
||||||
|
' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
' IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
' FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
' AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
' LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
' OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
' SOFTWARE.
|
||||||
|
'
|
||||||
' Main changes:
|
' Main changes:
|
||||||
' - Removed Kanji, because it added a significant amount of size, while the use
|
' - Removed Kanji, because it added a significant amount of size, while the use
|
||||||
' cases of this app does not include Kanji
|
' cases of this app does not include Kanji
|
||||||
|
|||||||
@@ -471,7 +471,15 @@ namespace HttpClient
|
|||||||
backoffMs = 1000 + Rnd(2000)
|
backoffMs = 1000 + Rnd(2000)
|
||||||
tryNumber = m._tryCount - triesLeft + 1
|
tryNumber = m._tryCount - triesLeft + 1
|
||||||
LogWarnNoTelemetry("Request failed ID:", m.urlTransfer.GetIdentity(), "ErrorMessage:", response.ErrorMessage(), `\nRetrying: (`, tryNumber, "/", m._tryCount, ") in", backoffMs, "ms")
|
LogWarnNoTelemetry("Request failed ID:", m.urlTransfer.GetIdentity(), "ErrorMessage:", response.ErrorMessage(), `\nRetrying: (`, tryNumber, "/", m._tryCount, ") in", backoffMs, "ms")
|
||||||
LogWarnTelemetry(response.ErrorMessage() + `\n` + m.ToCurlCommand())
|
LogTelemetryEvent({
|
||||||
|
level: "warning"
|
||||||
|
message: response.ErrorMessage()
|
||||||
|
attachments: [{
|
||||||
|
filename: "request.txt"
|
||||||
|
content_type: "text/plain"
|
||||||
|
data: m.ToCurlCommand()
|
||||||
|
}]
|
||||||
|
})
|
||||||
|
|
||||||
if IsFunction(m._retryCallback)
|
if IsFunction(m._retryCallback)
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -35,6 +35,12 @@ namespace Tests
|
|||||||
m.assertEqual(PlayerCoordinatorLogic.KeyToCommand(RemoteKeys.Ok), TransportController.Command.None)
|
m.assertEqual(PlayerCoordinatorLogic.KeyToCommand(RemoteKeys.Ok), TransportController.Command.None)
|
||||||
m.assertEqual(PlayerCoordinatorLogic.KeyToCommand(RemoteKeys.Back), TransportController.Command.None)
|
m.assertEqual(PlayerCoordinatorLogic.KeyToCommand(RemoteKeys.Back), TransportController.Command.None)
|
||||||
m.assertEqual(PlayerCoordinatorLogic.KeyToCommand(RemoteKeys.Down), TransportController.Command.None)
|
m.assertEqual(PlayerCoordinatorLogic.KeyToCommand(RemoteKeys.Down), TransportController.Command.None)
|
||||||
|
m.assertEqual(PlayerCoordinatorLogic.KeyToCommand(RemoteKeys.Up), TransportController.Command.None)
|
||||||
|
m.assertEqual(PlayerCoordinatorLogic.KeyToCommand(RemoteKeys.Options), TransportController.Command.None)
|
||||||
|
' the play cluster: play-state keys, and a transport command here would make them seek instead.
|
||||||
|
m.assertEqual(PlayerCoordinatorLogic.KeyToCommand(RemoteKeys.Play), TransportController.Command.None)
|
||||||
|
m.assertEqual(PlayerCoordinatorLogic.KeyToCommand(RemoteKeys.PlayOnly), TransportController.Command.None)
|
||||||
|
m.assertEqual(PlayerCoordinatorLogic.KeyToCommand(RemoteKeys.Pause), TransportController.Command.None)
|
||||||
m.assertEqual(PlayerCoordinatorLogic.KeyToCommand("bogus"), TransportController.Command.None)
|
m.assertEqual(PlayerCoordinatorLogic.KeyToCommand("bogus"), TransportController.Command.None)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
|||||||
@@ -33,10 +33,6 @@ function LogTelemetryEvent(event as object)
|
|||||||
m.global.telemetry.LogEvent = event
|
m.global.telemetry.LogEvent = event
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function LogWarnTelemetry(message as string)
|
|
||||||
m.global.telemetry.LogWarn = message
|
|
||||||
end function
|
|
||||||
|
|
||||||
function ToString(value as dynamic) as string
|
function ToString(value as dynamic) as string
|
||||||
if getInterface(value, "ifString") <> invalid
|
if getInterface(value, "ifString") <> invalid
|
||||||
return value
|
return value
|
||||||
|
|||||||
Generated
+526
-230
File diff suppressed because it is too large.
Load diff
+13
-13
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "playlet-web",
|
"name": "playlet-web",
|
||||||
"version": "0.48.3",
|
"version": "0.48.4",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
@@ -9,27 +9,27 @@
|
|||||||
"lint": "svelte-check --tsconfig ./tsconfig.json --fail-on-warnings"
|
"lint": "svelte-check --tsconfig ./tsconfig.json --fail-on-warnings"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sveltejs/vite-plugin-svelte": "^7.2.0",
|
"@sveltejs/vite-plugin-svelte": "^7.3.0",
|
||||||
"@tailwindcss/postcss": "^4.3.3",
|
"@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.2",
|
"@vitejs/plugin-legacy": "^8.2.3",
|
||||||
"autoprefixer": "^10.5.4",
|
"autoprefixer": "^10.5.5",
|
||||||
"bgutils-js": "^4.0.2",
|
"bgutils-js": "^4.0.3",
|
||||||
"daisyui": "^5.7.0",
|
"daisyui": "^5.7.28",
|
||||||
"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.23",
|
"postcss": "^8.5.28",
|
||||||
"rollup-plugin-visualizer": "^7.0.1",
|
"rollup-plugin-visualizer": "^7.1.1",
|
||||||
"svelte": "^5.56.8",
|
"svelte": "^5.57.0",
|
||||||
"svelte-check": "^4.7.3",
|
"svelte-check": "^4.7.6",
|
||||||
"svelte-preprocess": "6.0.3",
|
"svelte-preprocess": "^6.0.5",
|
||||||
"tailwindcss": "^4.3.3",
|
"tailwindcss": "^4.3.3",
|
||||||
"terser": "^5.49.0",
|
"terser": "^5.51.2",
|
||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.9.3",
|
"typescript": "^5.9.3",
|
||||||
"vite": "^8.1.5",
|
"vite": "^8.2.2",
|
||||||
"vite-plugin-compression": "^0.5.1"
|
"vite-plugin-compression": "^0.5.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+14
-1
@@ -12,6 +12,17 @@
|
|||||||
let libUrlType;
|
let libUrlType;
|
||||||
let appId = "693751";
|
let appId = "693751";
|
||||||
|
|
||||||
|
// Kept in step with PlayletLibUrls.MIN_VERSION in playlet-app, which drops anything older at boot.
|
||||||
|
const MIN_LIB_VERSION = "0.11.0";
|
||||||
|
|
||||||
|
function isSupported(tag) {
|
||||||
|
const version = /^v(\d+\.\d+\.\d+)$/.exec(tag ?? "")?.[1];
|
||||||
|
return (
|
||||||
|
!version ||
|
||||||
|
version.localeCompare(MIN_LIB_VERSION, undefined, { numeric: true }) >= 0
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
releases = await fetchReleaseTags();
|
releases = await fetchReleaseTags();
|
||||||
setCurrentlyUsedRelease();
|
setCurrentlyUsedRelease();
|
||||||
@@ -62,7 +73,9 @@
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return releases.map((release) => {
|
return releases
|
||||||
|
.filter((release) => isSupported(release.tag_name))
|
||||||
|
.map((release) => {
|
||||||
return {
|
return {
|
||||||
name: release.tag_name,
|
name: release.tag_name,
|
||||||
enabled:
|
enabled:
|
||||||
|
|||||||
+60
-22
@@ -34,8 +34,7 @@ This page was automatically generated on ${formattedDate}.
|
|||||||
fs.writeFileSync(markdownFile, markdownContent);
|
fs.writeFileSync(markdownFile, markdownContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function deleteExistingAttachments() {
|
function deleteExistingAttachments() {
|
||||||
try {
|
|
||||||
const files = fs.readdirSync(attachmentDestination);
|
const files = fs.readdirSync(attachmentDestination);
|
||||||
|
|
||||||
for (const file of files) {
|
for (const file of files) {
|
||||||
@@ -44,13 +43,18 @@ async function deleteExistingAttachments() {
|
|||||||
console.log(`Deleted ${file}`);
|
console.log(`Deleted ${file}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
|
||||||
console.error(error);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const config = getEnvVars(['EMAIL', 'EMAIL_APP_PASSWORD']);
|
const config = getEnvVars(['EMAIL', 'EMAIL_APP_PASSWORD']);
|
||||||
|
|
||||||
|
// Gmail can take 15s or more to answer LOGIN, well past node-imap's 5s default,
|
||||||
|
// and throttles an account that reconnects right after a failed attempt.
|
||||||
|
const AUTH_TIMEOUT_MS = 60 * 1000;
|
||||||
|
const CONNECT_TIMEOUT_MS = 30 * 1000;
|
||||||
|
const CONNECT_ATTEMPTS = 3;
|
||||||
|
const RETRY_DELAY_MS = 30 * 1000;
|
||||||
|
const RUN_TIMEOUT_MS = 10 * 60 * 1000;
|
||||||
|
|
||||||
const imap = new Imap({
|
const imap = new Imap({
|
||||||
user: config.EMAIL,
|
user: config.EMAIL,
|
||||||
password: config.EMAIL_APP_PASSWORD,
|
password: config.EMAIL_APP_PASSWORD,
|
||||||
@@ -59,7 +63,9 @@ const imap = new Imap({
|
|||||||
tls: true,
|
tls: true,
|
||||||
tlsOptions: {
|
tlsOptions: {
|
||||||
rejectUnauthorized: false
|
rejectUnauthorized: false
|
||||||
}
|
},
|
||||||
|
connTimeout: CONNECT_TIMEOUT_MS,
|
||||||
|
authTimeout: AUTH_TIMEOUT_MS
|
||||||
});
|
});
|
||||||
|
|
||||||
const searchAsync = promisify(imap.search).bind(imap);
|
const searchAsync = promisify(imap.search).bind(imap);
|
||||||
@@ -129,13 +135,49 @@ async function moveToTrash(from, subject, since) {
|
|||||||
console.log('Moved %d message(s) to Trash for subject "%s"', uids.length, subject);
|
console.log('Moved %d message(s) to Trash for subject "%s"', uids.length, subject);
|
||||||
}
|
}
|
||||||
|
|
||||||
const timeout = setTimeout(() => {
|
function sleep(ms) {
|
||||||
console.log('Timeout');
|
return new Promise(resolve => setTimeout(resolve, ms));
|
||||||
process.exit(1);
|
}
|
||||||
}, 10 * 60 * 1000);
|
|
||||||
|
|
||||||
imap.once('ready', async () => {
|
function fail(error) {
|
||||||
|
console.error('Error:', error);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
function connectAsync() {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
const onReady = () => {
|
||||||
|
imap.removeListener('error', onError);
|
||||||
|
imap.on('error', fail);
|
||||||
|
resolve();
|
||||||
|
};
|
||||||
|
const onError = error => {
|
||||||
|
imap.removeListener('ready', onReady);
|
||||||
|
reject(error);
|
||||||
|
};
|
||||||
|
imap.once('ready', onReady);
|
||||||
|
imap.once('error', onError);
|
||||||
|
imap.connect();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function connectWithRetryAsync() {
|
||||||
|
for (let attempt = 1; ; attempt++) {
|
||||||
try {
|
try {
|
||||||
|
await connectAsync();
|
||||||
|
return;
|
||||||
|
} catch (error) {
|
||||||
|
if (attempt === CONNECT_ATTEMPTS) {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
console.error('Connection attempt %d/%d failed: %s', attempt, CONNECT_ATTEMPTS, error.message);
|
||||||
|
await sleep(RETRY_DELAY_MS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function downloadStats() {
|
||||||
|
await connectWithRetryAsync();
|
||||||
await openBoxAsync('INBOX');
|
await openBoxAsync('INBOX');
|
||||||
|
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
@@ -170,18 +212,14 @@ imap.once('ready', async () => {
|
|||||||
await moveToTrash('bdp_noreply@data.roku.com', 'App Stability', yesterdayString);
|
await moveToTrash('bdp_noreply@data.roku.com', 'App Stability', yesterdayString);
|
||||||
|
|
||||||
imap.end();
|
imap.end();
|
||||||
} catch (error) {
|
}
|
||||||
console.error('Error:', error);
|
|
||||||
}
|
|
||||||
clearTimeout(timeout);
|
|
||||||
});
|
|
||||||
|
|
||||||
imap.once('error', err => {
|
imap.on('end', () => {
|
||||||
console.error(err);
|
|
||||||
});
|
|
||||||
|
|
||||||
imap.once('end', () => {
|
|
||||||
console.log('Connection ended');
|
console.log('Connection ended');
|
||||||
});
|
});
|
||||||
|
|
||||||
imap.connect();
|
setTimeout(() => fail(new Error(`Gave up after ${RUN_TIMEOUT_MS / 1000}s`)), RUN_TIMEOUT_MS);
|
||||||
|
|
||||||
|
downloadStats().then(() => {
|
||||||
|
process.exit(0);
|
||||||
|
}).catch(fail);
|
||||||
Reference in new issue
Block a user