Compare commits

...
15 Commits
Author SHA1 Message Date
Brahim Hadriche 4bd5c11f42 [skip ci] changelog typo 2026-11-21 12:08:54 -05:00
Brahim Hadriche 669d4d2d8b Release v0.48.11 (#976) 2026-11-21 11:57:35 -05:00
Brahim Hadriche f5297ac582 Remove lib before showing dialog 2026-11-20 21:55:52 -05:00
Brahim Hadriche f2412a99ee Fix voice command possible crash 2026-11-20 21:44:49 -05:00
Brahim Hadriche c96f4605d7 Always set set seek mode to accurate 2026-11-20 21:18:23 -05:00
Brahim Hadriche 56351035c6 Fix missing titles in shorts 2026-11-20 21:13:18 -05:00
Brahim Hadriche 12d9b25762 Video player ui fix 2026-11-20 16:18:27 -05:00
Brahim Hadriche a049147149 test fix 2026-11-20 16:12:53 -05:00
Brahim Hadriche 317025087d CI fix 2026-11-20 15:57:23 -05:00
Brahim Hadriche ccad3705ac CI: self hosted runner 2026-11-20 15:47:59 -05:00
Weblate (bot)andmonochrome0301 5b204f2095 Translated using Weblate (Spanish) (#968)
Currently translated at 99.7% (349 of 350 strings)

Translation: Playlet/Playlet
Translate-URL: https://hosted.weblate.org/projects/playlet/playlet/es/

Co-authored-by: monochrome0301 <monochrome0301@users.noreply.hosted.weblate.org>
2026-11-04 08:27:59 -05:00
Brahim Hadriche 7dd7c0a93b telemetry adjust 2026-10-19 12:20:40 -04:00
Brahim Hadriche 0c31ee1354 Simplify lounge 2026-10-19 11:37:27 -04:00
Brahim Hadriche 6822f12336 Fix drm errors 2026-10-18 11:25:01 -04:00
Brahim Hadriche d6c776fbd5 Remove OTF DRM probe 2026-10-18 10:12:24 -04:00
109 changed files with 772 additions and 457 deletions

No files matched your search

+34 -15
View File
@@ -5,13 +5,16 @@ on:
branches: ["main"]
workflow_dispatch: {}
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release:
runs-on: ubuntu-latest
build:
runs-on: [self-hosted, roku]
steps:
- name: Checkout
@@ -28,25 +31,41 @@ jobs:
- name: Run tests
run: npm run test
env:
ROKU_DEV_TARGET: ${{ secrets.ROKU_DEV_TARGET }}
ROKU_DEV_TARGET_PORT: ${{ secrets.ROKU_DEV_TARGET_PORT }}
ROKU_DEVPASSWORD: ${{ secrets.ROKU_DEVPASSWORD }}
ROKU_DEV_TARGET_TELNET_PORT: ${{ secrets.ROKU_DEV_TARGET_TELNET_PORT }}
- name: Build Playlet for release
run: npm run build:release
env:
ROKU_DEV_TARGET: ${{ secrets.ROKU_DEV_TARGET }}
ROKU_DEV_TARGET_PORT: ${{ secrets.ROKU_DEV_TARGET_PORT }}
ROKU_DEVPASSWORD: ${{ secrets.ROKU_DEVPASSWORD }}
ROKU_SIGN_PASSWORD: ${{ secrets.ROKU_SIGN_PASSWORD }}
- name: Use Java 21
uses: actions/setup-java@v4
- name: Upload release
uses: actions/upload-artifact@v4
with:
name: release
path: |
release/playlet.zip
release/playlet.squashfs.pkg
release/playlet-lib.zip
release/playlet-lib.squashfs.pkg
if-no-files-found: error
retention-days: 1
publish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download release
uses: actions/download-artifact@v4
with:
name: release
path: release
- name: Use Java 25
uses: actions/setup-java@v5
with:
distribution: "temurin"
java-version: "21"
java-version: "25"
- name: Download the Static Channel Analysis CLI
run: |
+9
View File
@@ -5,6 +5,15 @@ 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/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.48.11] - 2026-11-21
### Fixed
- DRM playback errors on certain TVs, by filtering out FairPlay-only streams
- Player seek bar and backdrop missing on some devices
- Missing titles in shorts
- Always set seek mode to `accurate`
## [0.48.10] - 2026-10-17
### Added
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "playlet",
"version": "0.48.10",
"version": "0.48.11",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "playlet",
"version": "0.48.10",
"version": "0.48.11",
"hasInstallScript": true,
"devDependencies": {
"@rokucommunity/bslint": "^0.8.46",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "playlet",
"version": "0.48.10",
"version": "0.48.11",
"description": "Unofficial YouTube client for Roku",
"devDependencies": {
"@rokucommunity/bslint": "^0.8.46",
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "playlet-app",
"version": "0.48.10",
"version": "0.48.11",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "playlet-app",
"version": "0.48.10"
"version": "0.48.11"
}
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "playlet-app",
"version": "0.48.10",
"version": "0.48.11",
"description": "Unofficial YouTube client for Roku",
"scripts": {
"prebuild": "node ../tools/rm.js ../build/playlet-app",
@@ -47,6 +47,8 @@ function GetPlayletLibUrls() as object
end function
function LoadPlayletLib() as void
RemoveComponentLibrary()
if m.playletLibUrlIndex >= m.playletLibUrls.Count()
m.loadingIndicator.visible = false
if m.shouldClearRegistryOnLoadFail = true
@@ -56,7 +58,6 @@ function LoadPlayletLib() as void
return
end if
RemoveComponentLibrary()
uri = m.playletLibUrls[m.playletLibUrlIndex].link
LoadComponentLibrary(uri)
end function
+1 -1
View File
@@ -3,7 +3,7 @@ title=Playlet
# Do not update version manually, it is auto updated from package.json
major_version=0
minor_version=48
build_version=00010
build_version=00011
rsg_version=1.3
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "playlet-lib",
"version": "0.48.10",
"version": "0.48.11",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "playlet-lib",
"version": "0.48.10"
"version": "0.48.11"
}
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "playlet-lib",
"version": "0.48.10",
"version": "0.48.11",
"description": "Unofficial YouTube client for Roku",
"scripts": {
"prebuild": "node ../tools/rm.js ../build/playlet-lib",
@@ -1,11 +1,14 @@
import "pkg:/components/JobSystem/Jobs.bs"
import "pkg:/components/JobSystem/JobSystem.bs"
import "pkg:/source/utils/Logging.bs"
import "pkg:/source/utils/StringUtils.bs"
import "pkg:/source/utils/Types.bs"
import "TransportEvents.types.bs"
function Init()
m.appManager = CreateObject("roAppManager")
m.videoQueue = m.top.getScene().findNode("VideoQueue")
scene = m.top.getScene()
m.videoQueue = scene.findNode("VideoQueue")
m.jobQueue = scene.findNode("JobQueue")
' TODO:P2 ok, forward, rewind, replay, next and skip need support in the player or the queue. Until then they
' have no entry here, and answer unhandled.
@@ -102,20 +105,25 @@ end function
function NowPlayingCommand(_event as object) as string
player = m.videoQueue.player
if player = invalid
m.appManager.SetNowPlayingContentMetaData(invalid)
SetNowPlayingMetadata(invalid)
return TransportStatus.Success
end if
content = player.content
if content = invalid or StringUtils.IsNullOrEmpty(content.title)
m.appManager.SetNowPlayingContentMetaData(invalid)
SetNowPlayingMetadata(invalid)
return TransportStatus.ErrorGeneric
end if
m.appManager.SetNowPlayingContentMetaData({ title: content.title, contentType: "movie" })
SetNowPlayingMetadata({ title: content.title, contentType: "movie" })
return TransportStatus.Success
end function
' roAppManager is MAIN|TASK-only
function SetNowPlayingMetadata(metadata as dynamic) as void
JobSystem.QueueJob(m.jobQueue, Jobs.SetNowPlayingMetadataJob, { metadata: metadata })
end function
function NotSupportedCommand(_event as object) as string
return TransportStatus.ErrorChannel
end function
@@ -0,0 +1,11 @@
@job("SetNowPlayingMetadataJob")
function ExecuteJob() as void
appManager = CreateObject("roAppManager")
if appManager = invalid
JobError("Failed to create roAppManager object")
return
end if
input = JobGetInput()
appManager.SetNowPlayingContentMetaData(input.metadata)
end function
@@ -267,6 +267,10 @@ class DashManifest
continue for
end if
if m.HasOnlyUnsupportedDrm(format)
continue for
end if
if (format.width = invalid or format.height = invalid) and not StringUtils.IsNullOrEmpty(format.size)
if format.size.instr("x") > 0
parts = format.size.Tokenize("x")
@@ -323,7 +327,12 @@ class DashManifest
audioTrackId = format.audioTrack.id
end if
groupId = `${mimeType}-${justCodec}-${colorInfo}-${audioTrackId}${m.GetAudioVariantSuffix(format)}`
drmFamilies = ""
if IsArray(format.drmFamilies)
drmFamilies = format.drmFamilies.Join("+")
end if
groupId = `${mimeType}-${justCodec}-${colorInfo}-${audioTrackId}${m.GetAudioVariantSuffix(format)}-${drmFamilies}`
if groupInfo[groupId] = invalid
groupInfo[groupId] = []
@@ -473,14 +482,7 @@ class DashManifest
end if
if xml.Node("AdaptationSet", adaptationSetAttributes)
if IsArray(firstFormat.drmFamilies)
for each drmFamily in firstFormat.drmFamilies
systemId = m.GetDrmSystemId(drmFamily)
if IsString(systemId)
xml.EmptyNode("ContentProtection", { "schemeIdUri": `urn:uuid:${systemId}` })
end if
end for
end if
m.AddContentProtection(xml, firstFormat)
if IsAssociativeArray(firstFormat.audioTrack) or firstFormat.isDrc = true or firstFormat.isVoiceBoost = true
' Roles
@@ -574,14 +576,7 @@ class DashManifest
end if
if xml.Node("AdaptationSet", adaptationSetAttributes)
if IsArray(firstFormat.drmFamilies)
for each drmFamily in firstFormat.drmFamilies
systemId = m.GetDrmSystemId(drmFamily)
if IsString(systemId)
xml.EmptyNode("ContentProtection", { "schemeIdUri": `urn:uuid:${systemId}` })
end if
end for
end if
m.AddContentProtection(xml, firstFormat)
m.AddColorInfo(firstFormat, xml)
@@ -1015,6 +1010,32 @@ class DashManifest
}
end function
' DRM movies have formats whose only DRM family is FAIRPLAY, which no ContentProtection Roku supports can declare.
function HasOnlyUnsupportedDrm(format as object) as boolean
if not IsArray(format.drmFamilies) or format.drmFamilies.Count() = 0
return false
end if
for each drmFamily in format.drmFamilies
if IsString(m.GetDrmSystemId(drmFamily))
return false
end if
end for
return true
end function
' A set's formats share their drmFamilies: CreateFormatGroupings keys groups on them.
function AddContentProtection(xml as object, format as object) as void
if not IsArray(format.drmFamilies)
return
end if
for each drmFamily in format.drmFamilies
systemId = m.GetDrmSystemId(drmFamily)
if IsString(systemId)
xml.EmptyNode("ContentProtection", { "schemeIdUri": `urn:uuid:${systemId}` })
end if
end for
end function
function GetDrmSystemId(drmFamily as dynamic) as dynamic
if not IsString(drmFamily)
return invalid
@@ -1611,15 +1611,17 @@ namespace Innertube
end if
end if
title = ""
thumbnailOverlays = ObjectUtils.Dig(nodeData, ["header", "tileHeaderRenderer", "thumbnailOverlays"])
if IsArray(thumbnailOverlays)
for each overlay in thumbnailOverlays
title = ParseText(ObjectUtils.Dig(overlay, ["tileMetadataRenderer", "title"]))
if title <> ""
exit for
end if
end for
title = ParseText(ObjectUtils.Dig(nodeData, ["metadata", "tileMetadataRenderer", "title"]))
if title = ""
thumbnailOverlays = ObjectUtils.Dig(nodeData, ["header", "tileHeaderRenderer", "thumbnailOverlays"])
if IsArray(thumbnailOverlays)
for each overlay in thumbnailOverlays
title = ParseText(ObjectUtils.Dig(overlay, ["tileMetadataRenderer", "title"]))
if title <> ""
exit for
end if
end for
end if
end if
video = {
@@ -1,79 +0,0 @@
import "pkg:/source/services/HttpClient.bs"
import "pkg:/source/utils/UrlUtils.bs"
namespace Innertube
const DRM_PROBE_TIMEOUT_SECONDS = 15
const DRM_PROBE_DIR = "tmp:/drm_probe"
' Transport matrix against an OTF+DRM format whose segment-info fetch failed.
' Every variant returns 2xx on healthy googlevideo URLs, so any non-2xx is
' specific to this shape, and any 2xx is an escape to build playback on.
function ProbeOTFDrmFormat(format as object, requestHeaders as object, cancellation as object) as string
url = ValidString(format.url)
if url = ""
return "drm probe skipped: format has no url"
end if
rangeUrl = DrmProbeUrlWithParams(url, { range: "0-16383" })
sqUrl = DrmProbeUrlWithParams(url, { sq: "0", rn: "0" })
fs = CreateObject("roFileSystem")
fs.Delete(Innertube.DRM_PROBE_DIR)
fs.CreateDirectory(Innertube.DRM_PROBE_DIR)
postBody = CreateObject("roByteArray")
postBody.FromHexString("7800")
postBody.WriteFile(`${Innertube.DRM_PROBE_DIR}/post_body.bin`)
' Bare and sq responses are full media on a healthy URL — stream those to files
' instead of buffering them into strings.
variants = [
{ name: "GET bare", request: HttpClient.Get(url).SaveBodyToFile(`${Innertube.DRM_PROBE_DIR}/bare.bin`) }
{ name: "GET Range header", request: HttpClient.Get(url).Header("Range", "bytes=0-16383") }
{ name: "GET range param", request: HttpClient.Get(rangeUrl) }
{ name: "GET sq=0", request: HttpClient.Get(sqUrl).SaveBodyToFile(`${Innertube.DRM_PROBE_DIR}/sq.bin`) }
{ name: "POST empty range param", request: HttpClient.Post(rangeUrl) }
{ name: "POST {15:0} range param", request: HttpClient.Post(rangeUrl).FileBody(`${Innertube.DRM_PROBE_DIR}/post_body.bin`) }
]
for each variant in variants
variant.request.Headers(requestHeaders)
variant.request.AttemptTimeoutMs(Innertube.DRM_PROBE_TIMEOUT_SECONDS * 1000)
variant.request.Cancellation(cancellation)
variant.request.NoCache()
variant.pending = variant.request.Send()
end for
lines = [`drm probe itag=${format.itag} drmFamilies=${ValidArray(format.drmFamilies).Join(",")}`]
for each variant in variants
lines.Push(DrmProbeCollect(variant))
end for
fs.Delete(Innertube.DRM_PROBE_DIR)
return lines.Join(`\n`)
end function
function DrmProbeUrlWithParams(url as string, params as object) as string
queryComponents = UrlUtils.ParseQueryComponents(url)
queryComponents.Append(params)
return UrlUtils.SetQueryParams(url, queryComponents)
end function
function DrmProbeCollect(variant as object) as string
name = variant.name
response = variant.pending.Await()
if response.IsCancelled()
return `${name} -> cancelled`
end if
if response.IsTimedOut()
return `${name} -> timed out after ${Innertube.DRM_PROBE_TIMEOUT_SECONDS}s`
end if
return `${name} -> ${response.StatusCode()} headers=${ToString(response.Headers())}`
end function
end namespace
@@ -1,5 +1,6 @@
import "pkg:/components/Services/Innertube/Context.bs"
import "pkg:/components/Services/Innertube/OTFDrmProbe.bs"
import "pkg:/source/services/HttpClient.bs"
import "pkg:/source/utils/UrlUtils.bs"
namespace Innertube
@@ -18,11 +19,10 @@ namespace Innertube
const OTF_MAX_REQUEST_COUNT = 8
function OTFGetSegmentInfo(adaptiveFormats as object, client as Innertube.ClientType, cancellation as object, playerResponseText as string) as void
function OTFGetSegmentInfo(adaptiveFormats as object, client as Innertube.ClientType, cancellation as object) as void
errors = {
message: ""
attachments: []
drmProbed: false
}
formatsToProcess = []
@@ -62,7 +62,7 @@ namespace Innertube
pendingFormat = pendingFormats.Shift()
' returns false if processing should stop (e.g., cancelled)
if not OTFProcessPendingFormat(pendingFormat.format, pendingFormat.pending, pendingFormat.filePath, segmentDurationsRegex, errors, requestHeaders, cancellation)
if not OTFProcessPendingFormat(pendingFormat.format, pendingFormat.pending, pendingFormat.filePath, segmentDurationsRegex, errors)
exit while
end if
end while
@@ -72,14 +72,6 @@ namespace Innertube
fs.Delete("tmp:/otf_segments")
if errors.drmProbed
errors.attachments.Push({
filename: "player_response.json"
content_type: "application/json"
data: playerResponseText
})
end if
if not StringUtils.IsNullOrEmpty(errors.message) or errors.attachments.Count() > 0
LogTelemetryEvent({
level: "error"
@@ -110,7 +102,7 @@ namespace Innertube
return request.Send()
end function
function OTFProcessPendingFormat(format as object, pending as HttpClient.PendingResponse, filePath as string, segmentDurationsRegex as object, errors as object, requestHeaders as object, cancellation as object) as boolean
function OTFProcessPendingFormat(format as object, pending as HttpClient.PendingResponse, filePath as string, segmentDurationsRegex as object, errors as object) as boolean
response = pending.Await()
if response.IsCancelled()
@@ -119,10 +111,6 @@ namespace Innertube
if not response.IsSuccess()
errors.message += `Failed to get segment info for itag ${format.itag}: ${response.ErrorMessage()}\n`
if IsArray(format.drmFamilies) and not errors.drmProbed
errors.drmProbed = true
errors.message += Innertube.ProbeOTFDrmFormat(format, requestHeaders, cancellation) + `\n`
end if
return true
end if
@@ -195,7 +195,7 @@ namespace Innertube
if isOTF
LogDebug("Fetching OTF segment info")
OTFGetSegmentInfo(adaptiveFormats, client, cancellation, playerResponse.Text())
OTFGetSegmentInfo(adaptiveFormats, client, cancellation)
end if
if isLive
@@ -1,6 +1,6 @@
import "pkg:/components/Services/LoungeService/LoungeFraming.bs"
import "pkg:/components/Services/LoungeService/LoungeService.types.bs"
import "pkg:/source/services/HttpClient.bs"
import "pkg:/source/utils/ByteArrayUtils.bs"
import "pkg:/source/utils/Logging.bs"
import "pkg:/source/utils/StringUtils.bs"
import "pkg:/source/utils/Types.bs"
@@ -71,10 +71,6 @@ class LoungeBackchannel
m.closeReason = LoungeCloseReason.NotSent
return []
end if
if m.statusCode < 0
m.closeReason = LoungeCloseReason.Curl
return []
end if
if m.statusCode < 200 or m.statusCode >= 300
m.closeReason = LoungeCloseReason.Http
return []
@@ -97,25 +93,42 @@ class LoungeBackchannel
return commands
end function
function CloseLabel() as string
if m.closeReason = LoungeCloseReason.Curl or m.closeReason = LoungeCloseReason.Http
return `${m.closeReason}_${Abs(m.statusCode)}`
end if
return m.closeReason
end function
' Frame = `<byteLength>\n<json>`, the length counted in BYTES. The answer is complete, so a malformed or cut-off
' frame ends the extraction: no later read can complete it.
private function ExtractFrames(text as string) as object
body = CreateObject("roByteArray")
body.FromAsciiString(text)
result = LoungeFraming.Extract(body, 0)
if result.nextPos < body.Count()
LogTelemetryEvent({
level: "warning"
message: `Lounge answer ended mid-frame, ${body.Count() - result.nextPos} bytes left: ${text}`
fingerprint: "lounge-partial-frame"
})
end if
return result.frames
frames = []
count = body.Count()
cursor = 0
while cursor < count
if body[cursor] = 10 or body[cursor] = 13
cursor += 1
continue while
end if
frameStart = cursor
frameLength = 0
' Stops once the length exceeds the body: a frame that long can't be whole, and the integer can't overflow.
while cursor < count and body[cursor] >= 48 and body[cursor] <= 57 and frameLength <= count
frameLength = frameLength * 10 + body[cursor] - 48
cursor += 1
end while
if cursor < count and body[cursor] = 13
cursor += 1
end if
if cursor >= count or body[cursor] <> 10 or frameLength = 0 or count - cursor - 1 < frameLength
LogTelemetryEvent({
level: "warning"
message: `Lounge answer has a malformed or cut-off frame at byte ${frameStart} of ${count}: ${text}`
fingerprint: "lounge-partial-frame"
})
exit while
end if
dataStart = cursor + 1
frames.Push(ByteArrayUtils.Slice(body, dataStart, dataStart + frameLength).ToAsciiString())
cursor = dataStart + frameLength
end while
return frames
end function
private function Receive(frames as object) as LoungeCommand[]
@@ -1,19 +0,0 @@
import "pkg:/source/utils/ByteArrayUtils.bs"
namespace LoungeBytes
function RangeToString(bytes as object, fromIndex as integer, toIndex as integer) as string
return ByteArrayUtils.Slice(bytes, fromIndex, toIndex).ToAsciiString()
end function
function IndexOfByte(bytes as object, fromIndex as integer, value as integer) as integer
last = bytes.Count() - 1
for i = fromIndex to last
if bytes[i] = value
return i
end if
end for
return -1
end function
end namespace
@@ -1,43 +0,0 @@
import "pkg:/components/Services/LoungeService/LoungeBytes.bs"
namespace LoungeFraming
' Frame = `<byteLength>\n<json>`, the length counted in BYTES. An incomplete trailing frame
' is left unconsumed (nextPos marks its start).
function Extract(body as object, startPos as integer) as object
frames = []
cursor = startPos
count = body.Count()
while true
while cursor < count and (body[cursor] = 13 or body[cursor] = 10)
cursor += 1
end while
if cursor >= count
exit while
end if
lf = LoungeBytes.IndexOfByte(body, cursor, 10)
if lf = -1
exit while
end if
frameLength = Int(Val(LoungeBytes.RangeToString(body, cursor, lf).Trim(), 10))
if frameLength <= 0
cursor = lf + 1
continue while
end if
dataStart = lf + 1
if count - dataStart < frameLength
exit while
end if
frames.Push(LoungeBytes.RangeToString(body, dataStart, dataStart + frameLength))
cursor = dataStart + frameLength
end while
return { frames: frames, nextPos: cursor }
end function
end namespace
@@ -151,21 +151,20 @@ function RunSession(api as LoungeApi, messagePort as object) as boolean
continue while
end if
closeLabel = backchannel.CloseLabel()
LogDebug("Backchannel closed:", closeLabel, "next:", nextStep)
LogDebug("Backchannel closed:", backchannel.closeReason, backchannel.statusCode, "next:", nextStep)
if nextStep = LoungeSessionStep.Drop
LogTelemetryEvent({
level: "error"
message: `Lounge session dropped: no poll delivered for ${sinceDelivered.TotalSeconds()} s, last close: ${closeLabel}`
fingerprint: ["lounge-session-dropped", closeLabel]
message: `Lounge session dropped: no poll delivered for ${sinceDelivered.TotalSeconds()} s, last close: ${backchannel.closeReason} ${backchannel.statusCode}`
fingerprint: ["lounge-session-dropped", backchannel.closeReason, backchannel.statusCode]
})
return false
end if
if nextStep = LoungeSessionStep.Retry and backchannel.closeReason <> LoungeCloseReason.Timeout
LogTelemetryEvent({
level: "warning"
message: "Lounge backchannel failure: " + closeLabel
fingerprint: "lounge-backchannel-" + closeLabel
message: `Lounge backchannel failure: ${backchannel.closeReason} ${backchannel.statusCode}`
fingerprint: ["lounge-backchannel", backchannel.closeReason, backchannel.statusCode]
})
end if
@@ -4,7 +4,6 @@ enum LoungeCloseReason
Stalled = "stalled"
Timeout = "timeout"
NotSent = "not_sent"
Curl = "curl"
Http = "http"
end enum
@@ -49,7 +49,6 @@ namespace SponsorBlock
end if
m.skipSegments = skipSegments
m.top.seekMode = "accurate"
barPath = info.data.barPath
if barPath <> invalid
@@ -36,6 +36,7 @@ function Init()
m.trickplayUITimer = m.top.findNode("trickplayUITimer")
m.trickplayUITimer.ObserveField("fire", FuncName(OnTrickplayUITimer))
m.top.notificationInterval = 1
m.top.seekMode = "accurate"
' videoPlayingSuccess indicates if we started playing a video successfully
' We use it to detect if we should try another link for a video, or if another error
@@ -19,13 +19,13 @@
<!-- Dim side panels paint first (behind the tiles): VOD storyboard tiles cover them; on live (empty
tiles) they show through as the filmstrip structure. -->
<Poster id="bifSideL2" translation="[-36, 42]" width="250" height="141" opacity="0.15"
uri="/RokuOS/Artwork/SceneGraph/GenevaTheme/Base/FHD/imageFootprint.9.png" loadDisplayMode="noScale" />
uri="pkg:/images/player/imageFootprint.9.png" loadDisplayMode="noScale" />
<Poster id="bifSideL1" translation="[226, 42]" width="250" height="141" opacity="0.15"
uri="/RokuOS/Artwork/SceneGraph/GenevaTheme/Base/FHD/imageFootprint.9.png" loadDisplayMode="noScale" />
uri="pkg:/images/player/imageFootprint.9.png" loadDisplayMode="noScale" />
<Poster id="bifSideR1" translation="[804, 42]" width="250" height="141" opacity="0.15"
uri="/RokuOS/Artwork/SceneGraph/GenevaTheme/Base/FHD/imageFootprint.9.png" loadDisplayMode="noScale" />
uri="pkg:/images/player/imageFootprint.9.png" loadDisplayMode="noScale" />
<Poster id="bifSideR2" translation="[1066, 42]" width="250" height="141" opacity="0.15"
uri="/RokuOS/Artwork/SceneGraph/GenevaTheme/Base/FHD/imageFootprint.9.png" loadDisplayMode="noScale" />
uri="pkg:/images/player/imageFootprint.9.png" loadDisplayMode="noScale" />
<!-- Storyboard tiles, oversized + clippingRect picks the cell; center has a gradient overlay + frame. -->
<Poster id="bifTileL2" loadDisplayMode="scaleToFill" />
<Poster id="bifTileL1" loadDisplayMode="scaleToFill" />
@@ -33,9 +33,9 @@
<!-- ABOVE the center tile (the stock layering): keeps the white scan glyph legible over a bright
frame. The glyph itself rides the TrickPlayBar handle, a later Chrome sibling. -->
<Poster id="bifCenterGradient" translation="[488, 12]" width="304" height="171"
uri="/RokuOS/Artwork/SceneGraph/FixedTheme/Base/FHD/PauseGradientThumbnail.9.png" loadDisplayMode="noScale" />
uri="pkg:/images/player/PauseGradientThumbnail.png" loadDisplayMode="noScale" />
<Poster id="bifFrame" translation="[476, 0]" width="328" height="196"
uri="/RokuOS/Artwork/SceneGraph/GenevaTheme/Base/FHD/focus_grid.9.png" loadDisplayMode="noScale" />
uri="pkg:/images/player/focus_grid.$$RES$$.9.png" loadDisplayMode="noScale" />
<Poster id="bifTileR1" loadDisplayMode="scaleToFill" />
<Poster id="bifTileR2" loadDisplayMode="scaleToFill" />
</children>
@@ -23,7 +23,7 @@
<Timer id="hold" duration="1.0" repeat="false" />
<Poster id="poster" visible="false" opacity="0"
uri="/RokuOS/Artwork/SceneGraph/FixedTheme/Base/FHD/LargePause.png"
uri="pkg:/images/icons/player/LargePause.png"
width="80" height="80" translation="[600, 320]" scaleRotateCenter="[40, 40]"
scale="[0.75, 0.75]" blendColor="0xFFFFFFFF" loadDisplayMode="noScale" />
</children>
@@ -14,9 +14,12 @@ end enum
function Init()
m.loadingGroup = m.top.findNode("loadingTitleArea")
m.spinner = m.top.findNode("spinner")
' blendColor lives on the BusySpinner's poster child, not the spinner node.
' blendColor and size live on the BusySpinner's poster child, not the spinner node. Sized explicitly: the
' bitmap's size in design units varies with the device's UI resolution.
if m.spinner <> invalid and m.spinner.poster <> invalid
m.spinner.poster.blendColor = "#FF1C30FF"
m.spinner.poster.width = 80
m.spinner.poster.height = 80
end if
m.top.ObserveField("mode", FuncName(OnMode))
OnMode()
@@ -21,6 +21,6 @@
</LayoutGroup>
<!-- Shared by both modes; translation centers the 80x80 spinner. -->
<BusySpinner id="spinner" translation="[600, 320]" visible="false" spinInterval="1"
uri="/RokuOS/Artwork/SceneGraph/FixedTheme/Base/FHD/Spinner_MH.webp" />
uri="pkg:/images/icons/player/Spinner_MH.png" />
</children>
</component>
@@ -233,9 +233,8 @@ namespace PlaybackTelemetry
function ReportVideoError(errorData as object, errorInfo as object, url as dynamic, urlIndex as dynamic, shownInDialog as boolean) as void
m.errorCount += 1
' malformed data: the last generated DASH/HLS manifest and player response diagnose it from the report.
attachments = invalid
if errorData.body.Instr("malformed data") <> -1 or errorData.body.Instr("invalid pathname") <> -1
if errorData.body.Instr("malformed data") <> -1 or errorData.body.Instr("invalid pathname") <> -1 or ((errorInfo = invalid or errorInfo.category <> "http") and errorData.body.Instr("last_err:") = -1)
attachments = [{
filename: "last_generated_dash.xml"
content_type: "plain/text"
@@ -26,7 +26,7 @@ namespace SponsorBlockController
const SEEK_ECHO_SLACK_MS = 100
class Controller
' deps the coordinator owns; top = the Video node (seekMode + duration).
' deps the coordinator owns; top = the Video node (duration).
private jobQueue as object = invalid
private preferences as object = invalid
private notifications as object = invalid
@@ -77,7 +77,7 @@ namespace SponsorBlockController
}
end function
' Store the segments and set seekMode=accurate on the Video node.
' Store the segments.
function OnSegmentsJobDone(event as object) as void
info = event.getInfo()
if not info.success
@@ -89,9 +89,6 @@ namespace SponsorBlockController
end if
m.segments = segments
m.timeline = info.data.timeline
if m.top <> invalid
m.top.seekMode = "accurate"
end if
LogDebug("segments ready:", segments.Count())
end function
@@ -6,7 +6,7 @@ import "pkg:/source/utils/Types.bs"
' Every input field is observed in Init and repaints on change, except glyph, focused and the SponsorBlock
' tint, which update only their own piece.
const GLYPH_ASSET_BASE = "/RokuOS/Artwork/SceneGraph/FixedTheme/Base/FHD/"
const GLYPH_ASSET_BASE = "pkg:/images/icons/player/"
function Init()
m.trackFill = m.top.findNode("trackFill")
@@ -131,6 +131,23 @@ namespace Tests
m.assertEqual(handle.translation[1], 22.0)
end function
@it("points every glyph, the handle, the track and the LIVE bullet at a bundled file")
function _()
file = CreateObject("roByteArray")
sg = m.top.findNode("scanGlyph")
for glyph = TransportController.Glyph.SkipBack to TransportController.Glyph.Replay
m.top.glyph = glyph
m.assertTrue(file.ReadFile(sg.uri), sg.uri)
end for
m.top.glyph = TransportController.Glyph.None
track = m.top.findNode("trackBg").uri
for each res in ["480p", "720p", "1080p"]
m.assertTrue(file.ReadFile(track.Replace("$$RES$$", res)), track)
end for
m.assertTrue(file.ReadFile(m.top.findNode("handle").uri))
m.assertTrue(file.ReadFile(m.top.findNode("bullet").uri))
end function
@describe("TrickPlayBar — LIVE projection")
@it("BEHIND the edge: fill/playhead are PROPORTIONAL to cursor within the DVR window + offset label")
@@ -24,11 +24,11 @@
</interface>
<children>
<Poster id="trackBg"
uri="/RokuOS/Artwork/SceneGraph/FixedTheme/Base/FHD/osd_sliderControl_small.9.png"
uri="pkg:/images/player/osd_sliderControl_small.$$RES$$.9.png"
width="1144" height="12" opacity="0.3" loadDisplayMode="noScale" />
<!-- same asset tinted red, clipped to progress width in code. -->
<Poster id="trackFill"
uri="/RokuOS/Artwork/SceneGraph/FixedTheme/Base/FHD/osd_sliderControl_small.9.png"
uri="pkg:/images/player/osd_sliderControl_small.$$RES$$.9.png"
width="1144" height="12" blendColor="0xFF1C30FF" clippingRect="[0,0,0,12]" loadDisplayMode="noScale" />
<!-- the cursor: a 12px dot that swells half-again while the bar tier holds focus. PositionPlayhead
moves it; the grow/shrink animations scale it about its center. -->
@@ -44,7 +44,7 @@
</Animation>
<!-- handle: pinned at bar-center. {547,22} rest, {547,-54} active. -->
<Poster id="handle"
uri="/RokuOS/Artwork/SceneGraph/FixedTheme/Base/FHD/videoProgressBarHandle.9.png"
uri="pkg:/images/player/videoProgressBarHandle.9.png"
translation="[547, 22]" width="50" height="30" loadDisplayMode="noScale">
<Poster id="scanGlyph" visible="false" width="50" height="30" loadDisplayMode="noScale" />
</Poster>
@@ -61,8 +61,8 @@
</Label>
<!-- LIVE bullet: shown only at the edge. -->
<Poster id="bullet" visible="false"
uri="/RokuOS/Artwork/SceneGraph/FixedTheme/Base/FHD/icon_inline_unselected_bullet.webp"
translation="[1056, 24]" blendColor="0xD53E5AFF" loadDisplayMode="noScale" />
uri="pkg:/images/icons/player/icon_inline_unselected_bullet.png"
translation="[1056, 24]" width="24" height="24" blendColor="0xD53E5AFF" loadDisplayMode="noScale" />
<!-- LIVE badge: shown only at the edge. -->
<Label id="liveLabel" visible="false" translation="[1080, 24]" height="30"
text="LIVE" color="0xFEFEFEFF" horizAlign="left" vertAlign="top">
@@ -40,6 +40,7 @@ end enum
' one component scope; this file is shared with the test mock (tests/VideoPlayerDevMock).
function Initialize()
m.top.notificationInterval = 1
m.top.seekMode = "accurate"
m.transport = new TransportController.Controller()
m.playbackTelemetry = new PlaybackTelemetry.Recorder({
@@ -1223,8 +1224,8 @@ function OnVideoContentJobDone(event as object) as void
MarkVideoWatched(content.videoId, metadata.playbackTrackingUrls, metadata.cpn)
end function
' The coordinator-owned SB job callback (node scope). Hands the result to the controller (it stores segments +
' sets seekMode), then pushes the bar tint fields when segments exist.
' The coordinator-owned SB job callback (node scope). Hands the result to the controller (it stores segments),
' then pushes the bar tint fields when segments exist.
function OnSponsorBlockSegmentsJobDone(event as object) as void
JobSystem.UnobserveCallback(event.getRoSGNode())
m.sponsorBlockSegmentsJob = invalid
@@ -77,7 +77,7 @@
<Group id="Chrome" opacity="0" visible="false">
<!-- Full-screen darkening scrim, chrome-gated (rides the fade), not pause-gated. -->
<Poster id="pauseGradient"
uri="/RokuOS/Artwork/SceneGraph/FixedTheme/Base/FHD/PauseGradient.9.png"
uri="pkg:/images/player/PauseGradient.png"
width="1280" height="720" />
<!-- First content sibling: its full-screen black backdrop must paint UNDER the title/bar/buttons
@@ -13,6 +13,7 @@
<field id="position" type="float" alwaysNotify="true" />
<field id="duration" type="float" />
<field id="autoplayAfterSeek" type="boolean" value="true" />
<field id="seekMode" type="string" value="default" />
<field id="content" type="node" />
<field id="thumbnailTiles" type="assocarray" />
<field id="playbackSpeed" type="float" value="1.0" />
Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="0 0 120 120">
<g fill="#FFF" stroke="#000" stroke-opacity="0.12" stroke-width="3" paint-order="stroke"><rect x="3" y="3" width="48" height="114" rx="4"/><rect x="69" y="3" width="48" height="114" rx="4"/></g>
</svg>

After

Width:  |  Height:  |  Size: 290 B

@@ -0,0 +1,11 @@
{
inputHash: '365d573b68143d3d9833785535315f05',
outputs: [
{
outputFilePath: 'images/icons/player/LargePause.png',
outputHash: 'e5d6bcc5e4d32775aa355aed829d6786',
width: 120,
height: 120,
},
],
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="0 0 120 120">
<foreignObject width="120" height="120"><div xmlns="http://www.w3.org/1999/xhtml" style="width:120px;height:120px;border-radius:50%;background:conic-gradient(rgba(255,255,255,0) 10deg,#FFF 360deg);-webkit-mask:radial-gradient(closest-side,transparent calc(100% - 7.5px),#000 calc(100% - 6.5px));mask:radial-gradient(closest-side,transparent calc(100% - 7.5px),#000 calc(100% - 6.5px))"/></foreignObject><circle cx="60" cy="3.5" r="3.5" fill="#FFF"/>
</svg>

After

Width:  |  Height:  |  Size: 545 B

@@ -0,0 +1,11 @@
{
inputHash: '05e22fbe084aba15195e28fed76638d3',
outputs: [
{
outputFilePath: 'images/icons/player/Spinner_MH.png',
outputHash: '11ace03cf9aeab9866ffdde4a78345d9',
width: 120,
height: 120,
},
],
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="75" height="45" viewBox="0 0 75 45">
<g fill="#EFEFEF" stroke="#EFEFEF" stroke-width="2" stroke-linejoin="round"><g opacity="0.2"><path d="M25 3.5 L48 22.5 L25 41.5 Z"/><path d="M45 3.5 L68 22.5 L45 41.5 Z"/></g><path d="M5 3.5 L28 22.5 L5 41.5 Z"/></g>
</svg>

After

Width:  |  Height:  |  Size: 308 B

@@ -0,0 +1,11 @@
{
inputHash: '0986e8af2b2ff759cba17d83ef63c2fd',
outputs: [
{
outputFilePath: 'images/icons/player/icon_FFx1.png',
outputHash: '0977d7dd03d3bd50c6c17a24977e78f1',
width: 75,
height: 45,
},
],
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="75" height="45" viewBox="0 0 75 45">
<g fill="#EFEFEF" stroke="#EFEFEF" stroke-width="2" stroke-linejoin="round"><g opacity="0.2"><path d="M45 3.5 L68 22.5 L45 41.5 Z"/></g><path d="M5 3.5 L28 22.5 L5 41.5 Z"/><path d="M25 3.5 L48 22.5 L25 41.5 Z"/></g>
</svg>

After

Width:  |  Height:  |  Size: 308 B

@@ -0,0 +1,11 @@
{
inputHash: '469eb45aa9d725130b41ea54bd193270',
outputs: [
{
outputFilePath: 'images/icons/player/icon_FFx2.png',
outputHash: 'eba816c002bd6fc834ef956681fb2dc0',
width: 75,
height: 45,
},
],
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 767 B

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="75" height="45" viewBox="0 0 75 45">
<g fill="#EFEFEF" stroke="#EFEFEF" stroke-width="2" stroke-linejoin="round"><path d="M5 3.5 L28 22.5 L5 41.5 Z"/><path d="M25 3.5 L48 22.5 L25 41.5 Z"/><path d="M45 3.5 L68 22.5 L45 41.5 Z"/></g>
</svg>

After

Width:  |  Height:  |  Size: 287 B

@@ -0,0 +1,11 @@
{
inputHash: '980f9d24e3a1cb5c63b20009d9a16133',
outputs: [
{
outputFilePath: 'images/icons/player/icon_FFx3.png',
outputHash: '251be69bc462cd2e0f757c57eb24ad2c',
width: 75,
height: 45,
},
],
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="75" height="45" viewBox="0 0 75 45">
<g transform="translate(75 0) scale(-1 1)"><g fill="#EFEFEF" stroke="#EFEFEF" stroke-width="2" stroke-linejoin="round"><g opacity="0.2"><path d="M25 3.5 L48 22.5 L25 41.5 Z"/><path d="M45 3.5 L68 22.5 L45 41.5 Z"/></g><path d="M5 3.5 L28 22.5 L5 41.5 Z"/></g></g>
</svg>

After

Width:  |  Height:  |  Size: 355 B

@@ -0,0 +1,11 @@
{
inputHash: 'fe8c1802a9432a779db5b47a8aee3cf2',
outputs: [
{
outputFilePath: 'images/icons/player/icon_RWx1.png',
outputHash: '69d38e14fa66c0fd8132b4baf6d5b2e4',
width: 75,
height: 45,
},
],
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="75" height="45" viewBox="0 0 75 45">
<g transform="translate(75 0) scale(-1 1)"><g fill="#EFEFEF" stroke="#EFEFEF" stroke-width="2" stroke-linejoin="round"><g opacity="0.2"><path d="M45 3.5 L68 22.5 L45 41.5 Z"/></g><path d="M5 3.5 L28 22.5 L5 41.5 Z"/><path d="M25 3.5 L48 22.5 L25 41.5 Z"/></g></g>
</svg>

After

Width:  |  Height:  |  Size: 355 B

@@ -0,0 +1,11 @@
{
inputHash: '8008033b27507ebaee97e12b928037cc',
outputs: [
{
outputFilePath: 'images/icons/player/icon_RWx2.png',
outputHash: '5a65af95686da53580b631d54d2b85cc',
width: 75,
height: 45,
},
],
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 817 B

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="75" height="45" viewBox="0 0 75 45">
<g transform="translate(75 0) scale(-1 1)"><g fill="#EFEFEF" stroke="#EFEFEF" stroke-width="2" stroke-linejoin="round"><path d="M5 3.5 L28 22.5 L5 41.5 Z"/><path d="M25 3.5 L48 22.5 L25 41.5 Z"/><path d="M45 3.5 L68 22.5 L45 41.5 Z"/></g></g>
</svg>

After

Width:  |  Height:  |  Size: 334 B

@@ -0,0 +1,11 @@
{
inputHash: '56cd45de7037c14773f5491e19998fce',
outputs: [
{
outputFilePath: 'images/icons/player/icon_RWx3.png',
outputHash: 'df054ef7dbdcf7f72ea68ff411d5fba1',
width: 75,
height: 45,
},
],
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36">
<circle cx="18" cy="18" r="8" fill="#ABABAB"/>
</svg>

After

Width:  |  Height:  |  Size: 138 B

@@ -0,0 +1,11 @@
{
inputHash: 'fc641b4b8ae0068b538a47f8e9651e5f',
outputs: [
{
outputFilePath: 'images/icons/player/icon_inline_unselected_bullet.png',
outputHash: '44c1d2244a8107af370b49e0fc3675e1',
width: 36,
height: 36,
},
],
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="75" height="45" viewBox="0 0 75 45">
<path d="M20 21.5 A17.5 17.5 0 1 1 25.13 34.87" fill="none" stroke="#EFEFEF" stroke-width="5.5" stroke-linecap="round"/><path d="M14.5 20.5 L27.5 20.5 L21 29.5 Z" fill="#EFEFEF" stroke="#EFEFEF" stroke-width="1.5" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 331 B

@@ -0,0 +1,11 @@
{
inputHash: '1cffb669ee3c117ac532eda41ec434fe',
outputs: [
{
outputFilePath: 'images/icons/player/icon_replay.png',
outputHash: 'daa27ea7c4054f8b136858e6493d8659',
width: 75,
height: 45,
},
],
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="75" height="45" viewBox="0 0 75 45">
<g fill="#EFEFEF"><rect x="24" y="4" width="12" height="37" rx="2"/><rect x="43" y="4" width="12" height="37" rx="2"/><path d="M61 13.5 L72 22.5 L61 31.5 Z" stroke="#EFEFEF" stroke-width="1.5" stroke-linejoin="round"/></g>
</svg>

After

Width:  |  Height:  |  Size: 314 B

@@ -0,0 +1,11 @@
{
inputHash: 'fb19f5f7f3362920f0ef2a6f03d820d4',
outputs: [
{
outputFilePath: 'images/icons/player/icon_skipAhead.png',
outputHash: '51451f2ca9549a22309c8ed2a8870173',
width: 75,
height: 45,
},
],
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 613 B

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="75" height="45" viewBox="0 0 75 45">
<g transform="translate(75 0) scale(-1 1)"><g fill="#EFEFEF"><rect x="24" y="4" width="12" height="37" rx="2"/><rect x="43" y="4" width="12" height="37" rx="2"/><path d="M61 13.5 L72 22.5 L61 31.5 Z" stroke="#EFEFEF" stroke-width="1.5" stroke-linejoin="round"/></g></g>
</svg>

After

Width:  |  Height:  |  Size: 361 B

@@ -0,0 +1,11 @@
{
inputHash: '8cf579b165111dc7afdf0841d1bc72cb',
outputs: [
{
outputFilePath: 'images/icons/player/icon_skipBack.png',
outputHash: '88283d74a134cc21e5a46103661cc909',
width: 75,
height: 45,
},
],
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1080" viewBox="0 0 1 1080" preserveAspectRatio="none">
<defs><linearGradient id="g" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-opacity="0.86"/><stop offset="0.12" stop-opacity="0.58"/><stop offset="0.24" stop-opacity="0.2"/><stop offset="0.32" stop-opacity="0"/><stop offset="0.54" stop-opacity="0"/><stop offset="0.66" stop-opacity="0.3"/><stop offset="0.82" stop-opacity="0.65"/><stop offset="1" stop-opacity="0.92"/></linearGradient></defs><rect width="1" height="1080" fill="url(#g)"/>
</svg>

After

Width:  |  Height:  |  Size: 562 B

@@ -0,0 +1,11 @@
{
inputHash: '16ca2d9e1b2b5e93a605ab7d6767222d',
outputs: [
{
outputFilePath: 'images/player/PauseGradient.png',
outputHash: '44e41195c8ce4a12ffed9c941d048551',
width: 1,
height: 1080,
},
],
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 125 B

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1" height="256" viewBox="0 0 1 256" preserveAspectRatio="none">
<defs><linearGradient id="g" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-opacity="0.27"/><stop offset="0.4" stop-opacity="0.27"/><stop offset="1" stop-opacity="0.8"/></linearGradient></defs><rect width="1" height="256" fill="url(#g)"/>
</svg>

After

Width:  |  Height:  |  Size: 360 B

@@ -0,0 +1,11 @@
{
inputHash: 'e5090064415e37e798eb2e4b774c4aac',
outputs: [
{
outputFilePath: 'images/player/PauseGradientThumbnail.png',
outputHash: 'bb3995a997312a893bdf4cb532ec7d5b',
width: 1,
height: 256,
},
],
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 B

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="116" height="116" viewBox="0 0 116 116">
<rect x="14" y="14" width="88" height="88" rx="4" fill="none" stroke="#E5E5E5" stroke-width="8"/>
</svg>

After

Width:  |  Height:  |  Size: 193 B

@@ -0,0 +1,53 @@
{
inputHash: 'f5b1f5756c16612292fea5336cd98871',
outputs: [
{
outputFilePath: 'images/player/focus_grid.1080p.9.png',
outputHash: '7abd5a4d6ca7ab32cea0c90ab939d88f',
width: 116,
height: 116,
ninePatch: {
stretchX: [
22,
94,
],
stretchY: [
22,
94,
],
},
},
{
outputFilePath: 'images/player/focus_grid.720p.9.png',
outputHash: '87d182912e384c0e86d62b1ca07d25dd',
width: 78,
height: 78,
ninePatch: {
stretchX: [
15,
63,
],
stretchY: [
15,
63,
],
},
},
{
outputFilePath: 'images/player/focus_grid.480p.9.png',
outputHash: 'ea56f2cc5830904e9a9e9c17899390ac',
width: 52,
height: 52,
ninePatch: {
stretchX: [
10,
42,
],
stretchY: [
10,
42,
],
},
},
],
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="148" height="148" viewBox="0 0 148 148">
<defs><linearGradient id="v" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#474747"/><stop offset="1" stop-color="#959595"/></linearGradient><linearGradient id="h" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-opacity="0.1"/><stop offset="0.5" stop-opacity="0"/><stop offset="1" stop-opacity="0.1"/></linearGradient></defs><rect width="148" height="148" fill="url(#v)"/><rect width="148" height="148" fill="url(#h)"/><rect x="0.5" y="0.5" width="147" height="147" fill="none" stroke="#353535"/>
</svg>

After

Width:  |  Height:  |  Size: 605 B

@@ -0,0 +1,21 @@
{
inputHash: 'f62d717b21b7b84f825b210f6bc718ac',
outputs: [
{
outputFilePath: 'images/player/imageFootprint.9.png',
outputHash: 'fdce5cfb2d7fbe883958801f03bab4dc',
width: 148,
height: 148,
ninePatch: {
stretchX: [
1,
147,
],
stretchY: [
1,
147,
],
},
},
],
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
<circle cx="9" cy="9" r="9" fill="#EFEFEF"/>
</svg>

After

Width:  |  Height:  |  Size: 136 B

@@ -0,0 +1,53 @@
{
inputHash: '5d03669840209dd1094cff25bc61bf4a',
outputs: [
{
outputFilePath: 'images/player/osd_sliderControl_small.1080p.9.png',
outputHash: 'f64105cd2bf745cf76624142c28c41fd',
width: 18,
height: 18,
ninePatch: {
stretchX: [
8,
10,
],
stretchY: [
8,
10,
],
},
},
{
outputFilePath: 'images/player/osd_sliderControl_small.720p.9.png',
outputHash: 'd1900a308c4bb146dac988e8c7f2b86e',
width: 12,
height: 12,
ninePatch: {
stretchX: [
5,
7,
],
stretchY: [
5,
7,
],
},
},
{
outputFilePath: 'images/player/osd_sliderControl_small.480p.9.png',
outputHash: '2aa635bd423cfcf9352f9691c8eb78c2',
width: 8,
height: 8,
ninePatch: {
stretchX: [
3,
5,
],
stretchY: [
3,
5,
],
},
},
],
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
<rect x="4" y="0" width="40" height="1" fill="#000" fill-opacity="0.0627451"/><rect x="0" y="4" width="1" height="40" fill="#000" fill-opacity="0.0627451"/>
</svg>

After

Width:  |  Height:  |  Size: 248 B

@@ -0,0 +1,21 @@
{
inputHash: '3fcf626b9b6e5e251b19fcb02be65eb6',
outputs: [
{
outputFilePath: 'images/player/videoProgressBarHandle.9.png',
outputHash: 'c7151c08865a56fb7f4542b741db279c',
width: 48,
height: 48,
ninePatch: {
stretchX: [
4,
44,
],
stretchY: [
4,
44,
],
},
},
],
}
+12 -4
View File
@@ -1230,11 +1230,11 @@
</message>
<message>
<source>Do not show again</source>
<translation>No volver a mostrar de nuevo</translation>
<translation>No volver a mostrar</translation>
</message>
<message>
<source>Recommended</source>
<translation>Recomendados</translation>
<translation>Recomendado</translation>
</message>
<message>
<source>Courses</source>
@@ -1258,11 +1258,11 @@
</message>
<message>
<source>Select a service to login</source>
<translation>Seleccione un servicio para iniciar sesion</translation>
<translation>Seleccione un servicio para iniciar sesión</translation>
</message>
<message>
<source>Login to YouTube</source>
<translation>Iniciar sesion en YouTube</translation>
<translation>Iniciar sesión en YouTube</translation>
</message>
<message>
<source>Open the link %1 and enter the following code:</source>
@@ -1396,5 +1396,13 @@
<source>Help improve Playlet by enabling diagnostics. This will send anonymous diagnotics data to the developer.</source>
<translation>Ayuda a mejorar Playlet activando las herramientas de diagnóstico. Esto enviará datos de diagnóstico anónimos al desarrollador.</translation>
</message>
<message>
<source>Backend changed</source>
<translation>Backend cambiado</translation>
</message>
<message>
<source>Backend changed to Playlet, because no Invidious instance is set.</source>
<translation type="unfinished">Backend cambiado a Playlet, porque no hay ninguna instancia de Invidious colocada.</translation>
</message>
</context>
</TS>
+1 -1
View File
@@ -3,7 +3,7 @@ title=PlayletLib
# Do not update version manually, it is auto updated from package.json
major_version=0
minor_version=48
build_version=00010
build_version=00011
rsg_version=1.3
@@ -75,7 +75,7 @@ namespace Tests
m.assertEqual(backchannel.closeReason, LoungeCloseReason.Empty)
end function
@it("returns the commands of the whole frames of an answer that ends mid-frame, and reports what is left")
@it("returns the commands of the whole frames of an answer that ends mid-frame, and reports where")
function _()
backchannel = new LoungeBackchannel()
commands = m.PollOnce(backchannel, "/lounge/partial", { status: 200, body: m.Frame(`[[7,["noop"]]]`) + `40\n[[8,` })
@@ -84,7 +84,49 @@ namespace Tests
m.assertEqual(backchannel.closeReason, LoungeCloseReason.Complete)
event = m.global.telemetry.LogEvent
m.assertEqual(event.fingerprint, "lounge-partial-frame")
m.assertTrue(event.message.InStr("7 bytes left") <> -1, event.message)
m.assertTrue(event.message.InStr("at byte 17 of 24") <> -1, event.message)
end function
@it("counts a frame's length in bytes, so a multi-byte character does not shift the next frame")
function _()
backchannel = new LoungeBackchannel()
titleBytes = CreateObject("roByteArray")
titleBytes.FromHexString("636166C3A9")
title = titleBytes.ToAsciiString()
commands = backchannel.StartSession(m.Frame(`[[0,["setTitle","${title}"]]]`) + m.Frame(`[[1,["noop"]]]`))
m.assertEqual(commands.Count(), 2)
m.assertEqual(commands[0].args, title)
m.assertEqual(commands[1].type, "noop")
m.assertEmpty(m.global.telemetry.LogEvent)
end function
@it("reads a length line that ends in CR LF")
function _()
backchannel = new LoungeBackchannel()
commands = backchannel.StartSession(`\r\n14\r\n[[0,["noop"]]]`)
m.assertEqual(commands.Count(), 1)
m.assertEqual(commands[0].type, "noop")
m.assertEmpty(m.global.telemetry.LogEvent)
end function
@it("stops at a frame without a valid length, keeps the frames before it, and reports it")
function _()
for each badFrame in [`0\n`, `x\n[[1,["noop"]]]`, `14 [[1,["noop"]]]`, `99999999999999999999\n[[1,["noop"]]]`]
m.global.telemetry.LogEvent = {}
backchannel = new LoungeBackchannel()
commands = backchannel.StartSession(m.Frame(`[[0,["noop"]]]`) + badFrame + m.Frame(`[[2,["noop"]]]`))
m.assertEqual(commands.Count(), 1, badFrame)
m.assertEqual(commands[0].index, 0, badFrame)
m.assertEqual(m.global.telemetry.LogEvent.fingerprint, "lounge-partial-frame", badFrame)
end for
end function
@it("ends a 2xx answer that is not framed as empty, and reports it")
function _()
backchannel = new LoungeBackchannel()
m.assertEmpty(m.PollOnce(backchannel, "/lounge/unframed", { status: 200, body: "<html></html>" }))
m.assertEqual(backchannel.closeReason, LoungeCloseReason.Empty)
m.assertEqual(m.global.telemetry.LogEvent.fingerprint, "lounge-partial-frame")
end function
@it("skips the commands it already received")
@@ -145,16 +187,14 @@ namespace Tests
backchannel = new LoungeBackchannel()
m.assertEmpty(m.PollOnce(backchannel, "/lounge/unknownsid", { status: 400, body: "Unknown SID" }))
m.assertEqual(backchannel.closeReason, LoungeCloseReason.Http)
m.assertEqual(backchannel.CloseLabel(), "http_400")
m.assertEqual(backchannel.statusCode, 400)
end function
@it("ends a poll the server drops with its curl code")
@it("ends a poll the server drops with the status the OS returns")
function _()
backchannel = new LoungeBackchannel()
m.assertEmpty(m.PollOnce(backchannel, "/lounge/dropped", { drop: true }))
m.assertEqual(backchannel.closeReason, LoungeCloseReason.Curl)
m.assertEqual(backchannel.CloseLabel(), "curl_52")
m.assertEqual(backchannel.closeReason, LoungeCloseReason.Http)
m.assertEqual(backchannel.statusCode, HttpClient.CurlErrors.CURLE_GOT_NOTHING)
end function
@@ -1,41 +0,0 @@
import "pkg:/components/Services/LoungeService/LoungeBytes.bs"
namespace Tests
@suite
class LoungeBytesTests extends Rooibos.BaseTestSuite
@describe("LoungeBytes byte helpers")
@it("converts a byte range to a string, byte-exact across a UTF-8 boundary")
function rangeToString()
' "Xcafé" where é is 2 bytes; extract "café" = bytes [1, end).
cafe = "caf" + m.Utf8(&hC3, &hA9)
bytes = m.Bytes("X" + cafe)
m.assertEqual(LoungeBytes.RangeToString(bytes, 1, bytes.Count()), cafe)
end function
@it("finds the first byte value at or after a position, or -1")
function indexOfByte()
bytes = m.Bytes("a,b,c")
m.assertEqual(LoungeBytes.IndexOfByte(bytes, 0, Asc(",")), 1)
m.assertEqual(LoungeBytes.IndexOfByte(bytes, 2, Asc(",")), 3)
m.assertEqual(LoungeBytes.IndexOfByte(bytes, 0, Asc("z")), -1)
end function
function Bytes(text as string) as object
bytes = CreateObject("roByteArray")
bytes.FromAsciiString(text)
return bytes
end function
function Utf8(b1 as integer, b2 as integer) as string
bytes = CreateObject("roByteArray")
bytes.Push(b1)
bytes.Push(b2)
return bytes.ToAsciiString()
end function
end class
end namespace
@@ -1,105 +0,0 @@
import "pkg:/components/Services/LoungeService/LoungeFraming.bs"
namespace Tests
@suite
class LoungeFramingTests extends Rooibos.BaseTestSuite
@describe("LoungeFraming.Extract")
@it("extracts a single complete frame and reports the consumed position")
function singleFrame()
result = LoungeFraming.Extract(m.Bytes(`5\nhello`), 0)
m.assertEqual(result.frames.Count(), 1)
m.assertEqual(result.frames[0], "hello")
m.assertEqual(result.nextPos, 7)
end function
@it("extracts multiple consecutive frames in one pass")
function multipleFrames()
result = LoungeFraming.Extract(m.Bytes(`5\nhello3\nfoo`), 0)
m.assertEqual(result.frames, ["hello", "foo"])
end function
@it("skips leading CR/LF between frames")
function leadingNewlines()
result = LoungeFraming.Extract(m.Bytes(`\r\n5\nhello`), 0)
m.assertEqual(result.frames, ["hello"])
end function
' The bug that motivated the rewrite: the length prefix is a BYTE count, but the old
' parser sliced with character-based string ops, so any multi-byte payload shifted every
' subsequent frame. A char-based slice of 5 from "café2..." keeps 5 characters ("café2")
' and desyncs; a byte-accurate slice keeps "café" (5 bytes) and frame 2 still lines up.
@it("slices payloads by byte length so multi-byte UTF-8 does not desync the stream")
function utf8ByteAccurate()
cafe = "caf" + m.Utf8(&hC3, &hA9) ' é is 2 bytes -> "café" is 5 bytes, 4 characters
body = m.Bytes(Str(m.ByteLen(cafe)).Trim() + Chr(10) + cafe + Str(m.ByteLen("ok")).Trim() + Chr(10) + "ok")
result = LoungeFraming.Extract(body, 0)
m.assertEqual(result.frames.Count(), 2, "a character-based slice would mis-split frame 2")
m.assertEqual(result.frames[0], cafe)
m.assertEqual(result.frames[1], "ok")
end function
@it("leaves a whole frame unconsumed when its payload has not fully arrived")
function partialPayload()
result = LoungeFraming.Extract(m.Bytes(`5\nhel`), 0)
m.assertEqual(result.frames.Count(), 0)
m.assertEqual(result.nextPos, 0)
end function
@it("consumes complete frames but retains an incomplete trailing frame")
function partialAfterComplete()
result = LoungeFraming.Extract(m.Bytes(`5\nhello2\nh`), 0)
m.assertEqual(result.frames, ["hello"])
m.assertEqual(result.nextPos, 7)
end function
@it("waits when the length line is not yet terminated")
function partialLengthLine()
result = LoungeFraming.Extract(m.Bytes("12"), 0)
m.assertEqual(result.frames.Count(), 0)
m.assertEqual(result.nextPos, 0)
end function
@it("resumes extraction from a caller-supplied position")
function resumeFromPosition()
' Index 7 is the start of the second frame ("3\nfoo").
result = LoungeFraming.Extract(m.Bytes(`5\nhello3\nfoo`), 7)
m.assertEqual(result.frames, ["foo"])
end function
@it("skips a non-positive length line instead of stalling")
function malformedLength()
result = LoungeFraming.Extract(m.Bytes(`0\n5\nhello`), 0)
m.assertEqual(result.frames, ["hello"])
end function
@it("returns no frames for an empty body")
function emptyBody()
result = LoungeFraming.Extract(m.Bytes(""), 0)
m.assertEqual(result.frames.Count(), 0)
m.assertEqual(result.nextPos, 0)
end function
function Bytes(text as string) as object
bytes = CreateObject("roByteArray")
bytes.FromAsciiString(text)
return bytes
end function
function ByteLen(text as string) as integer
return m.Bytes(text).Count()
end function
function Utf8(b1 as integer, b2 as integer) as string
bytes = CreateObject("roByteArray")
bytes.Push(b1)
bytes.Push(b2)
return bytes.ToAsciiString()
end function
end class
end namespace
@@ -14,7 +14,7 @@ namespace Tests
@it("retries a failed poll")
function _()
m.assertEqual(m.Step(LoungeCloseReason.Curl, -7, 0, false, false, 1000), LoungeSessionStep.Retry)
m.assertEqual(m.Step(LoungeCloseReason.Http, -7, 0, false, false, 1000), LoungeSessionStep.Retry)
m.assertEqual(m.Step(LoungeCloseReason.Timeout, 0, 0, false, false, 40000), LoungeSessionStep.Retry)
m.assertEqual(m.Step(LoungeCloseReason.Http, 503, 0, false, false, 1000), LoungeSessionStep.Retry)
m.assertEqual(m.Step(LoungeCloseReason.Empty, 200, 0, false, false, 1000), LoungeSessionStep.Retry)
@@ -42,11 +42,11 @@ namespace Tests
@it("drops a session that delivered no poll for the give-up time, whatever the failure")
function _()
m.assertEqual(m.Step(LoungeCloseReason.Curl, -7, 0, false, false, LoungeSession.GIVE_UP_MS), LoungeSessionStep.Drop)
m.assertEqual(m.Step(LoungeCloseReason.Http, -7, 0, false, false, LoungeSession.GIVE_UP_MS), LoungeSessionStep.Drop)
m.assertEqual(m.Step(LoungeCloseReason.Http, 400, 0, false, false, LoungeSession.GIVE_UP_MS), LoungeSessionStep.Drop)
m.assertEqual(m.Step(LoungeCloseReason.Http, 401, 0, false, false, LoungeSession.GIVE_UP_MS), LoungeSessionStep.Drop)
m.assertEqual(m.Step(LoungeCloseReason.Stalled, 200, 3, false, false, LoungeSession.GIVE_UP_MS), LoungeSessionStep.Drop)
m.assertEqual(m.Step(LoungeCloseReason.Curl, -7, 0, false, false, LoungeSession.GIVE_UP_MS - 1), LoungeSessionStep.Retry)
m.assertEqual(m.Step(LoungeCloseReason.Http, -7, 0, false, false, LoungeSession.GIVE_UP_MS - 1), LoungeSessionStep.Retry)
end function
@it("never drops a session whose poll just delivered")
Loaded 100 of 109 files, more files were not shown because too many files have changed in this diff. Show more