- Quality button opens a modal picker over the video: Auto at the top plus
every rung from the HLS master's variant list (parsed in the router;
Piped videoStreams is unreliable), virtual-focus list like the rest of
the dev player's chrome, OK applies / Back cancels, panel auto-sizes.
- Applying a quality rebuilds the /api/hls URL with the quality filter and
restarts at the saved position (stop->stopped-edge->play), persists to
playback.preferred_quality, keeps the retry URL list consistent.
- Captions button toggles globalCaptionMode On/Off (+ first-track fallback
when the OS language match finds nothing); N/A when the video has none.
- Status line above the button row: 'Quality: Auto (1080p) | Captions: On'
tracks streamingSegment while auto ramps.
- Fix: QualityLevelsFromPiped sort crashed the /streams converter (string
vs AA compare); replaced by QualityLevelsFromHlsMaster.
- Seam tests for picker open/navigate/apply/cancel/clamp + captions toggle;
ButtonRow specs updated for the 4-button row. Lib tag PIPED-LIB-26.
- PipedBackendRouter serves Invidious-shaped /api/v1 JSON on the local
web server at /playlet-piped-backend, translating from a real Piped
instance (trending/search/suggestions/videos/comments/channels/
playlists/stats; auth endpoints return unsupported for now).
- PipedToInvidious converters incl. HLS-first playback metadata
(Piped's hls master via proxy.piped instance; muxed mp4 fallback)
and previewFrames -> Playlet storyboard shape.
- preferences: backend.selected gains 'piped'; new piped.instance
(default https://api.piped.spaghet.io).
- InvidiousService.GetInstance routes backend=piped to the local
translation router; ResolveBackendId returns 'piped'.
* when invidious returns 403 on authenticated request, inspect error before determining if it's fatal for the user token
* simplifying with ibicha's !945 edits - no more followup request to subs endpoint to verify token, just pass if 403 fails for some unk reason
YouTube has been rolling out AI-generated dubbed audio tracks on videos.
Roku's player automatically selects the dubbed track matching the device
language, overriding the original audio — and the app provides no way to
switch back. The only workaround is a cumbersome device-level setting.
This adds a "Disable auto-dubbed audio" boolean preference under
Playback settings. When enabled, auto-dubbed audio groups (identified
by the existing isAutoDubbed flag from xtags parsing) are excluded from
the locally-generated DASH manifest, so only the original audio track
is available for playback.
A softer approach — keeping dubbed tracks available but defaulting to
the original — was also investigated. Both DASH `selectionPriority`
attributes and AdaptationSet reordering were tested on a Hisense 65R6107
Roku TV, but Roku's player ignores both and always selects the track
matching the device language. Removing the tracks from the manifest is
the only reliable approach.
Tested on a Hisense 65R6107 (Roku OS). With the preference enabled,
auto-dubbed tracks are no longer listed and the original audio plays
by default. With the preference disabled (default), behavior is
unchanged.
Scope: DASH (local) path only. HLS and DRM DASH paths are not yet
covered and will be addressed in follow-up work.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Parse post live dvr info
* add otf info
* dash rework
* Bug in detecting live videos in HLS streams
* small refactor
* otf support (maybe)
* remove indexRangeExact
* tweak
* Enable OTF, and hope for the best
* Fix OTF and post live dvr
* logs
* tweaks and error handling
* change profile
* dash tweaks
* hls tweak
* Drm support
* A few tweaks to http connection
* changelog
* changelog
* add requires_widevine_drm to app manifest
* movie renderer nodes
* Small fix in header parsing
* Fix windows path issues
* Few script changes to support windows
* Update build scripts
* remove duplicate call
* changelog
* Fix for telnet test runner
* Consistent node parser warnings
* telemetry release
* remove friendly name from tags
* revert log level calls, use noTelemetry
* Ignore nodes
* Event fingerprinting
* ignore known error
* NodesParser fingerprinting
* user id
* Fix missing title when fetching video
* changelog
* tweak
* no telemetry in longpoller
* rate limit
* Attachment support
* Playlet decipher server
* cache sts
* wip
* PoToken per video
* remove unused param
* potoken mandatory for videos
* separate potoken option
* logging
* rename
* /player with auth
* Refactor rename
* Fix rename
* parse isloggedin tweak
* TODO
* get rid of hardcoded formats
* Remove hardcoded formats in web app
* refactor
* no cache for sts request
* [skip ci] todo
* [skip ci] update PRVACY
* No visitor data if we're using a profile
* Cancellation
* remove visitor data header for authed /player
* iOS fallback for live videos
* changelog
* revert using dashUrl
* refactor
* Add Job System
* Remove testing stuff
* changelog
* plugin work
* Convert a couple more jobs
* simplify callback
* assert
* Logging changes and rendezvous perf
* changelog
* sb segment viewed job
* clear cache, and few changes
* Lint fix
* a couple more jobs
* reduce rendezvous in web server
* refactor
* Lint fix
* no message
* test shutdown
* comment
* free fields
---------
Co-authored-by: github-action linter <githubaction@githubaction.com>
* [Spike] ytjs and boguard in web app
* storyboards and captions
* cache potoken
* captions fix
* Increase session data to 7 days
* changelog
* Fix missing timestamp issue
* Watch history has video info
* Lint fix
* Fix upcoming in watch history
---------
Co-authored-by: github-action linter <githubaction@githubaction.com>
* Search continuations
* add another type of playlists
* Continuation for search and channels working
* Playlist continuation
* Fix pagination - what a fucking mess I've created
* web app fix
* Changelog
* Parse author in videoRenderer
* Parse more fields
* Parse live badge
* playlist video count
* Parse more things
* parse playlists and albums
* More parsing work
* announcement and changelog
* Lint fix
---------
Co-authored-by: github-action linter <githubaction@githubaction.com>
* locale for web app
* more translations
* Rename profiles service to avoid locale conflict
* More translation work
* Lint fix
---------
Co-authored-by: github-action linter <githubaction@githubaction.com>
* OK button as Play/Pause
First OK press now shows Video UI.
It's achievable via hidden Roku Video node property `showUI`, which allows you to override how trickplay should be displayed by specifying parts of the UI to be rendered (like 'titleAndTime', 'trickplayBar', e.t.c). A timer is started every time custom UI is shown to prevent UI from staying forever.
Second OK press while UI is visible pauses the video (pause poster animation is not added yet).
However, since we shouldn't break default OK button actions, we must track whether user is seeking in video UI and if they do, fallback to Video internal OK handler.
Also, auto-formatted VideoPlayer.xml
* fix comment typo
* move HideUI function slightly higher
* Addressed the feedback:
* Add a workaround to leave Live video behavior intact (no pause, ok simply switches UI back and forth)
* Hide UI when minimizing to avoid a bug where title and time element could stay forver
* More aggressive `isSeeking` detection, so every left/right/ff/rw button press would cause us to fall back to default OK button handler
* More accurate liveNow handling
* Changelog
---------
Co-authored-by: Brahim Hadriche <brahim.hadriche@gmail.com>
Playlet, the Roku app, does not collect any user information whatsoever.
In fact, it does not have any servers capable of collecting any form of data.
Playlet, the Roku app, does not collect any user personal information whatsoever.
Playlet does not show advertising, whether personalized or non personalized.
Playlet may integrate with 3rd party telemetry services in order to capture anonymous diagnostics data. The only purpose of this data is to diagnose issues and improve the app.
### Current telemetry implementation
> This section tries to explain in more detail what data is collected and how it is used. Due to the granularity and details of the following explanation, it might be slightly out of date, but mostly represents the reality of the "Playlet may integrate with 3rd party telemetry services"
Currently, Playlet captures a bunch of errors through the [telemetry client code](https://github.com/iBicha/playlet/tree/f3c159218ac8e3eec08eb7b62cbd45ad6c451b99/playlet-lib/src/components/Telemetry).
It's mostly OS info (version, device model, etc), app info, user country code, locale, error messages, and stack traces. Nothing more than necessary is captured to debug problems.
In addition to that, an anonymous user id (just a guid stable across app launches of Playlet) and a session id (generated on every launch) are collected.
The user id is used to understand how many people an error affects. Sometimes one issue is spread out evenly among users, sometimes it's a handful of users (or even just one) spamming the same errors. This helps investigate that aspect.
The session id is used to understand how an error happened. By isolating a specific error to a session, it helps understand what led to said error.
This data is currently sent to a server, then forwarded to a self-hosted instance [Glitch-Tip](https://gitlab.com/glitchtip/glitchtip) which provides a simple dashboard showing how frequent errors are, and on which versions they occur.
This data is anonymous. The data is not collected in a way that can be linked back to a real person, or a YouTube profile for example.
The data is stored on a local hard drive, does not leave said hard drive, and accessed only by the currently single developer of Playlet, and frequently purged (because honestly I don't have the disk space).
The data is used to investigate errors, like playback errors, feed load errors, login errors, and so on.
## Invidious
Playlet may request information from one or more [Invidious](https://invidious.io/)
@@ -16,14 +37,27 @@ is sent, which is used to enable the viewing of content.
Please note that some of the [Invidious](https://invidious.io/) servers used
could be public instances hosted by volenteers. These instances are available
[here](https://api.invidious.io/).
at [api.invidious.io](https://api.invidious.io/).
While invidious does no data collection by default, and it is in fact built to
be privacy driven, but in theory, from a playlet request it is possible to
be privacy driven, but in theory, from a Playlet request it is possible to
know the IP address of a user, the identifiers of watched video, and search
keywords. In case the user has privacy concerns, they can host their own
Invidious instance and use it from Playlet.
## Innertube
When the Playlet built-in backend is in use, instead of an Invidious instance,
Playlet makes requests directly to Innertube instead of Invidious.
Similar to Invidious requests, only the bare minimum and necessary information
is sent, which is used to enable the viewing of content.
Additionally, when a YouTube account is used in Playlet, Innertube traffic can
become associated with the account, which further reduces user privacy. This
is necessary to use features associated with YouTube accounts, such as
subscriptions, playlists, and watch history.
## SponsorBlock
Playlet may request information from a [SponsorBlock](https://github.com/ajayyy/SponsorBlock)
@@ -39,7 +73,7 @@ user privacy.
Additionally, Playlet may send a "skipped" event to SponsorBlock, to indicate
that a section of a video has been skipped. This event does not have any
tracking information attached to it, and it is anonymous. It is merely to
indicate to contributers how much their contributions are being used in the wild.
indicate to contributors how much their contributions are being used in the wild.
## LeanBack
@@ -47,6 +81,6 @@ LeanBack, also known as Lounge API, also known as "cast from phone". Is a featur
When this feature is used, all traffic related to the videos being watched, added to the queue, and the video player state is routed through YouTube servers.
Playlet tries to preserve user privacy, to the best of its ability, by implementing several techniques, such as randomizing device id, using a fresh session on each start, and only providing necessary fields for the feature to function.
Additionally, Playlet does not join a session/lounge, until a device is attempting to connect using DIAL (**DI**scovery **A**nd **L**aunch spec), or when a `Link with TV code` is generated, by visiting the appropriate settings page.
Additionally, Playlet does not join a session/lounge, until a device is attempting to connect using DIAL (**DI**scovery **A**nd **L**aunch spec) also known as "Connect with Wi-Fi", or when a `Link with TV code` is generated, by visiting the appropriate settings page.
If you have privacy concerns and do not wish to use this functionality, simply do not connect from a local network using the YouTube app or the browser, and do not visit the `Link with TV code` tab.
@@ -34,17 +43,21 @@ More under [Screenshots](./docs/screenshots/README.md)
## Installation
[Playlet on Roku channel store](https://channelstore.roku.com/en-ca/details/840aec36f51bfe6d96cf6db9055a372a/playlet)
[Playlet on Roku channel store](https://channelstore.roku.com/details/4a41d0921265a5e31429a7679442153f:b5bcb5b630c28b01e93bf59856317b43/playlet) or search "Playlet" in the Roku channel store on your device.
Can't install from the store? See [How to install Playlet as a sideloaded/dev app](https://github.com/iBicha/playlet/discussions/371)
## Features
- 🔥 No Ads (Not now, not ever)
- 🕵️ No Tracking
- 🛡️ Privacy driven (uses Invidious backend)
-⚔️ SponsorBlock integration (skips undesirable sections in videos)
-🙋 User accounts (supports YouTube and Invidious accounts)
- ⚔️ [SponsorBlock](https://sponsor.ajay.app/) integration (skips undesirable sections in videos)
- 📱 Browse, search, and cast from phone using the YouTube app or the browser
- 🔮 Picture-in-picture mode
- ⚡ Fast! [Check out how we compare with the official YouTube app](https://youtu.be/qmSvA-QQW20)
- 🔤 Translated using [Weblate](https://hosted.weblate.org/projects/playlet/playlet/)
### Cast from phone
@@ -53,33 +66,16 @@ More under [Screenshots](./docs/screenshots/README.md)
- Use the YouTube app to connect using the same Wi-Fi; OR
- Use the `Link with TV code` to connect
### Picture-in-picture
- When viewing a video in full screen, press ⬇️ (down) button on your remote to shrink the video
- You can browse or search for videos while you watch
- To restore currently playing video to full screen, press the ✳️ (options) button
### Customize Invidious instance
1. Open settings in Playlet
1. Select Invidious -> Instance
1. Set a custom instance, or choose a public one hosted by volunteers (from [api.invidious.io](https://api.invidious.io/))
1. Optionally, Select `Test instance` to make sure it works
1. Hit save
> ℹ️ **Note**: If you are logged in when you change the instance, you will remain logged in to the old instance. In this case, Playlet will use the old instance to retrieve your subscriptions and your playlists, but will use the new instance for everything else. After switching to a new instance, you can log out and log in again to use your profile on the new instance.
## Development
For everything related to Playlet app development, please see the [documentation](./docs/README.md)
## Analytics and reporting
## Analytics and telemetry
We do not collect any usage data, anonymous or not. But Roku does, and you can find the data made available to Playlet in the [Wiki](https://github.com/iBicha/playlet/wiki).
Most software in the wild collect some data to make sure things work, and to prioritize features.
Because we don't do that, we wouldn't know if people using Playlet are facing issues, unless these issues get reported.
Playlet could run on variaty of devices, with different capabilities and screen sizes, and different Invidiousinstances.
That's why it's important to report any issues you encouter using Playlet, otherwise it's unlikely that they get addressed.
Roku collects usage data, and you can find the data made available to Playlet in the [Wiki](https://github.com/iBicha/playlet/wiki).
Playlet could run on variaty of devices, with different capabilities and screen sizes, and different Invidious instances, in addition to the experimentation YouTube does based on account and/or ip.
This is why it was necessary to collect telemetry/diagnostics data, in order to capture issues and fix them. However, you can disable this feature in the settings.
But it's not enough, it's important to report any issues you encouter using Playlet, so they can be addressed.
@@ -144,7 +145,7 @@ There are a few reasons we made this separation:
- Playlet relies on [Invidious](https://github.com/iv-org/invidious). Invidious tries to keep up with YouTube making changes to their platform, but sometimes, a breaking change happens that requires Playlet to react quickly. Releasing through the Roku Channel store can take days, or a week. During this time, Playlet would be not functional, and that's not acceptable.
- The ability to roll back: Sometimes an app breaking bug gets released. Allowing users to choose a seperate version is a flexible way to keep things working. For example, it's possible to choose a different verrsion from the developer settings in the web app.
- It is simply easier to release: Releasing Playlet Lib on Github, and everyone receives the latest version immediately, is very conveninct and less of a hassle, than going through the Roku Channel store.
- It is simply easier to release: Releasing Playlet Lib on Github, and everyone receives the latest version immediately, is very convenient and less of a hassle, than going through the Roku Channel store.
- I've had instances where I was trying to pass the certfication for Playlet to publish it. One of the criterias is to pass a some automated tests. But the tests were failing because their system could not connect to their Roku test devices (connection keeps timing out). My only option was to keep trying over and over until it worked.
- It might sound that Playlet Lib is just a workaround for the Roku Channel release process. But phrased differently, Roku Channel release process is not good enough of what we need for Playlet.
- Canary builds: The latest version of Playlet can be tested as soon as it lands in the main branch. This is a great way to test newer features in production, without affecting the stability of the released version. Roku has the concept of "beta" channels, but they are more cumbersome.
@@ -165,8 +166,6 @@ Playlet lib comes equipped with a web server that runs on port 8888 when the app
The web server runs on a continuously running [Task](https://developer.roku.com/en-ca/docs/references/scenegraph/control-nodes/task.md) and uses a middeware system to manage routes, serve static files, [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS), and more.
The server's API enpoints are described through the Open API spec file [playlet-web-api.yml](./playlet-web-api.yml)
Please note: while we would like to keep the API stable as much as possible, Playlet can't reasonbly maintain multiple versions of the API like traditional web apis, because it adds complexity and maintainablity burden on an app the runs in constrained environment. In short, we'll try not to break the API, but we might from time to time.
#### Debug endpoints
@@ -181,7 +180,8 @@ These are useful to see if the files and caching are working as expected.
### Releases from Github
Since Component Libraries are simply zip files hosted at some https endpoint, Github releases are used to host and deliver Playet Lib to users. By default, Playlet grabs `https://github.com/iBicha/playlet/releases/latest/download/playlet-lib.zip` and loads it, but this can be pointed to somewhere else, if for some reason the Github repository becomes unavailable.
Since Component Libraries are simply zip/squashfs files hosted at some HTTPS endpoint, Github releases are used to host and deliver Playet Lib to users. By default, Playlet grabs `https://github.com/iBicha/playlet/releases/latest/download/playlet-lib.squashfs.pkg` and loads it, but this can be pointed to somewhere else, if for some reason the Github repository becomes unavailable.
Squashfs files are faster to load, but they require signing. Zip files can be used without signing if they are served from an HTTPS endpoint.
### Dev library hosted by VS Code Extension
@@ -272,7 +272,11 @@ For debugging, choose the compound target `Playlet Web (Debug)`.
The Playlet web app uses [Tailwind CSS](https://tailwindcss.com/) as its base styling library. Additionally, it uses [DaisyUI](https://daisyui.com/) as it offers a versatile set of components, and has built-in supports for themes.
### API calls (proxy authenticated)
### API calls
The Playlet web app communicates with the Playlet Roku app using web APIs. The web app also uses Invidious apis documented at [https://docs.invidious.io/api](https://docs.invidious.io/api)
#### API calls (proxy authenticated)
When making authenticated calls to Invidious (for example to fetch the user Subscription feed) the Bearer token is needed.
@@ -286,22 +290,28 @@ For API calls that don't require authentication, the web app fetches data from I
### Developer settings
The developer settings are only visible through the web app. They are found at the buttom of the settings page.
The developer settings are found at the buttom of the settings page.
For now, it allows you to point to a different Github release other than the default `latest`.
One setting that is only available in the web app is `Playlet Library version`. It allows you to point to a different Github release other than the default `latest`.
This is mostly useful to QA the `canary` release (see [Canary release](https://en.wikipedia.org/wiki/Feature_toggle#Canary_release)) in a "production" setting before making it available to all users as the official "latest" version.
#### In case of a softlock
If the dev menu is used to load a custom Playlet lib url, but the lib does not have a functionality to revert back:
If the dev menu is used to load a custom Playlet lib url, but you couldn't revert back:
description:The ID of the content to play. If specified with mediaType=video, this is the videoId.
required:false
schema:
type:string
ecpMediaType:
name:mediaType
in:query
description:The type of the content of ContentId. To be used with the contentId argument.
required:false
schema:
type:string
enum:
- video
ecpVideoId:
name:videoId
in:query
description:The video ID of the video to play. If specified, the video will be played.
required:false
schema:
type:string
ecpTimestamp:
name:timestamp
in:query
description:The timestamp of the video to play. To be used with the contentId argument.
required:false
schema:
type:integer
ecpTitle:
name:title
in:query
description:The title of the video. This is optionally added so we can display the title while loading, or when displaying the "Added to queue" notification.
required:false
schema:
type:string
ecpAuthor:
name:author
in:query
description:The author of the video. This is optionally added so we can display the author while loading, or when displaying the "Added to queue" notification.
required:false
schema:
type:string
ecpClearPlayletLibUrls:
name:clearPlayletLibUrls
in:query
description:If specified, the Playlet lib URLs will be cleared.
Playlet implements a few [Brighterscript Plugins](https://github.com/rokucommunity/brighterscript/blob/master/docs/plugins.md). The plugins inject themselves in the compilation process, allowing the modification of bs scripts, xml components, and even assets or the app manifest. Let's start with a simple one:
@@ -31,21 +30,6 @@ Brightscript can only parse json natively using [ParseJson](https://developer.ro
At the end of the build, the plugin scans for certain files (`jsonc`, `json`, `json5` and `yaml`), and converts them to plain json, while keeping the original file name. That way they are all parsable by the [ParseJson](https://developer.roku.com/en-ca/docs/references/brightscript/language/global-utility-functions.md#parsejsonjsonstring-as-string-flags---as-string-as-object) function, even though their original format is not compatible.
This plugin allows us to convert svg files to png files.
### Why
This is used to convert splash screen, app poster, as well as icons in the app. Having svg images (or vector images in general) as the source of truth is better, in case images need to be modified or resized. Since Roku can't load them, we convert them to png.
### How
Each `.svg` file found will have an associated `.svg.meta.json5` file, which will contain the hash (MD5) of the svg, conversion paramters, and the hash of the output files. This allows us to hash existing files and see if a conversion is needed.
Notice how each `.svg` file can be configured to generate multiple png files. This is especially the case to generate the app artwork (splash screen/poster) with different sizes from the same logo `.svg` file.
@@ -410,7 +394,7 @@ Notice how the function has `@oninit`, which means it will be called in the `Ini
When the `bindings` field is set, the node registers itself to a global array of nodes that need binding.
Next, once all nodes are registered, we need to call a function called `AutoBindSceneGraph()`. This need to be called once from the root node's `Init()` (concretely, [here](https://github.com/iBicha/playlet/blob/bea7fb209b2bd42aff620d06b416cf1e45988190/playlet-lib/src/components/MainScene.bs#L17))
Next, once all nodes are registered, we need to call a function called `AutoBindSceneGraph()`. This need to be called once from the root node's `Init()` (concretely, [here in MainScene.bs](https://github.com/iBicha/playlet/blob/bea7fb209b2bd42aff620d06b416cf1e45988190/playlet-lib/src/components/MainScene.bs#L17))
`AutoBindSceneGraph()` will loop through all the nodes that require binding, and use the information we assigned to `m.top.bindings` of each node to populate all the needed references.
@@ -435,76 +419,54 @@ myNode@.BindNode()
calling `BindNode` will trigger all the binding steps just for this node. But it is expected that all its dependencies are already in the scene and can be found.
This plugin generates `Task` components a scripts that makes it simpler to call a function in a background thread, and get the result in a callback function.
The Job System simplifies the creation of background jobs without the risk of creating too many threads.
It manages a number of Tasks which are capable of executing jobs from a queue.
### Why
To implement functionality that runs in background threads, [Task](https://developer.roku.com/en-ca/docs/references/scenegraph/control-nodes/task.md)s must be used.
To implement functionality that runs in background threads, [Tasks](https://developer.roku.com/en-ca/docs/references/scenegraph/control-nodes/task.md) must be used.
Setting up a task involves lots of boilerplate: setting up the task in an xml file, defining inputs and outputs, code to listen for a task to finish, and so on.
Additionally, there's no standard way to do error handling, cancellation, and so on.
Additionally, there's no standard way to do error handling and cancellation.
Another concern is managing too many threads across the application, and managing rendezvous(s).
### How
Use a function with the attribute `@asynctask`.
In a separate file, define the task function:
Define a function in its own file called `ExecuteJob` annotated with `@job("JobName")`:
```brighterscript
@asynctask
function MyBackgroundTask(input as object) as object
myVar = input.myVar
@job("MyJob")
function ExecuteJob() as void
' input is an associative array set when the job is queued.
input = JobGetInput()
value = DoWork(myVar)
value = DoWork(input.myVar)
return {
value: value
}
' optional
JobSuccessData({result: value})
end function
```
And use the function like so
by doing this, the generator will generate a component named "MyJob" and will inherit from "BaseJob".
The job can now queued for execution:
```brighterscript
import "pkg:/source/AsyncTask/Tasks.bs"
import "pkg:/source/AsyncTask/AsyncTask.bs"
AsyncTask.Start(Tasks.MyBackgroundTask, {myVar: "some input"}, function(output as object) as void
The rest will be taken care of by the plugin, which will generate an `xml` file containing the task component, and a script that handles calling the function.
And the job system will take care of queueing, scheduling, and scaling up the available tasks in order to execute jobs.
The job system creates job nodes inside task threads, which reduces the amount of rendezvous necessary. Some rendezvous are still necessary, such as when a task node is signaling that it is ready to take on a new job, or when the job is returning results to render thread.
The job system will auto scale up to a maximum number of tasks, in order to avoid `Too many threads` errors. Once the job system activity settles down, the job system will release task nodes that has been idle for a certain amount of time.
Although very useful, this pattern might not be the best for long running tasks (like the Web Server) or other tasks that require task reuse. This is because `AsyncTask.Start` create a new instance of the task every time.
By now, you realize we make a lot of transformations to the source code through many plugins. As a sanity check, this plugin allows us to keep track of the transpiled files, so we can be sure that the output is what we expect.
### Why
This is useful to catch errors with the plugin usage, of bugs with the plugins themselves.
### How
When transpiling a file, say `MyComponent.xml`, the plugin will see if there is a `MyComponent.transpiled.xml` right next to it in the source.
If a file is found, then the transpiled file of `MyComponent.xml` will be copied back from the staging folder to `MyComponent.transpiled.xml`.
Additionally, if there's a folder `MyFolder` and `MyFolder.transpiled` in the source, then all transpiled files of `MyFolder` will also be copied back to `MyFolder.transpiled`. Keeping track of entire folders is primarily to track of transpiled files of test nodes and scripts.
To reduce the noise of this plugin, it only runs when we're making a test build.
Because we continiously make test build in Github actions, the tracked transpilied files will be automatically added to PRs, so that we notice if outputs do not look right.
Although very useful, this pattern might not be the best for long running tasks (like the Web Server) and it is simpler to create dedicated tasks for those.
## Logger
@@ -543,36 +505,6 @@ To understand more about what's being generated, download `playlet-lib.zip` from
To give credit where credit is due, some of the ideas here (like adding the source location to the log) came from [roku-log](https://github.com/georgejecook/roku-log)
I found myself implementing type checking functions like `IsBool`, `IsInt`, and `IsString`, and functions for getting a valid type, like `ValidBool`, `ValidInt`, and `ValidString`. The implementation is the same, why not generate them?
### How
Simply we declare them in an object describing the type, the interface, and the default value, and generate all corresponding functions.
Sample output:
```brs
' Returns true if the given object is of type Bool, false otherwise
function IsBool(obj as dynamic) as boolean
return obj <> invalid and GetInterface(obj, "ifBoolean") <> invalid
end function
' Returns the given object if it is of type Bool, otherwise returns the default value `false`
function ValidBool(obj as dynamic) as boolean
if obj <> invalid and GetInterface(obj, "ifBoolean") <> invalid
Roku's built-in localization system has some undesired side effects: for example, it might translate node ids, which would break the relationship between the nodes.
This plugin enforces some rules to ensure translation files are kept up to date with code implementation.
See the next section for the validation rules.
### How
The plugin checks for the following:
- Translated words and sentenses are defined in an enum annotated with `@locale`
- All the values in the `@locale` enums must be provided in the English (`en_US`) translation. This is because `en_US` is the fallback translation when the current localte translations are not complete.
- `en_US` must have matching source and translation values, so it can act as a fallback translation.
- All `source` translations from all languages must be present in the `@locale` enums. This is to prevent renaming the values in the code without updating translation files.
- Translation `source` keys can't be used except for certain fields such as `"text"` and `"title"`. This is to prevent the accidental localization of non-display fields, such as node ids.
To generate BrighterScript encoding/decoding functions for Protobuf types.
These are needed for some functionality (e.g. Search filters in Innertube backend)
### How
The plugin scans for `.proto` files, and parse them into plain objects using [protocol-buffers-schema](https://www.npmjs.com/package/protocol-buffers-schema)
Then the right functions that get generated to serialize/deserialize types.
Please note this generator is VERY bare bone: only features necessary for Playlet were implemented.
thrownewError(`FATAL: unrecovered video error (episodes=${errorEpisodes}) — the player's one retry did not recover (e.g. 403 with no working stream URL). Aborting the suite.`);
console.log('\nFAILED: #VideoPlayer is not a VideoPlayerDev. Build the lib with `#const USE_DEV_PLAYER = true` (VideoQueue.bs) before running the player suite.');
awaitecp.sendKeypress(Key.Home);
process.exit(1);
}
console.log(' player node subtype: VideoPlayerDev ✓');
}
// Hard-fail unless the device's EFFECTIVE SponsorBlock config matches the sbskip fixture: enabled +
// notifications + outro=manual_skip (the shipped defaults from config/preferences.json5; user_prefs overrides
// them). With SponsorBlock off the sbskip spec would exercise a plain OK/Right from idle and pass vacuously.
"description":"Unofficial YouTube client for Roku",
"devDependencies":{
"@rokucommunity/bslint":"^0.8.17",
"@rokucommunity/bslint":"^0.8.46",
"@types/crypto-js":"^4.2.2",
"@types/fs-extra":"^11.0.4",
"@types/node":"^20.11.19",
"@types/node":"^26.6.5",
"@types/xml2js":"^0.4.14",
"argparse":"^2.0.1",
"brighterscript":"0.65.22",
"brighterscript-formatter":"^1.6.40",
"convert-svg-to-png":"^0.6.4",
"cross-fetch":"^4.0.0",
"argparse":"^3.0.3",
"brighterscript":"0.73.7",
"brighterscript-formatter":"^1.8.4",
"convert-svg-to-png":"^0.7.1",
"crypto-js":"^4.2.0",
"dotenv":"^16.4.4",
"express":"^4.18.2",
"fs-extra":"^11.2.0",
"glob":"^10.3.10",
"dotenv":"^18.0.8",
"fs-extra":"^11.4.1",
"glob":"^13.0.6",
"imap":"^0.8.19",
"ip":"^1.1.8",
"ip":"^2.0.1",
"json5":"^2.2.3",
"mailparser":"^3.6.7",
"roku-deploy":"^3.11.2",
"rooibos-roku":"5.10.0",
"semver":"^7.6.0",
"shelljs":"^0.8.5",
"mailparser":"^3.9.39",
"protocol-buffers-schema":"^3.6.1",
"roku-deploy":"^3.18.4",
"roku-test-automation":"^2.2.2",
"rooibos-roku":"5.17.0",
"semver":"^7.8.5",
"shelljs":"^0.10.0",
"telnet-client":"^2.2.14",
"ts-node":"^10.9.2",
"typescript":"^5.3.3",
"typescript":"6.0.3",
"xml2js":"^0.6.2",
"yaml":"^2.3.4"
"yaml":"^2.9.1",
"youtubei.js":"^18.1.0"
},
"engines":{
"node":"18"
"node":"22"
},
"scripts":{
"dev:web":"cd playlet-web && npm run dev",
"prebuild":"rm -rf dist",
"build:dev":"npm run build:web && npm run build:lib:dev && npm run build:app:dev",
"build:prod":"npm run build:web && npm run build:lib:prod && npm run build:app:prod",
"build:release":"npm run build:release:ci && npm run sign-package",
"build:release:ci":"npm run format:fix && npm run lint:fix && npm run version-sync && npm run manifest-git-hash && npm run build:prod",
"prebuild":"node tools/rm.js dist",
"build:dev":"npm run prebuild && npm run build:web && npm run build:lib:dev && npm run build:app:dev",
"build:dev:v2":"PLAYLET_DEVTOOLS=1 npm run build:dev",
"build:prod":"npm run prebuild && npm run build:web && npm run build:lib:prod && npm run build:app:prod",
"build:release":"npm run prebuild && npm run format:fix && npm run lint:fix && npm run version-sync && npm run manifest-git-hash && npm run build:prod",
"build:app:dev":"cd playlet-app && npm run build:dev",
"build:app:prod":"cd playlet-app && npm run build:prod",
"build:lib:dev":"cd playlet-lib && npm run build:dev",
"build:lib:prod":"cd playlet-lib && npm run build:prod",
"build:web":"cd playlet-web && npm run build",
"lint":"cd playlet-lib && npm run lint && cd ../playlet-app && npm run lint",
"lint:fix":"cd playlet-lib && npm run lint:fix && cd ../playlet-app && npm run lint:fix",
"build:playground":"cd playground && npm run build",
"lint":"cd playlet-lib && npm run lint && cd ../playlet-app && npm run lint && cd ../playlet-web && npm run lint",
"lint:fix":"cd playlet-lib && npm run lint:fix && cd ../playlet-app && npm run lint:fix && cd ../playlet-web && npm run lint",
"format":"cd playlet-lib && npm run format && cd ../playlet-app && npm run format",
"format:fix":"cd playlet-lib && npm run format:fix && cd ../playlet-app && npm run format:fix",
"test":"npm run test:lib && npm run test:app",
"test:v2":"npm run test:v2:lib && npm run test:v2:app",
"test:v2:lib":"cd playlet-lib && npm run test:v2",
"test:v2:app":"cd playlet-app && npm run test:v2",
"test:build":"npm run test:build:lib && npm run test:build:app",
"test:app":"cd playlet-app && npm run test",
"test:build:app":"cd playlet-app && npm run test:build",
"test:lib":"cd playlet-lib && npm run test",
"test:build:lib":"cd playlet-lib && npm run test:build",
d="m 180.21484,360.71785 h 3.43467 v -11.34934 h 6.34667 v 11.34934 h 6.64534 v 5.22667 h -6.64534 v 20.23468 q 0,2.61333 1.64267,4.256 1.64267,1.568 4.256,1.568 v 5.6 q -6.048,0 -9.184,-2.912 -3.06134,-2.912 -3.06134,-8.512 v -20.23468 h -3.43467 z"
d="m 180.21484,360.71785 h 3.43467 v -11.34934 h 6.34667 v 11.34934 h 6.64534 v 5.22667 h -6.64534 v 20.23468 q 0,2.61333 1.64267,4.256 1.64267,1.568 4.256,1.568 v 5.6 q -6.048,0 -9.184,-2.912 -3.06134,-2.912 -3.06134,-8.512 v -20.23468 h -3.43467 z"
Loaded 100 of 890 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.