Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
46c7f3ebf6 | ||
|
|
f4ebb9068a | ||
|
|
d43d807f11 | ||
|
|
d41d4d990b | ||
|
|
20faa017fd | ||
|
|
e7234c38cd | ||
|
|
77314aaf30 | ||
|
|
432f87ca52 | ||
|
|
e0338a5c05 | ||
|
|
2c46319b31 | ||
|
|
43bce072da | ||
|
|
b6bd3b52a6 | ||
|
|
b464c40f20 | ||
|
|
10b82159d5 | ||
|
|
cb9cdb8112 | ||
|
|
6eedeb375b | ||
|
|
dc5913883b | ||
|
|
0c386cda02 | ||
|
|
feebf2b229 | ||
|
|
7d6f7f6314 | ||
|
|
088377fd82 | ||
|
|
825b9e567b | ||
|
|
585ab135ea | ||
|
|
a42210ddfc | ||
|
|
6683392a78 | ||
|
|
b33136360d | ||
|
|
4af500bec0 | ||
|
|
d967fa11bb | ||
|
|
767f5250c9 | ||
|
|
68cb92aa9c | ||
|
|
7e08b3b4cd | ||
|
|
ad8f787137 | ||
|
|
e4b426b888 | ||
|
|
36c67b97b2 | ||
|
|
4f32f0f70f | ||
|
|
93d23235c9 | ||
|
|
e67dd2fa4b | ||
|
|
5a379247c7 | ||
|
|
ac36d11930 | ||
|
|
33ad151991 | ||
|
|
1e8da4e84b | ||
|
|
ce410cfd5d | ||
|
|
4585149675 | ||
|
|
4991c42507 | ||
|
|
37f049867d | ||
|
|
1494d85dad | ||
|
|
8f2bdbfa07 | ||
|
|
f5befe3ccc | ||
|
|
59d640b14e | ||
|
|
65509298a3 | ||
|
|
d915efd2b1 | ||
|
|
27fc34338d | ||
|
|
84a860cd6c | ||
|
|
a1a3ce686e | ||
|
|
e229a8e929 | ||
|
|
b9b97c67fd | ||
|
|
37b3e88b93 | ||
|
|
38e8856b09 | ||
|
|
ebc5d81180 |
No files matched your search
@@ -5,8 +5,73 @@ 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.25.5] - 2024-09-06
|
||||
|
||||
### Fixed
|
||||
|
||||
- A bug where channel view infinitely tries to load a `Topic` channel
|
||||
|
||||
### Changed
|
||||
|
||||
- Removed announcement
|
||||
|
||||
## [0.25.4] - 2024-08-24
|
||||
|
||||
### Added
|
||||
|
||||
- Portuguese (Brazil) translations (Thanks to davbrasan)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Rare crash related to NavBar
|
||||
- Crash related to web server
|
||||
|
||||
## [0.25.3] - 2024-08-14
|
||||
|
||||
### Fixed
|
||||
|
||||
- a bug where the web app qrcode doesn't show up
|
||||
- added `uri_resolution_autosub` to manifest (needed to fix 720p UI)
|
||||
|
||||
## [0.25.2] - 2024-08-05
|
||||
|
||||
### Added
|
||||
|
||||
- An announcement for the `This helps protect our community` error message
|
||||
|
||||
### Fixed
|
||||
|
||||
- Few optimizations with texture loading to improve memory usage
|
||||
- A rare crash in DIAL server
|
||||
|
||||
## [0.25.1] - 2024-08-03
|
||||
|
||||
### Added
|
||||
|
||||
- Partial Spanish translations (Thanks to gallegonovato)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Issue with focus in the video queue view
|
||||
|
||||
## [0.25.0] - 2024-07-22
|
||||
|
||||
### Added
|
||||
|
||||
- Sort options to channel live streams
|
||||
- Video width and height to DASH manifest
|
||||
|
||||
## [0.24.6] - 2024-07-08
|
||||
|
||||
### Fixed
|
||||
|
||||
- A bug where the right video will not play if selected too quickly
|
||||
- A bug where a bookmarked but deleted playlist can't be removed from bookmarks
|
||||
|
||||
## [0.24.5] - 2024-07-03
|
||||
|
||||
### Added
|
||||
|
||||
- Additional Spanish (Mexico) translations (Thanks to Jean Carton)
|
||||
|
||||
## [0.24.4] - 2024-06-24
|
||||
|
||||
+1
-1
@@ -47,6 +47,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) also know sa "Connect with Wi-Fi", 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.
|
||||
@@ -15,7 +15,7 @@
|
||||
<a href="/LICENSE">
|
||||
<img alt="AGPL-3.0 license" src="https://img.shields.io/github/license/iBicha/playlet.svg"/>
|
||||
</a>
|
||||
<a href="https://channelstore.roku.com/en-ca/details/840aec36f51bfe6d96cf6db9055a372a/playlet">
|
||||
<a href="https://channelstore.roku.com/details/840aec36f51bfe6d96cf6db9055a372a/playlet">
|
||||
<img alt="Roku Channel Store" src="https://img.shields.io/badge/Roku%20Store-Install-blueviolet?logo=roku&logoColor=blueviolet&labelColor=white"/>
|
||||
</a>
|
||||
<a href="https://github.com/iBicha/playlet/wiki">
|
||||
@@ -31,8 +31,8 @@ Playlet is an unofficial YouTube client for Roku 📺
|
||||
|
||||
<a href="./docs/screenshots/README.md">
|
||||
|
||||
|  |  |  |
|
||||
| ---------------------------------- | -------------------------------------- | ------------------------------------------ |
|
||||
| [](docs/screenshots/README.md) | [](docs/screenshots/README.md) | [](docs/screenshots/README.md) |
|
||||
| ---------------------------------------------------------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------ |
|
||||
|
||||
</a>
|
||||
|
||||
@@ -40,14 +40,16 @@ 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/840aec36f51bfe6d96cf6db9055a372a/playlet)
|
||||
|
||||
Note: sometimes a bug in Roku channel store redirects to a random app instead of Playlet. If this happens to you, you can install Playlet from your Roku TV directly, by searching "Playlet" in the store.
|
||||
|
||||
## Features
|
||||
|
||||
- 🔥 No Ads (Not now, not ever)
|
||||
- 🕵️ No Tracking
|
||||
- 🛡️ Privacy driven (uses Invidious backend)
|
||||
- ⚔️ SponsorBlock integration (skips undesirable sections in videos)
|
||||
- 🛡️ Privacy driven (uses [Invidious](https://invidious.io/) backend)
|
||||
- ⚔️ [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)
|
||||
|
||||
+12
-6
@@ -26,7 +26,8 @@ This document contains various kinds of information related to Playlet developme
|
||||
- [Playlet Web App](#playlet-web-app)
|
||||
- [Svelte development](#svelte-development)
|
||||
- [Tailwind/Daisy UI](#tailwinddaisy-ui)
|
||||
- [API calls (proxy authenticated)](#api-calls-proxy-authenticated)
|
||||
- [API calls](#api-calls)
|
||||
- [API calls (proxy authenticated)](#api-calls-proxy-authenticated)
|
||||
- [Developer settings](#developer-settings)
|
||||
- [In case of a softlock](#in-case-of-a-softlock)
|
||||
- [CI/CD](#cicd)
|
||||
@@ -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.
|
||||
@@ -181,7 +182,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 +274,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. Most of the APIs used are described in the OpenAPI spec [playlet-web-api.yml](./playlet-web-api.yml). 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,9 +292,9 @@ 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.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ openapi: 3.0.0
|
||||
|
||||
info:
|
||||
title: Playlet Web API
|
||||
version: 0.24.5
|
||||
version: 0.25.5
|
||||
description:
|
||||
Playlet Web API is a RESTful API for controlling the Playlet app on
|
||||
Roku devices. The API is intended to be used by the Playlet web app, but can
|
||||
|
||||
Generated
+71
-67
@@ -1,42 +1,42 @@
|
||||
{
|
||||
"name": "playlet",
|
||||
"version": "0.24.5",
|
||||
"version": "0.25.5",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "playlet",
|
||||
"version": "0.24.5",
|
||||
"version": "0.25.5",
|
||||
"hasInstallScript": true,
|
||||
"devDependencies": {
|
||||
"@rokucommunity/bslint": "^0.8.21",
|
||||
"@rokucommunity/bslint": "^0.8.24",
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
"@types/node": "^20.14.9",
|
||||
"@types/node": "^22.5.1",
|
||||
"@types/xml2js": "^0.4.14",
|
||||
"argparse": "^2.0.1",
|
||||
"brighterscript": "0.67.3",
|
||||
"brighterscript-formatter": "^1.7.3",
|
||||
"brighterscript": "0.67.5",
|
||||
"brighterscript-formatter": "^1.7.4",
|
||||
"convert-svg-to-png": "^0.6.4",
|
||||
"cross-fetch": "^4.0.0",
|
||||
"crypto-js": "^4.2.0",
|
||||
"dotenv": "^16.4.5",
|
||||
"express": "^4.19.2",
|
||||
"fs-extra": "^11.2.0",
|
||||
"glob": "^10.4.2",
|
||||
"glob": "^11.0.0",
|
||||
"imap": "^0.8.19",
|
||||
"ip": "^2.0.1",
|
||||
"json5": "^2.2.3",
|
||||
"mailparser": "^3.7.1",
|
||||
"roku-deploy": "^3.12.0",
|
||||
"roku-deploy": "^3.12.1",
|
||||
"rooibos-roku": "5.12.0",
|
||||
"rounded-rect-9patch": "^1.0.1",
|
||||
"semver": "^7.6.2",
|
||||
"semver": "^7.6.3",
|
||||
"shelljs": "^0.8.5",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.5.2",
|
||||
"typescript": "^5.5.4",
|
||||
"xml2js": "^0.6.2",
|
||||
"yaml": "^2.4.5"
|
||||
"yaml": "^2.5.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "20"
|
||||
@@ -289,10 +289,11 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@rokucommunity/bslint": {
|
||||
"version": "0.8.21",
|
||||
"resolved": "https://registry.npmjs.org/@rokucommunity/bslint/-/bslint-0.8.21.tgz",
|
||||
"integrity": "sha512-gPLddRR/MKoyKoy4sNo/q7HgWrn9AquV9XC66+SwtiepMThjltNk59teJFfX5D0/jqrDnmY/XuXoOLXhvLp/Eg==",
|
||||
"version": "0.8.24",
|
||||
"resolved": "https://registry.npmjs.org/@rokucommunity/bslint/-/bslint-0.8.24.tgz",
|
||||
"integrity": "sha512-1EbA6VeW3QC2QQ/Tqf9qTTcCdZ2ZP9q7H9ZvkeN9gzWYiXFSpJo9AnS41LzEsjRKUtC95UXxIhNhIt4Y+x5szg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"fs-extra": "^10.0.0",
|
||||
"jsonc-parser": "^2.3.0",
|
||||
@@ -514,12 +515,13 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.14.9",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.9.tgz",
|
||||
"integrity": "sha512-06OCtnTXtWOZBJlRApleWndH4JsRVs1pDCc8dLSQp+7PpUpX3ePdHyeNSFTeSe7FtKyQkrlPvHwJOW3SLd8Oyg==",
|
||||
"version": "22.5.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.1.tgz",
|
||||
"integrity": "sha512-KkHsxej0j9IW1KKOOAA/XBA0z08UFSrRQHErzEfA3Vgq57eXIMYboIlHJuYIfd+lwCQjtKqUu3UnmKbtUc9yRw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~5.26.4"
|
||||
"undici-types": "~6.19.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/xml2js": {
|
||||
@@ -887,10 +889,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/brighterscript": {
|
||||
"version": "0.67.3",
|
||||
"resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.67.3.tgz",
|
||||
"integrity": "sha512-uuAIvDmIENA+HdeuRiC1KM+n250m0J9k0Cdiwpby4cBZiFAHRkYoynEqmL8kwAaPtxdXI5RcZU4JqInCd1avlA==",
|
||||
"version": "0.67.5",
|
||||
"resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.67.5.tgz",
|
||||
"integrity": "sha512-OUJ5xLymzKXir8/RdWKamRIYbcqFy2JgqSp6eu2F+wdlCp3rlKCrP83pjEJ9kuqwJCo/V2pjTUcilcNBLkvuIg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@rokucommunity/bslib": "^0.1.1",
|
||||
"@rokucommunity/logger": "^0.3.9",
|
||||
@@ -915,7 +918,7 @@
|
||||
"parse-ms": "^2.1.0",
|
||||
"readline": "^1.3.0",
|
||||
"require-relative": "^0.8.7",
|
||||
"roku-deploy": "^3.12.0",
|
||||
"roku-deploy": "^3.12.1",
|
||||
"serialize-error": "^7.0.1",
|
||||
"source-map": "^0.7.4",
|
||||
"vscode-languageserver": "^9.0.1",
|
||||
@@ -931,12 +934,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/brighterscript-formatter": {
|
||||
"version": "1.7.3",
|
||||
"resolved": "https://registry.npmjs.org/brighterscript-formatter/-/brighterscript-formatter-1.7.3.tgz",
|
||||
"integrity": "sha512-UkxUcqlOvwdkFCel0lsHFmOk0qtb+bK9emIWtGLHW9s6/K8RA+yLEdcGKLqGwgrcnnuK2famP+V718yIvk1Sug==",
|
||||
"version": "1.7.4",
|
||||
"resolved": "https://registry.npmjs.org/brighterscript-formatter/-/brighterscript-formatter-1.7.4.tgz",
|
||||
"integrity": "sha512-a9RWMbCADBHLwaVirf5NuXPxZaRSraSf3Zm8/ecf5qx51gEU4DbwqpLE+d4ncnHn2/Y5M3mf0fJeQGfWlqo6Kg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"brighterscript": "^0.67.2",
|
||||
"brighterscript": "^0.67.4",
|
||||
"glob-all": "^3.3.0",
|
||||
"jsonc-parser": "^3.0.0",
|
||||
"source-map": "^0.7.3",
|
||||
@@ -2457,23 +2460,23 @@
|
||||
}
|
||||
},
|
||||
"node_modules/glob": {
|
||||
"version": "10.4.2",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.4.2.tgz",
|
||||
"integrity": "sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w==",
|
||||
"version": "11.0.0",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-11.0.0.tgz",
|
||||
"integrity": "sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"foreground-child": "^3.1.0",
|
||||
"jackspeak": "^3.1.2",
|
||||
"minimatch": "^9.0.4",
|
||||
"jackspeak": "^4.0.1",
|
||||
"minimatch": "^10.0.0",
|
||||
"minipass": "^7.1.2",
|
||||
"package-json-from-dist": "^1.0.0",
|
||||
"path-scurry": "^1.11.1"
|
||||
"path-scurry": "^2.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"glob": "dist/esm/bin.mjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16 || 14 >=14.18"
|
||||
"node": "20 || >=22"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
@@ -2534,15 +2537,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/glob/node_modules/minimatch": {
|
||||
"version": "9.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz",
|
||||
"integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==",
|
||||
"version": "10.0.1",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz",
|
||||
"integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"brace-expansion": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16 || 14 >=14.17"
|
||||
"node": "20 || >=22"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
@@ -3001,15 +3004,15 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/jackspeak": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.1.2.tgz",
|
||||
"integrity": "sha512-kWmLKn2tRtfYMF/BakihVVRzBKOxz4gJMiL2Rj91WnAB5TPZumSH99R/Yf1qE1u4uRimvCSJfm6hnxohXeEXjQ==",
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.0.1.tgz",
|
||||
"integrity": "sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@isaacs/cliui": "^8.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
"node": "20 || >=22"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
@@ -3223,12 +3226,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/lru-cache": {
|
||||
"version": "10.2.2",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz",
|
||||
"integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==",
|
||||
"version": "11.0.0",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.0.tgz",
|
||||
"integrity": "sha512-Qv32eSV1RSCfhY3fpPE2GNZ8jgM9X7rdAfemLWqTUxwiyIC4jJ6Sy0fZ8H+oLWevO6i4/bizg7c8d8i6bxrzbA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "14 || >=16.14"
|
||||
"node": "20 || >=22"
|
||||
}
|
||||
},
|
||||
"node_modules/luxon": {
|
||||
@@ -3908,16 +3911,16 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/path-scurry": {
|
||||
"version": "1.11.1",
|
||||
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz",
|
||||
"integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==",
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz",
|
||||
"integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"lru-cache": "^10.2.0",
|
||||
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
|
||||
"lru-cache": "^11.0.0",
|
||||
"minipass": "^7.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16 || 14 >=14.18"
|
||||
"node": "20 || >=22"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
@@ -4385,9 +4388,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/roku-deploy": {
|
||||
"version": "3.12.0",
|
||||
"resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.12.0.tgz",
|
||||
"integrity": "sha512-YiCZeQ+sEmFW9ZfXtMNH+/CBSHQ5deNZYWONM+s6gCEQsrz7kCMFPj5YEdgfqW+d2b8G1ve9GELHcSt2FsfM8g==",
|
||||
"version": "3.12.1",
|
||||
"resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.12.1.tgz",
|
||||
"integrity": "sha512-PEOdiFKGW1jrcoC9zjb+9kOWC/Q3eH7dzPvSi5kKignjNcyDiyJi+/wINwNrzw9SsxAVtw+NLvYueyZi9wQVsw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"chalk": "^2.4.2",
|
||||
@@ -4607,9 +4610,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "7.6.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
|
||||
"integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
|
||||
"version": "7.6.3",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
|
||||
"integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
@@ -5120,9 +5123,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.5.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz",
|
||||
"integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==",
|
||||
"version": "5.5.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz",
|
||||
"integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
@@ -5168,10 +5171,11 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "5.26.5",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
|
||||
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
|
||||
"dev": true
|
||||
"version": "6.19.6",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.6.tgz",
|
||||
"integrity": "sha512-e/vggGopEfTKSvj4ihnOLTsqhrKRN3LeO6qSN/GxohhuRv8qH9bNQ4B8W7e/vFL+0XTnmHPB4/kegunZGA4Org==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/universalify": {
|
||||
"version": "2.0.0",
|
||||
@@ -5533,9 +5537,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/yaml": {
|
||||
"version": "2.4.5",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.5.tgz",
|
||||
"integrity": "sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==",
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.0.tgz",
|
||||
"integrity": "sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"yaml": "bin.mjs"
|
||||
|
||||
+10
-10
@@ -1,36 +1,36 @@
|
||||
{
|
||||
"name": "playlet",
|
||||
"version": "0.24.5",
|
||||
"version": "0.25.5",
|
||||
"description": "Unofficial YouTube client for Roku",
|
||||
"devDependencies": {
|
||||
"@rokucommunity/bslint": "^0.8.21",
|
||||
"@rokucommunity/bslint": "^0.8.24",
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
"@types/node": "^20.14.9",
|
||||
"@types/node": "^22.5.1",
|
||||
"@types/xml2js": "^0.4.14",
|
||||
"argparse": "^2.0.1",
|
||||
"brighterscript": "0.67.3",
|
||||
"brighterscript-formatter": "^1.7.3",
|
||||
"brighterscript": "0.67.5",
|
||||
"brighterscript-formatter": "^1.7.4",
|
||||
"convert-svg-to-png": "^0.6.4",
|
||||
"cross-fetch": "^4.0.0",
|
||||
"crypto-js": "^4.2.0",
|
||||
"dotenv": "^16.4.5",
|
||||
"express": "^4.19.2",
|
||||
"fs-extra": "^11.2.0",
|
||||
"glob": "^10.4.2",
|
||||
"glob": "^11.0.0",
|
||||
"imap": "^0.8.19",
|
||||
"ip": "^2.0.1",
|
||||
"json5": "^2.2.3",
|
||||
"mailparser": "^3.7.1",
|
||||
"roku-deploy": "^3.12.0",
|
||||
"roku-deploy": "^3.12.1",
|
||||
"rooibos-roku": "5.12.0",
|
||||
"rounded-rect-9patch": "^1.0.1",
|
||||
"semver": "^7.6.2",
|
||||
"semver": "^7.6.3",
|
||||
"shelljs": "^0.8.5",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.5.2",
|
||||
"typescript": "^5.5.4",
|
||||
"xml2js": "^0.6.2",
|
||||
"yaml": "^2.4.5"
|
||||
"yaml": "^2.5.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "20"
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "playlet-app",
|
||||
"version": "0.24.5",
|
||||
"version": "0.25.5",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "playlet-app",
|
||||
"version": "0.24.5"
|
||||
"version": "0.25.5"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "playlet-app",
|
||||
"version": "0.24.5",
|
||||
"version": "0.25.5",
|
||||
"description": "Unofficial YouTube client for Roku",
|
||||
"scripts": {
|
||||
"prebuild": "rm -rf ../build/playlet-app",
|
||||
|
||||
@@ -15,7 +15,7 @@ function GetLoadingMessage() as string
|
||||
"Deleting system32...",
|
||||
"Updating: 3 hours 32 minutes remaining...",
|
||||
"Asking ChatGPT for humorous loading messages...",
|
||||
"Loading today's sponsor... NordVPN!",
|
||||
"Loading today's sponsor... Just kidding!",
|
||||
"Don't worry, this is normal...",
|
||||
"Don't forget to like and subscribe...",
|
||||
"Shoveling coal into the server...",
|
||||
@@ -25,6 +25,7 @@ function GetLoadingMessage() as string
|
||||
"Looking for the remote...",
|
||||
"Finding that song that goes 'La la lala la'...",
|
||||
"Waiting for the spinny thing to finish...",
|
||||
"Oh I'm on TV... Hi mom!",
|
||||
]
|
||||
end if
|
||||
index = GetRandom(0, messages.count() - 1)
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
function Init()
|
||||
m.busySpinner = m.top.findNode("busySpinner")
|
||||
m.busyspinner.poster.width = 150
|
||||
m.busyspinner.poster.height = 150
|
||||
poster = m.busyspinner.poster
|
||||
poster.width = 150
|
||||
poster.height = 150
|
||||
poster.loadWidth = 150
|
||||
poster.loadHeight = 150
|
||||
poster.loadDisplayMode = "limitSize"
|
||||
' bs:disable-next-line NO_OBSERVE_STRING_CALLBACK
|
||||
m.busyspinner.poster.observeField("loadStatus", "PositionSpinner")
|
||||
m.busySpinner.poster.uri = "pkg:/images/spinner.png"
|
||||
poster.observeField("loadStatus", "PositionSpinner")
|
||||
poster.uri = "pkg:/images/spinner.png"
|
||||
' bs:disable-next-line NO_OBSERVE_STRING_CALLBACK
|
||||
m.top.observeField("visible", "OnVisibleChange")
|
||||
end function
|
||||
|
||||
@@ -2,10 +2,11 @@ title=Playlet
|
||||
|
||||
# Do not update version manually, it is auto updated from package.json
|
||||
major_version=0
|
||||
minor_version=24
|
||||
minor_version=25
|
||||
build_version=00005
|
||||
|
||||
ui_resolutions=hd
|
||||
uri_resolution_autosub=$$RES$$,480p,720p,1080p
|
||||
|
||||
## Channel Assets
|
||||
### Main Menu Icons / Channel Poster Artwork
|
||||
|
||||
@@ -17,4 +17,33 @@ namespace Logger
|
||||
buffer.AppendFile(LOGS_FILE_PATH)
|
||||
end function
|
||||
|
||||
function LogLastExitInfo() as void
|
||||
' roAppManager.GetLastExitInfo() is only available on Roku OS 13 and above
|
||||
appManager = CreateObject("roAppManager")
|
||||
hasMethod = FindMemberFunction(appManager, "GetLastExitInfo") <> invalid
|
||||
if not hasMethod
|
||||
return
|
||||
end if
|
||||
|
||||
lastExitInfo = appManager.GetLastExitInfo()
|
||||
if lastExitInfo = invalid
|
||||
return
|
||||
end if
|
||||
|
||||
msg = `************ Last Exit Info ************\n`
|
||||
msg += `exit_code: ${lastExitInfo.exit_code}\n`
|
||||
msg += `timestamp: ${lastExitInfo.timestamp}\n`
|
||||
msg += `app_state: ${lastExitInfo.app_state}\n`
|
||||
msg += `media_player_state: ${lastExitInfo.media_player_state}\n`
|
||||
msg += `mem_limit: ${lastExitInfo.mem_limit}\n`
|
||||
msg += `console_log:\n${lastExitInfo.console_log}\n`
|
||||
msg += `********** End Last Exit Info **********\n`
|
||||
|
||||
' bs:disable-next-line LINT3012
|
||||
print(msg)
|
||||
|
||||
buffer = CreateObject("roByteArray")
|
||||
buffer.FromAsciiString(msg + `\n`)
|
||||
buffer.AppendFile(LOGS_FILE_PATH)
|
||||
end function
|
||||
end namespace
|
||||
@@ -24,6 +24,8 @@ function Main(args as object) as void
|
||||
Registry.ClearPlayletLibUrlsIfNeeded(args)
|
||||
Registry.ClearRegistryIfNeeded(args)
|
||||
|
||||
Logger.LogLastExitInfo()
|
||||
|
||||
scene = screen.CreateScene("BootstrapScene")
|
||||
screen.show()
|
||||
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "playlet-lib",
|
||||
"version": "0.24.5",
|
||||
"version": "0.25.5",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "playlet-lib",
|
||||
"version": "0.24.5"
|
||||
"version": "0.25.5"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "playlet-lib",
|
||||
"version": "0.24.5",
|
||||
"version": "0.25.5",
|
||||
"description": "Unofficial YouTube client for Roku",
|
||||
"scripts": {
|
||||
"prebuild": "rm -rf ../build/playlet-lib",
|
||||
|
||||
@@ -5,6 +5,7 @@ import "pkg:/components/VideoQueue/VideoQueueViewUtils.bs"
|
||||
import "pkg:/source/utils/FocusManagement.bs"
|
||||
import "pkg:/source/utils/Locale.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "pkg:/source/utils/RemoteKeys.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
@@ -86,18 +87,18 @@ function GetRootScreen(screenName as string) as object
|
||||
return m.screens[screenName]
|
||||
end function
|
||||
|
||||
function onKeyEvent(key as string, press as boolean) as boolean
|
||||
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||
if LongPressHandler(key, press)
|
||||
return true
|
||||
end if
|
||||
|
||||
if key = OPTIONS_LONG_PRESS_KEY and press
|
||||
if key = RemoteKeys.OptionsLongPress and press
|
||||
LogInfo("Opening VideoQueueView")
|
||||
VideoQueueViewUtils.Open(m.top.videoQueue, m.top)
|
||||
return true
|
||||
end if
|
||||
|
||||
if key = "options" and not press
|
||||
if key = RemoteKeys.Options and not press
|
||||
if VideoQueueUtils.ToggleVideoPictureInPicture(m.top.videoQueue)
|
||||
return true
|
||||
end if
|
||||
@@ -107,25 +108,25 @@ function onKeyEvent(key as string, press as boolean) as boolean
|
||||
return false
|
||||
end if
|
||||
|
||||
if key = "play"
|
||||
if key = RemoteKeys.Play
|
||||
if VideoQueueUtils.TogglePause(m.top.videoQueue)
|
||||
return true
|
||||
end if
|
||||
end if
|
||||
|
||||
if key = "pause"
|
||||
if key = RemoteKeys.Pause
|
||||
if VideoQueueUtils.Pause(m.top.videoQueue)
|
||||
return true
|
||||
end if
|
||||
end if
|
||||
|
||||
if key = "playonly"
|
||||
if key = RemoteKeys.PlayOnly
|
||||
if VideoQueueUtils.Play(m.top.videoQueue)
|
||||
return true
|
||||
end if
|
||||
end if
|
||||
|
||||
if key = "back"
|
||||
if key = RemoteKeys.Back
|
||||
if VideoQueueUtils.IsVideoPlayerOpen(m.top.videoQueue) and not VideoQueueUtils.IsVideoPlayerFullScreen(m.top.videoQueue)
|
||||
if VideoQueueUtils.ToggleVideoPictureInPicture(m.top.videoQueue)
|
||||
return true
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import "pkg:/source/utils/MathUtils.bs"
|
||||
import "pkg:/source/utils/RemoteKeys.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
function Init()
|
||||
@@ -129,12 +130,12 @@ function OnButtonFocused()
|
||||
end if
|
||||
end function
|
||||
|
||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||
if not press
|
||||
return false
|
||||
end if
|
||||
|
||||
if key = "OK"
|
||||
if key = RemoteKeys.Ok
|
||||
disabled = m.top.disabled
|
||||
if not disabled
|
||||
m.top.buttonSelected = true
|
||||
|
||||
@@ -7,6 +7,7 @@ import "pkg:/source/utils/DisposableObserve.bs"
|
||||
import "pkg:/source/utils/FocusManagement.bs"
|
||||
import "pkg:/source/utils/Locale.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "pkg:/source/utils/RemoteKeys.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
@@ -36,8 +37,8 @@ end function
|
||||
function OnNodeready()
|
||||
m.rowList@.BindNode()
|
||||
|
||||
SetNavigation(m.rowList, "up", m.subscribeButton)
|
||||
SetNavigation(m.subscribeButton, "down", m.rowList)
|
||||
SetNavigation(m.rowList, RemoteKeys.Up, m.subscribeButton)
|
||||
SetNavigation(m.subscribeButton, RemoteKeys.Down, m.rowList)
|
||||
|
||||
m.subscribeButton.text = Tr(Locale.Buttons.Subscribe)
|
||||
DisposableObserveFieldScoped(m.subscribeButton, "buttonSelected", FuncName(OnSubscribeButtonSelected))
|
||||
@@ -104,7 +105,7 @@ function CreateChannelFeeds(authorId as string, author as string, tabs as object
|
||||
return feeds
|
||||
end function
|
||||
|
||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||
if NavigationKeyHandler(key, press).handled
|
||||
return true
|
||||
end if
|
||||
@@ -113,7 +114,7 @@ function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
return false
|
||||
end if
|
||||
|
||||
if key = "back"
|
||||
if key = RemoteKeys.Back
|
||||
Close()
|
||||
return true
|
||||
end if
|
||||
@@ -210,6 +211,16 @@ function InitializeSortOptions()
|
||||
"id": "oldest"
|
||||
"title": "Oldest"
|
||||
}]
|
||||
"channel_streams": [{
|
||||
"id": "newest"
|
||||
"title": "Latest"
|
||||
}, {
|
||||
"id": "popular"
|
||||
"title": "Popular"
|
||||
}, {
|
||||
"id": "oldest"
|
||||
"title": "Oldest"
|
||||
}]
|
||||
"channel_playlists": [{
|
||||
"id": "newest"
|
||||
"title": "Date added (newest)"
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
<Poster
|
||||
id="banner"
|
||||
width="1280"
|
||||
loadWidth="1280"
|
||||
loadHeight="500"
|
||||
loadDisplayMode="limitSize"
|
||||
visible="false" />
|
||||
|
||||
<Group id="container">
|
||||
|
||||
@@ -7,13 +7,13 @@ import "pkg:/source/utils/Locale.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
|
||||
function LoadChannel(invidiousNode as object) as void
|
||||
if m.contentTask <> invalid
|
||||
m.contentTask.cancel = true
|
||||
loadState = m.top.loadState
|
||||
if loadState = FeedLoadState.Loading or loadState = FeedLoadState.Loaded or loadState = FeedLoadState.Error
|
||||
return
|
||||
end if
|
||||
|
||||
loadState = m.top.loadState
|
||||
if loadState = FeedLoadState.Loading or loadState = FeedLoadState.Loaded
|
||||
return
|
||||
if m.contentTask <> invalid
|
||||
m.contentTask.cancel = true
|
||||
end if
|
||||
|
||||
m.top.loadState = FeedLoadState.Loading
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import "pkg:/source/utils/FocusManagement.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "pkg:/source/utils/RemoteKeys.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
@@ -152,22 +153,22 @@ function OnItemSelected(event as object) as void
|
||||
end if
|
||||
end function
|
||||
|
||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||
if press = false
|
||||
return false
|
||||
end if
|
||||
|
||||
if key = "back"
|
||||
if key = RemoteKeys.Back
|
||||
Close()
|
||||
return true
|
||||
end if
|
||||
|
||||
if key = "up"
|
||||
if key = RemoteKeys.Up
|
||||
m.optionsList.jumpToItem = m.optionsList.content.getChildCount() - 1
|
||||
return true
|
||||
end if
|
||||
|
||||
if key = "down"
|
||||
if key = RemoteKeys.Down
|
||||
m.optionsList.jumpToItem = 0
|
||||
return true
|
||||
end if
|
||||
|
||||
@@ -67,7 +67,7 @@ function OnDialogClosed()
|
||||
CancelTimer()
|
||||
end function
|
||||
|
||||
function onKeyEvent(_key as string, _press as boolean) as boolean
|
||||
function OnKeyEvent(_key as string, _press as boolean) as boolean
|
||||
if m.timer = invalid
|
||||
return false
|
||||
end if
|
||||
|
||||
@@ -53,15 +53,6 @@ function LoggerLoop()
|
||||
buffer.AppendFile(logsFile)
|
||||
end if
|
||||
|
||||
lastExitInfo = GetLastExitInfo()
|
||||
if not StringUtils.IsNullOrEmpty(lastExitInfo)
|
||||
line = `************ Last Exit Info ************\n${lastExitInfo}\n********** End Last Exit Info **********\n`
|
||||
' bs:disable-next-line LINT3012
|
||||
print line
|
||||
buffer.FromAsciiString(line)
|
||||
buffer.AppendFile(logsFile)
|
||||
end if
|
||||
|
||||
appMemoryMonitor = CreateObject("roAppMemoryMonitor")
|
||||
if appMemoryMonitor <> invalid and FindMemberFunction(appMemoryMonitor, "EnableMemoryWarningEvent") <> invalid
|
||||
appMemoryMonitor.SetMessagePort(port)
|
||||
@@ -175,19 +166,3 @@ function FormatTime(dateTime as object) as string
|
||||
|
||||
return "[" + hours + ":" + minutes + ":" + seconds + "." + milliseconds + "]"
|
||||
end function
|
||||
|
||||
function GetLastExitInfo() as dynamic
|
||||
' roAppManager.GetLastExitInfo() is only available on Roku OS 13 and above
|
||||
appManager = CreateObject("roAppManager")
|
||||
hasMethod = FindMemberFunction(appManager, "GetLastExitInfo") <> invalid
|
||||
if not hasMethod
|
||||
return invalid
|
||||
end if
|
||||
|
||||
lastExitInfo = appManager.GetLastExitInfo()
|
||||
if lastExitInfo = invalid
|
||||
return invalid
|
||||
end if
|
||||
|
||||
return ToString(lastExitInfo)
|
||||
end function
|
||||
@@ -1,4 +1,5 @@
|
||||
import "pkg:/source/utils/FocusManagement.bs"
|
||||
import "pkg:/source/utils/RemoteKeys.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
function Init()
|
||||
@@ -116,8 +117,8 @@ function UnfocusItem(index as integer) as void
|
||||
m.appController@.HideRootScreen(item.screen)
|
||||
end function
|
||||
|
||||
function onKeyEvent(key as string, press as boolean) as boolean
|
||||
if key <> "right" or not press
|
||||
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||
if key <> RemoteKeys.Right or not press
|
||||
return false
|
||||
end if
|
||||
|
||||
|
||||
@@ -1,27 +1,20 @@
|
||||
function Init()
|
||||
m.titleLabel = m.top.findNode("TitleLabel")
|
||||
m.titleLabelFocused = m.top.findNode("TitleLabelFocused")
|
||||
m.iconPoster = m.top.findNode("IconPoster")
|
||||
m.profileIcon = m.top.findNode("ProfileIcon")
|
||||
end function
|
||||
|
||||
function OnContentSet() as void
|
||||
content = m.top.itemContent
|
||||
if content = invalid
|
||||
return
|
||||
end if
|
||||
|
||||
m.titleLabel.text = content.text
|
||||
m.titleLabelFocused.text = content.text
|
||||
m.top.titleLabelText = content.text
|
||||
m.top.titleLabelFocusedText = content.text
|
||||
|
||||
isProfile = content.isProfile
|
||||
if isProfile
|
||||
m.iconPoster.visible = false
|
||||
m.profileIcon.visible = true
|
||||
m.top.iconPosterVisible = false
|
||||
m.top.profileIconVisible = true
|
||||
else
|
||||
m.iconPoster.visible = true
|
||||
m.profileIcon.visible = false
|
||||
m.iconPoster.uri = content.icon
|
||||
m.top.iconPosterVisible = true
|
||||
m.top.profileIconVisible = false
|
||||
m.top.iconPosterUri = content.icon
|
||||
end if
|
||||
|
||||
OnListHasFocusChange()
|
||||
@@ -29,15 +22,15 @@ end function
|
||||
|
||||
function OnItemHasFocusChange() as void
|
||||
itemHasFocus = m.top.itemHasFocus
|
||||
m.titleLabelFocused.visible = itemHasFocus
|
||||
m.titleLabel.visible = not itemHasFocus
|
||||
m.top.titleLabelFocusedVisible = itemHasFocus
|
||||
m.top.titleLabelVisible = not itemHasFocus
|
||||
end function
|
||||
|
||||
function OnListHasFocusChange()
|
||||
listHasFocus = m.top.listHasFocus
|
||||
if not listHasFocus
|
||||
m.titleLabelFocused.visible = false
|
||||
m.titleLabel.visible = false
|
||||
m.top.titleLabelFocusedVisible = false
|
||||
m.top.titleLabelVisible = false
|
||||
m.top.opacity = 0.8
|
||||
else
|
||||
OnItemHasFocusChange()
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
<field id="itemContent" type="node" onChange="OnContentSet" />
|
||||
<field id="itemHasFocus" type="boolean" onChange="OnItemHasFocusChange" />
|
||||
<field id="listHasFocus" type="boolean" onChange="OnListHasFocusChange" />
|
||||
|
||||
<field id="titleLabelText" type="string" alias="TitleLabel.text" />
|
||||
<field id="titleLabelFocusedText" type="string" alias="TitleLabelFocused.text" />
|
||||
<field id="titleLabelVisible" type="boolean" alias="TitleLabel.visible" />
|
||||
<field id="titleLabelFocusedVisible" type="boolean" alias="TitleLabelFocused.visible" />
|
||||
<field id="iconPosterVisible" type="boolean" alias="IconPoster.visible" />
|
||||
<field id="iconPosterUri" type="uri" alias="IconPoster.uri" />
|
||||
<field id="profileIconVisible" type="boolean" alias="ProfileIcon.visible" />
|
||||
</interface>
|
||||
|
||||
<children>
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
const OK_LONG_PRESS_KEY = "OK_LONG_PRESS"
|
||||
const OPTIONS_LONG_PRESS_KEY = "OPTIONS_LONG_PRESS"
|
||||
import "pkg:/source/utils/RemoteKeys.bs"
|
||||
|
||||
function InitializeLongPress(keys as object, duration = 1.0 as float)
|
||||
longPressKeyMap = {
|
||||
"OK": OK_LONG_PRESS_KEY
|
||||
"options": OPTIONS_LONG_PRESS_KEY
|
||||
}
|
||||
longPressKeyMap = {}
|
||||
longPressKeyMap[RemoteKeys.Ok] = RemoteKeys.OkLongPress
|
||||
longPressKeyMap[RemoteKeys.Options] = RemoteKeys.OptionsLongPress
|
||||
|
||||
m._longPressKeyMap = {}
|
||||
for each key in keys
|
||||
m._longPressKeyMap[key] = longPressKeyMap[key]
|
||||
@@ -16,10 +15,9 @@ function InitializeLongPress(keys as object, duration = 1.0 as float)
|
||||
' Using the keyboard:
|
||||
' - press K to simulate an "OK" long press on the remote.
|
||||
' - press O to simulate an "options" long press on the remote.
|
||||
simulatedLongPressKeyMap = {
|
||||
"OK": "Lit_k"
|
||||
"options": "Lit_o"
|
||||
}
|
||||
simulatedLongPressKeyMap = {}
|
||||
simulatedLongPressKeyMap[RemoteKeys.Ok] = "Lit_k"
|
||||
simulatedLongPressKeyMap[RemoteKeys.Options] = "Lit_o"
|
||||
|
||||
m._simulatedLongPressKeyMap = {}
|
||||
for each key in keys
|
||||
@@ -43,7 +41,7 @@ function LongPressHandler(key as string, press as boolean) as boolean
|
||||
LogInfo(`[${subtype}] Simulating`, simulatedKey, "long press using key:", key, "press:", press)
|
||||
longPressKey = m._longPressKeyMap[simulatedKey]
|
||||
m._longPressFired = true
|
||||
return OnkeyEvent(longPressKey, press)
|
||||
return OnKeyEvent(longPressKey, press)
|
||||
end if
|
||||
#end if
|
||||
|
||||
@@ -87,5 +85,5 @@ function LongPressTimerFired() as void
|
||||
return
|
||||
end if
|
||||
|
||||
OnkeyEvent(m._longPressKeyMap[m._longPressKey], true)
|
||||
OnKeyEvent(m._longPressKeyMap[m._longPressKey], true)
|
||||
end function
|
||||
@@ -8,6 +8,7 @@ import "pkg:/source/AsyncTask/Tasks.bs"
|
||||
import "pkg:/source/utils/ErrorUtils.bs"
|
||||
import "pkg:/source/utils/FocusManagement.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "pkg:/source/utils/RemoteKeys.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
@@ -61,17 +62,17 @@ function OnContentSet() as void
|
||||
LoadPlaylistIfNeeded()
|
||||
end function
|
||||
|
||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||
if LongPressHandler(key, press)
|
||||
return true
|
||||
end if
|
||||
|
||||
if key = OK_LONG_PRESS_KEY and press
|
||||
if key = RemoteKeys.OkLongPress and press
|
||||
OnItemLongPressed(m.list.itemFocused)
|
||||
return true
|
||||
end if
|
||||
|
||||
if key = "OK" and not press
|
||||
if key = RemoteKeys.Ok and not press
|
||||
OnItemSelected(m.list.itemFocused)
|
||||
return true
|
||||
end if
|
||||
@@ -80,7 +81,7 @@ function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
return false
|
||||
end if
|
||||
|
||||
if key = "back"
|
||||
if key = RemoteKeys.Back
|
||||
Close()
|
||||
return true
|
||||
end if
|
||||
|
||||
@@ -2,6 +2,7 @@ import "pkg:/components/Navigation/Navigation.bs"
|
||||
import "pkg:/source/utils/DisposableObserve.bs"
|
||||
import "pkg:/source/utils/FocusManagement.bs"
|
||||
import "pkg:/source/utils/Locale.bs"
|
||||
import "pkg:/source/utils/RemoteKeys.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
@@ -16,10 +17,10 @@ function Init()
|
||||
end function
|
||||
|
||||
function OnNodeReady()
|
||||
SetNavigation(m.activateButton, "down", m.logoutButton)
|
||||
SetNavigation(m.logoutButton, "down", m.closeButton)
|
||||
SetNavigation(m.closeButton, "up", m.logoutButton)
|
||||
SetNavigation(m.logoutButton, "up", m.activateButton)
|
||||
SetNavigation(m.activateButton, RemoteKeys.Down, m.logoutButton)
|
||||
SetNavigation(m.logoutButton, RemoteKeys.Down, m.closeButton)
|
||||
SetNavigation(m.closeButton, RemoteKeys.Up, m.logoutButton)
|
||||
SetNavigation(m.logoutButton, RemoteKeys.Up, m.activateButton)
|
||||
|
||||
DisposableObserveFieldScoped(m.profilesService, "currentProfile", FuncName(OnCunrrentProfileChanged))
|
||||
DisposableObserveFieldScoped(m.profilesService, "onProfileLogout", FuncName(OnProfileLogout))
|
||||
@@ -57,17 +58,17 @@ function OnFocusChange() as void
|
||||
end if
|
||||
end function
|
||||
|
||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||
if NavigationKeyHandler(key, press).handled
|
||||
return true
|
||||
end if
|
||||
|
||||
if key = "options" or key = "play" or key = "pause" or key = "playonly"
|
||||
if key = RemoteKeys.Options or key = RemoteKeys.Play or key = RemoteKeys.Pause or key = RemoteKeys.PlayOnly
|
||||
' A pass-through to the app controller, so it can toggle picture-in-picture and pause/play
|
||||
return false
|
||||
end if
|
||||
|
||||
if key = "back" and press
|
||||
if key = RemoteKeys.Back and press
|
||||
Close()
|
||||
return true
|
||||
end if
|
||||
|
||||
@@ -1,29 +1,49 @@
|
||||
import "pkg:/source/AsyncTask/AsyncTask.bs"
|
||||
import "pkg:/source/AsyncTask/Tasks.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
function Init()
|
||||
m.busySpinner = m.top.findNode("busySpinner")
|
||||
m.busySpinnerPoster = m.busySpinner.poster
|
||||
|
||||
m.busySpinnerPoster.uri = "pkg:/images/spinner.png"
|
||||
m.busySpinnerPoster.loadDisplayMode = "limitSize"
|
||||
|
||||
m.top.observeField("width", FuncName(OnSizeChange))
|
||||
m.top.observeField("height", FuncName(OnSizeChange))
|
||||
OnSizeChange()
|
||||
|
||||
m.busySpinnerPoster.uri = "pkg:/images/spinner.png"
|
||||
|
||||
m.top.observeField("loadStatus", FuncName(OnLoadStatusChange))
|
||||
end function
|
||||
|
||||
function OnSizeChange()
|
||||
width = m.top.width
|
||||
height = m.top.height
|
||||
|
||||
m.busySpinnerPoster.width = width / 2
|
||||
m.busySpinnerPoster.height = height / 2
|
||||
m.busySpinner.translation = [width / 4, height / 4]
|
||||
spinnerWidth = m.top.width / 2
|
||||
spinnerHeight = m.top.height / 2
|
||||
m.busySpinnerPoster.width = spinnerWidth
|
||||
m.busySpinnerPoster.height = spinnerHeight
|
||||
m.busySpinnerPoster.loadWidth = spinnerWidth
|
||||
m.busySpinnerPoster.loadHeight = spinnerHeight
|
||||
m.busySpinner.translation = [spinnerWidth / 2, spinnerHeight / 2]
|
||||
end function
|
||||
|
||||
function OnTextChange() as void
|
||||
GenerateQrCode()
|
||||
end function
|
||||
|
||||
function OnLoadStatusChange() as void
|
||||
if m.top.loadStatus <> "failed"
|
||||
return
|
||||
end if
|
||||
|
||||
' If the image failed to load, it might have been deleted from cachefs:
|
||||
' Try to generate it again
|
||||
LogInfo("QrCode image failed to load, trying to generate it again")
|
||||
GenerateQrCode()
|
||||
end function
|
||||
|
||||
function GenerateQrCode() as void
|
||||
if m.qrCodeGenTask <> invalid
|
||||
m.qrCodeGenTask.cancel = true
|
||||
end if
|
||||
|
||||
@@ -3,6 +3,7 @@ import "pkg:/components/Navigation/Navigation.bs"
|
||||
import "pkg:/components/Services/BookmarksService/BookmarksServiceUtils.bs"
|
||||
import "pkg:/source/utils/FocusManagement.bs"
|
||||
import "pkg:/source/utils/Locale.bs"
|
||||
import "pkg:/source/utils/RemoteKeys.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
function Init()
|
||||
@@ -16,8 +17,8 @@ function Init()
|
||||
end function
|
||||
|
||||
function OnNodeReady()
|
||||
SetNavigation(invalid, "back", m.navBar)
|
||||
SetNavigation(invalid, "left", m.navBar)
|
||||
SetNavigation(invalid, RemoteKeys.Back, m.navBar)
|
||||
SetNavigation(invalid, RemoteKeys.Left, m.navBar)
|
||||
|
||||
m.rowList@.BindNode()
|
||||
|
||||
@@ -73,7 +74,7 @@ function SetRowListContent(bookmarksContent as object)
|
||||
m.rowList.feeds = BookmarksServiceUtils.BookmarksContentToFeed(bookmarksContent)
|
||||
end function
|
||||
|
||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||
if NavigationKeyHandler(key, press).handled
|
||||
return true
|
||||
end if
|
||||
|
||||
@@ -3,6 +3,7 @@ import "pkg:/components/ContextMenu/ContextMenuUtils.bs"
|
||||
import "pkg:/components/Navigation/Navigation.bs"
|
||||
import "pkg:/source/utils/FocusManagement.bs"
|
||||
import "pkg:/source/utils/Locale.bs"
|
||||
import "pkg:/source/utils/RemoteKeys.bs"
|
||||
|
||||
function Init()
|
||||
m.top.focusable = true
|
||||
@@ -12,8 +13,8 @@ function Init()
|
||||
end function
|
||||
|
||||
function OnNodeReady()
|
||||
SetNavigation(invalid, "back", m.navBar)
|
||||
SetNavigation(invalid, "left", m.navBar)
|
||||
SetNavigation(invalid, RemoteKeys.Back, m.navBar)
|
||||
SetNavigation(invalid, RemoteKeys.Left, m.navBar)
|
||||
|
||||
m.rowList@.BindNode()
|
||||
|
||||
@@ -34,7 +35,7 @@ function OnFocusChange() as void
|
||||
NodeSetFocus(m.rowList, true)
|
||||
end function
|
||||
|
||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||
if NavigationKeyHandler(key, press).handled
|
||||
return true
|
||||
end if
|
||||
|
||||
@@ -2,6 +2,7 @@ import "pkg:/components/Dialog/DialogUtils.bs"
|
||||
import "pkg:/components/Navigation/Navigation.bs"
|
||||
import "pkg:/components/ProfileView/ProfileViewUtils.bs"
|
||||
import "pkg:/source/utils/FocusManagement.bs"
|
||||
import "pkg:/source/utils/RemoteKeys.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
function Init()
|
||||
@@ -10,8 +11,8 @@ function Init()
|
||||
end function
|
||||
|
||||
function OnNodeReady()
|
||||
SetNavigation(invalid, "back", m.navBar)
|
||||
SetNavigation(invalid, "left", m.navBar)
|
||||
SetNavigation(invalid, RemoteKeys.Back, m.navBar)
|
||||
SetNavigation(invalid, RemoteKeys.Left, m.navBar)
|
||||
|
||||
m.profileRowList.content = m.profilesService.content
|
||||
m.profileRowList.observeFieldScoped("rowItemSelected", FuncName(OnRowItemSelected))
|
||||
@@ -25,7 +26,7 @@ function OnFocusChange() as void
|
||||
NodeSetFocus(m.profileRowList, true)
|
||||
end function
|
||||
|
||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||
if NavigationKeyHandler(key, press).handled
|
||||
return true
|
||||
end if
|
||||
|
||||
@@ -7,6 +7,7 @@ import "pkg:/source/utils/FocusManagement.bs"
|
||||
import "pkg:/source/utils/Locale.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "pkg:/source/utils/MathUtils.bs"
|
||||
import "pkg:/source/utils/RemoteKeys.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
|
||||
function Init()
|
||||
@@ -39,13 +40,13 @@ function Init()
|
||||
end function
|
||||
|
||||
function OnNodeReady()
|
||||
SetNavigation(m.webAppButton, "down", m.linkWithWifiButton)
|
||||
SetNavigation(m.linkWithWifiButton, "down", m.linkWithTvButton)
|
||||
SetNavigation(m.linkWithTvButton, "up", m.linkWithWifiButton)
|
||||
SetNavigation(m.linkWithWifiButton, "up", m.webAppButton)
|
||||
SetNavigation(m.webAppButton, RemoteKeys.Down, m.linkWithWifiButton)
|
||||
SetNavigation(m.linkWithWifiButton, RemoteKeys.Down, m.linkWithTvButton)
|
||||
SetNavigation(m.linkWithTvButton, RemoteKeys.Up, m.linkWithWifiButton)
|
||||
SetNavigation(m.linkWithWifiButton, RemoteKeys.Up, m.webAppButton)
|
||||
|
||||
SetNavigation(invalid, "back", m.navBar)
|
||||
SetNavigation(invalid, "left", m.navBar)
|
||||
SetNavigation(invalid, RemoteKeys.Back, m.navBar)
|
||||
SetNavigation(invalid, RemoteKeys.Left, m.navBar)
|
||||
|
||||
address = m.webserver@.GetServerAddress()
|
||||
isValidAddress = not StringUtils.IsNullOrEmpty(address)
|
||||
@@ -102,7 +103,7 @@ function OnButtonSizeChange()
|
||||
m.linkWithTvButton.minWidth = width
|
||||
end function
|
||||
|
||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||
navigation = NavigationKeyHandler(key, press)
|
||||
if navigation.handled
|
||||
ShowTab(navigation.node)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import "pkg:/components/Navigation/Navigation.bs"
|
||||
import "pkg:/source/utils/ArrayUtils.bs"
|
||||
import "pkg:/source/utils/Locale.bs"
|
||||
import "pkg:/source/utils/RemoteKeys.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
function Init()
|
||||
@@ -127,10 +128,10 @@ function Init()
|
||||
|
||||
navigationNodes = [m.controls.date, m.controls.type, m.controls.duration, m.controls.features, m.controls.sort]
|
||||
for i = 0 to navigationNodes.count() - 2
|
||||
SetNavigation(navigationNodes[i], "right", navigationNodes[i + 1])
|
||||
SetNavigation(navigationNodes[i], RemoteKeys.Right, navigationNodes[i + 1])
|
||||
end for
|
||||
for i = 1 to navigationNodes.count() - 1
|
||||
SetNavigation(navigationNodes[i], "left", navigationNodes[i - 1])
|
||||
SetNavigation(navigationNodes[i], RemoteKeys.Left, navigationNodes[i - 1])
|
||||
end for
|
||||
end function
|
||||
|
||||
@@ -243,19 +244,19 @@ function SetFilterArray(control as object) as void
|
||||
m.searchScreen.filters = state
|
||||
end function
|
||||
|
||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||
navigation = NavigationKeyHandler(key, press)
|
||||
if navigation.handled
|
||||
m.currentNavigtionNode = navigation.node
|
||||
return true
|
||||
end if
|
||||
|
||||
if key = "options" or key = "play" or key = "pause" or key = "playonly"
|
||||
if key = RemoteKeys.Options or key = RemoteKeys.Play or key = RemoteKeys.Pause or key = RemoteKeys.PlayOnly
|
||||
' A pass-through to the app controller, so it can toggle picture-in-picture and pause/play
|
||||
return false
|
||||
end if
|
||||
|
||||
if key = "back" and press
|
||||
if key = RemoteKeys.Back and press
|
||||
Close()
|
||||
return true
|
||||
end if
|
||||
|
||||
@@ -9,6 +9,7 @@ import "pkg:/source/utils/FocusManagement.bs"
|
||||
import "pkg:/source/utils/LoadingScreen.bs"
|
||||
import "pkg:/source/utils/Locale.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "pkg:/source/utils/RemoteKeys.bs"
|
||||
import "pkg:/source/utils/UrlUtils.bs"
|
||||
|
||||
function Init()
|
||||
@@ -50,30 +51,30 @@ function OnNodeReady()
|
||||
m.top.ObserveField("visible", FuncName(OnVisibilityChange))
|
||||
m.rowlist.ObserveFieldScoped("onError", FuncName(OnSearchError))
|
||||
|
||||
SetNavigation(invalid, "back", m.navBar, function()
|
||||
SetNavigation(invalid, RemoteKeys.Back, m.navBar, function()
|
||||
ScrollUp()
|
||||
end function)
|
||||
SetNavigation(m.suggestions, "right", m.keyboard)
|
||||
SetNavigation(m.filtersButton, "right", m.keyboard)
|
||||
SetNavigation(m.keyboard, "left", m.suggestions)
|
||||
SetNavigation(m.suggestions, "left", m.navBar)
|
||||
SetNavigation(m.filtersButton, "left", m.navBar)
|
||||
SetNavigation(m.keyboard, "left", m.navBar)
|
||||
SetNavigation(m.rowList, "left", m.navBar, function()
|
||||
SetNavigation(m.suggestions, RemoteKeys.Right, m.keyboard)
|
||||
SetNavigation(m.filtersButton, RemoteKeys.Right, m.keyboard)
|
||||
SetNavigation(m.keyboard, RemoteKeys.Left, m.suggestions)
|
||||
SetNavigation(m.suggestions, RemoteKeys.Left, m.navBar)
|
||||
SetNavigation(m.filtersButton, RemoteKeys.Left, m.navBar)
|
||||
SetNavigation(m.keyboard, RemoteKeys.Left, m.navBar)
|
||||
SetNavigation(m.rowList, RemoteKeys.Left, m.navBar, function()
|
||||
ScrollUp()
|
||||
end function)
|
||||
SetNavigation(m.filtersButton, "down", m.suggestions)
|
||||
SetNavigation(m.filtersButton, "down", m.keyboard)
|
||||
SetNavigation(m.filtersButton, RemoteKeys.Down, m.suggestions)
|
||||
SetNavigation(m.filtersButton, RemoteKeys.Down, m.keyboard)
|
||||
|
||||
SetNavigation(invalid, "down", m.rowList, function()
|
||||
SetNavigation(invalid, RemoteKeys.Down, m.rowList, function()
|
||||
ScrollDown()
|
||||
end function)
|
||||
SetNavigation(m.rowList, "up", m.suggestions, function()
|
||||
SetNavigation(m.rowList, RemoteKeys.Up, m.suggestions, function()
|
||||
ScrollUp()
|
||||
end function)
|
||||
|
||||
SetNavigation(m.suggestions, "up", m.filtersButton)
|
||||
SetNavigation(m.keyboard, "up", m.filtersButton)
|
||||
SetNavigation(m.suggestions, RemoteKeys.Up, m.filtersButton)
|
||||
SetNavigation(m.keyboard, RemoteKeys.Up, m.filtersButton)
|
||||
|
||||
m.currentNavigtionNode = m.suggestions
|
||||
' Trigger suggestions
|
||||
@@ -310,7 +311,7 @@ function ScrollDown() as void
|
||||
m.scrollAnimation.control = "start"
|
||||
end function
|
||||
|
||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||
navigation = NavigationKeyHandler(key, press)
|
||||
if navigation.handled
|
||||
m.currentNavigtionNode = navigation.node
|
||||
|
||||
+15
-14
@@ -2,6 +2,7 @@ import "pkg:/components/Navigation/Navigation.bs"
|
||||
import "pkg:/components/parts/AutoBind/OnNodeReadyNoOp.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "pkg:/source/utils/MathUtils.bs"
|
||||
import "pkg:/source/utils/RemoteKeys.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
function Init()
|
||||
@@ -17,17 +18,17 @@ function Init()
|
||||
m.closeButton = m.top.findNode("closeButton")
|
||||
m.saveButton = m.top.findNode("saveButton")
|
||||
|
||||
SetNavigation(m.checkList, "down", m.saveButton)
|
||||
SetNavigation(m.saveButton, "up", m.checkList)
|
||||
SetNavigation(m.closeButton, "up", m.checkList)
|
||||
SetNavigation(m.saveButton, "right", m.closeButton)
|
||||
SetNavigation(m.closeButton, "left", m.saveButton)
|
||||
SetNavigation(m.moveUpButton, "left", m.checkList)
|
||||
SetNavigation(m.moveDownButton, "left", m.checkList)
|
||||
SetNavigation(m.checkList, "right", m.moveUpButton)
|
||||
SetNavigation(m.moveUpButton, "down", m.moveDownButton)
|
||||
SetNavigation(m.moveDownButton, "up", m.moveUpButton)
|
||||
SetNavigation(m.moveDownButton, "down", m.closeButton)
|
||||
SetNavigation(m.checkList, RemoteKeys.Down, m.saveButton)
|
||||
SetNavigation(m.saveButton, RemoteKeys.Up, m.checkList)
|
||||
SetNavigation(m.closeButton, RemoteKeys.Up, m.checkList)
|
||||
SetNavigation(m.saveButton, RemoteKeys.Right, m.closeButton)
|
||||
SetNavigation(m.closeButton, RemoteKeys.Left, m.saveButton)
|
||||
SetNavigation(m.moveUpButton, RemoteKeys.Left, m.checkList)
|
||||
SetNavigation(m.moveDownButton, RemoteKeys.Left, m.checkList)
|
||||
SetNavigation(m.checkList, RemoteKeys.Right, m.moveUpButton)
|
||||
SetNavigation(m.moveUpButton, RemoteKeys.Down, m.moveDownButton)
|
||||
SetNavigation(m.moveDownButton, RemoteKeys.Up, m.moveUpButton)
|
||||
SetNavigation(m.moveDownButton, RemoteKeys.Down, m.closeButton)
|
||||
|
||||
m.moveUpButton.observeField("buttonSelected", FuncName(OnMoveUpButtonSelected))
|
||||
m.moveDownButton.observeField("buttonSelected", FuncName(OnMoveDownButtonSelected))
|
||||
@@ -55,17 +56,17 @@ function OnFocusChange() as void
|
||||
NodeSetFocus(m.checkList, true)
|
||||
end function
|
||||
|
||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||
if NavigationKeyHandler(key, press).handled
|
||||
return true
|
||||
end if
|
||||
|
||||
if key = "options" or key = "play" or key = "pause" or key = "playonly"
|
||||
if key = RemoteKeys.Options or key = RemoteKeys.Play or key = RemoteKeys.Pause or key = RemoteKeys.PlayOnly
|
||||
' A pass-through to the app controller, so it can toggle picture-in-picture and pause/play
|
||||
return false
|
||||
end if
|
||||
|
||||
if key = "back" and press
|
||||
if key = RemoteKeys.Back and press
|
||||
Close()
|
||||
return true
|
||||
end if
|
||||
|
||||
+16
-13
@@ -2,6 +2,7 @@ import "pkg:/components/Dialog/DialogPalette.bs"
|
||||
import "pkg:/components/Navigation/Navigation.bs"
|
||||
import "pkg:/components/parts/AutoBind/OnNodeReadyNoOp.bs"
|
||||
import "pkg:/components/Services/Invidious/InvidiousService.bs"
|
||||
import "pkg:/source/utils/RemoteKeys.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
function Init()
|
||||
@@ -17,19 +18,19 @@ function Init()
|
||||
m.testButton.observeField("buttonSelected", FuncName(OnTestButtonSelected))
|
||||
m.publicInstances.observeField("instance", FuncName(OnPublicInstanceSelected))
|
||||
|
||||
SetNavigation(m.editButton, "down", m.publicInstances)
|
||||
SetNavigation(m.editButton, "down", m.testButton)
|
||||
SetNavigation(m.publicInstances, "up", m.editButton)
|
||||
SetNavigation(m.editButton, RemoteKeys.Down, m.publicInstances)
|
||||
SetNavigation(m.editButton, RemoteKeys.Down, m.testButton)
|
||||
SetNavigation(m.publicInstances, RemoteKeys.Up, m.editButton)
|
||||
|
||||
SetNavigation(m.publicInstances, "down", m.testButton)
|
||||
SetNavigation(m.publicInstances, RemoteKeys.Down, m.testButton)
|
||||
|
||||
SetNavigation(m.testButton, "up", m.publicInstances)
|
||||
SetNavigation(m.testButton, "up", m.editButton)
|
||||
SetNavigation(m.saveButton, "up", m.publicInstances)
|
||||
SetNavigation(m.saveButton, "up", m.editButton)
|
||||
SetNavigation(m.testButton, RemoteKeys.Up, m.publicInstances)
|
||||
SetNavigation(m.testButton, RemoteKeys.Up, m.editButton)
|
||||
SetNavigation(m.saveButton, RemoteKeys.Up, m.publicInstances)
|
||||
SetNavigation(m.saveButton, RemoteKeys.Up, m.editButton)
|
||||
|
||||
SetNavigation(m.saveButton, "left", m.testButton)
|
||||
SetNavigation(m.testButton, "right", m.saveButton)
|
||||
SetNavigation(m.saveButton, RemoteKeys.Left, m.testButton)
|
||||
SetNavigation(m.testButton, RemoteKeys.Right, m.saveButton)
|
||||
|
||||
m.currentNavigtionNode = m.editButton
|
||||
m.textEditBox.hintText = `e.g. ${Invidious.DEFAULT_INSTANCE}`
|
||||
@@ -65,19 +66,19 @@ function OnFocusChange() as void
|
||||
NodeSetFocus(m.currentNavigtionNode, true)
|
||||
end function
|
||||
|
||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||
navigation = NavigationKeyHandler(key, press)
|
||||
if navigation.handled
|
||||
m.currentNavigtionNode = navigation.node
|
||||
return true
|
||||
end if
|
||||
|
||||
if key = "options" or key = "play" or key = "pause" or key = "playonly"
|
||||
if key = RemoteKeys.Options or key = RemoteKeys.Play or key = RemoteKeys.Pause or key = RemoteKeys.PlayOnly
|
||||
' A pass-through to the app controller, so it can toggle picture-in-picture and pause/play
|
||||
return false
|
||||
end if
|
||||
|
||||
if key = "back" and press
|
||||
if key = RemoteKeys.Back and press
|
||||
Close()
|
||||
return true
|
||||
end if
|
||||
@@ -102,7 +103,9 @@ end function
|
||||
function OnEditButtonSelected()
|
||||
keyboardDialog = createObject("roSGNode", "StandardKeyboardDialog")
|
||||
SetPalette(keyboardDialog)
|
||||
' TODO:P2 localize
|
||||
keyboardDialog.title = "Edit Instance"
|
||||
' TODO:P2 localize
|
||||
keyboardDialog.message = [`Enter the instance url (e.g. ${Invidious.DEFAULT_INSTANCE})`]
|
||||
keyboardDialog.text = m.top.text
|
||||
keyboardDialog.buttons = [Tr(Locale.Buttons.OK), Tr(Locale.Buttons.Cancel)]
|
||||
|
||||
+6
-5
@@ -4,6 +4,7 @@ import "pkg:/components/parts/AutoBind/OnNodeReadyNoOp.bs"
|
||||
import "pkg:/source/AsyncTask/AsyncTask.bs"
|
||||
import "pkg:/source/AsyncTask/Tasks.bs"
|
||||
import "pkg:/source/utils/FocusManagement.bs"
|
||||
import "pkg:/source/utils/RemoteKeys.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
@@ -14,8 +15,8 @@ function Init()
|
||||
m.closeButton.observeField("buttonSelected", FuncName(Close))
|
||||
m.testList.observeField("itemSelected", FuncName(ShowTestDetails))
|
||||
|
||||
SetNavigation(m.closeButton, "up", m.testList)
|
||||
SetNavigation(m.testList, "down", m.closeButton)
|
||||
SetNavigation(m.closeButton, RemoteKeys.Up, m.testList)
|
||||
SetNavigation(m.testList, RemoteKeys.Down, m.closeButton)
|
||||
end function
|
||||
|
||||
function OnFocusChange() as void
|
||||
@@ -26,17 +27,17 @@ function OnFocusChange() as void
|
||||
NodeSetFocus(m.closeButton, true)
|
||||
end function
|
||||
|
||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||
if NavigationKeyHandler(key, press).handled
|
||||
return true
|
||||
end if
|
||||
|
||||
if key = "options" or key = "play" or key = "pause" or key = "playonly"
|
||||
if key = RemoteKeys.Options or key = RemoteKeys.Play or key = RemoteKeys.Pause or key = RemoteKeys.PlayOnly
|
||||
' A pass-through to the app controller, so it can toggle picture-in-picture and pause/play
|
||||
return false
|
||||
end if
|
||||
|
||||
if key = "back" and press
|
||||
if key = RemoteKeys.Back and press
|
||||
Close()
|
||||
return true
|
||||
end if
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import "pkg:/components/Navigation/Navigation.bs"
|
||||
import "pkg:/source/utils/FocusManagement.bs"
|
||||
import "pkg:/source/utils/MathUtils.bs"
|
||||
import "pkg:/source/utils/RemoteKeys.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
function Init()
|
||||
@@ -14,10 +15,10 @@ function Init()
|
||||
m.minusButton.observeFieldScoped("buttonSelected", FuncName(OnMinusSelected))
|
||||
m.plusButton.observeFieldScoped("buttonSelected", FuncName(OnPlusSelected))
|
||||
|
||||
SetNavigation(m.minusButton, "right", m.numberButton)
|
||||
SetNavigation(m.numberButton, "left", m.minusButton)
|
||||
SetNavigation(m.numberButton, "right", m.plusButton)
|
||||
SetNavigation(m.plusButton, "left", m.numberButton)
|
||||
SetNavigation(m.minusButton, RemoteKeys.Right, m.numberButton)
|
||||
SetNavigation(m.numberButton, RemoteKeys.Left, m.minusButton)
|
||||
SetNavigation(m.numberButton, RemoteKeys.Right, m.plusButton)
|
||||
SetNavigation(m.plusButton, RemoteKeys.Left, m.numberButton)
|
||||
end function
|
||||
|
||||
function BindPreference(preferences as object, key as string)
|
||||
@@ -55,7 +56,7 @@ function OnFocusChange() as void
|
||||
NodeSetFocus(m.numberButton, true)
|
||||
end function
|
||||
|
||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||
if NavigationKeyHandler(key, press).handled
|
||||
return true
|
||||
end if
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import "pkg:/components/Navigation/Navigation.bs"
|
||||
import "pkg:/components/Navigation/ScrollTo.bs"
|
||||
import "pkg:/source/utils/FocusManagement.bs"
|
||||
import "pkg:/source/utils/RemoteKeys.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
function Init()
|
||||
@@ -36,22 +37,22 @@ function OnNodeReady()
|
||||
m.currentNavigtionNode = m.firstCategory
|
||||
end if
|
||||
if previousCategory <> invalid
|
||||
SetNavigation(previousCategory.node, "down", category.node)
|
||||
SetNavigation(category.node, "up", previousCategory.node)
|
||||
SetNavigation(previousCategory.node, RemoteKeys.Down, category.node)
|
||||
SetNavigation(category.node, RemoteKeys.Up, previousCategory.node)
|
||||
end if
|
||||
controls = CreateControls(item, container, startX + controlsX, startY, controlSpacing)
|
||||
|
||||
if controls <> invalid
|
||||
if controls.nodes.Count() > 0
|
||||
SetNavigation(category.node, "right", controls.nodes[0])
|
||||
SetNavigation(category.node, RemoteKeys.Right, controls.nodes[0])
|
||||
end if
|
||||
|
||||
for each control in controls.nodes
|
||||
SetNavigation(control, "left", category.node)
|
||||
SetNavigation(control, RemoteKeys.Left, category.node)
|
||||
|
||||
if previousControl <> invalid
|
||||
SetNavigation(previousControl, "down", control)
|
||||
SetNavigation(control, "up", previousControl)
|
||||
SetNavigation(previousControl, RemoteKeys.Down, control)
|
||||
SetNavigation(control, RemoteKeys.Up, previousControl)
|
||||
end if
|
||||
|
||||
previousControl = control
|
||||
@@ -66,8 +67,8 @@ function OnNodeReady()
|
||||
previousCategory = category
|
||||
end for
|
||||
|
||||
SetNavigation(invalid, "back", m.navBar)
|
||||
SetNavigation(invalid, "left", m.navBar)
|
||||
SetNavigation(invalid, RemoteKeys.Back, m.navBar)
|
||||
SetNavigation(invalid, RemoteKeys.Left, m.navBar)
|
||||
end function
|
||||
|
||||
function CreateCategoryNode(item as object, container as object, startX as integer, startY as integer) as object
|
||||
@@ -197,7 +198,7 @@ function CreateRokuComponent(item as object, container as object) as object
|
||||
return node
|
||||
end function
|
||||
|
||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||
navigation = NavigationKeyHandler(key, press)
|
||||
if navigation.handled
|
||||
m.currentNavigtionNode = navigation.node
|
||||
|
||||
@@ -313,6 +313,17 @@ class DashManifest
|
||||
LogWarn("Invalid video stream index, itag:", stream.itag)
|
||||
continue for
|
||||
end if
|
||||
|
||||
if (stream.width = invalid or stream.height = invalid) and not StringUtils.IsNullOrEmpty(stream.size)
|
||||
if stream.size.instr("x") > 0
|
||||
parts = stream.size.Tokenize("x")
|
||||
if parts.Count() = 2
|
||||
stream.width = ValidInt(parts[0].toInt())
|
||||
stream.height = ValidInt(parts[1].toInt())
|
||||
end if
|
||||
end if
|
||||
end if
|
||||
|
||||
videoStreams.Push(stream)
|
||||
end if
|
||||
end for
|
||||
|
||||
@@ -354,7 +354,20 @@ namespace Invidious
|
||||
function PlaylistHandler(context as object) as object
|
||||
response = context.response
|
||||
|
||||
if response.StatusCode() = 200
|
||||
statusCode = response.StatusCode()
|
||||
if statusCode = 404
|
||||
response.OverrideStatusCode(200)
|
||||
return {
|
||||
isLastPage: true
|
||||
items: [{
|
||||
"type": "playlist"
|
||||
"playlistId": context.feedSource.pathParams.plid
|
||||
"title": "[Playlist not found]"
|
||||
}]
|
||||
}
|
||||
end if
|
||||
|
||||
if statusCode = 200
|
||||
json = response.Json()
|
||||
return {
|
||||
items: json.videos
|
||||
@@ -391,7 +404,6 @@ namespace Invidious
|
||||
|
||||
function VideoInfoHandler(context as object) as object
|
||||
response = context.response
|
||||
feedSource = context.feedSource
|
||||
|
||||
statusCode = response.StatusCode()
|
||||
if statusCode >= 500
|
||||
@@ -403,8 +415,9 @@ namespace Invidious
|
||||
response.OverrideStatusCode(200)
|
||||
return {
|
||||
items: [{
|
||||
"videoId": feedSource.pathParams.id
|
||||
"type": "video"
|
||||
"videoId": context.feedSource.pathParams.id
|
||||
"title": "[Video not available]"
|
||||
}]
|
||||
}
|
||||
end if
|
||||
@@ -423,7 +436,19 @@ namespace Invidious
|
||||
function PlaylistInfoHandler(context as object) as object
|
||||
response = context.response
|
||||
|
||||
if response.StatusCode() = 200
|
||||
statusCode = response.StatusCode()
|
||||
if statusCode = 404
|
||||
response.OverrideStatusCode(200)
|
||||
return {
|
||||
items: [{
|
||||
"type": "playlist"
|
||||
"playlistId": context.feedSource.pathParams.plid
|
||||
"title": "[Playlist not found]"
|
||||
}]
|
||||
}
|
||||
end if
|
||||
|
||||
if statusCode = 200
|
||||
json = response.Json()
|
||||
json.type = "playlist"
|
||||
return {
|
||||
|
||||
@@ -44,6 +44,7 @@ const FIELD_VIDEO_ID = "videoId"
|
||||
const FIELD_VIDEO_IDS = "videoIds"
|
||||
const FIELD_EVENT_DETAILS = "eventDetails"
|
||||
const FIELD_LIST_ID = "listId"
|
||||
const FIELD_MDX_EXPANDED_RECEIVER_VIDEO_ID_LIST = "mdxExpandedReceiverVideoIdList"
|
||||
const FIELD_CURRENT_TIME = "currentTime"
|
||||
const FIELD_DURATION = "duration"
|
||||
const FIELD_VOLUME = "volume"
|
||||
|
||||
@@ -9,6 +9,7 @@ import "pkg:/source/AsyncTask/Tasks.bs"
|
||||
import "pkg:/source/utils/DisposableObserve.bs"
|
||||
import "pkg:/source/utils/ErrorUtils.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "pkg:/source/utils/RemoteKeys.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
' TODO:P1 add the option to remove a row if it does not have any content
|
||||
@@ -20,6 +21,7 @@ end function
|
||||
function OnNodeReady()
|
||||
DisposableObserveField(m.top, "itemFocused", FuncName(OnItemFocused))
|
||||
DisposableObserveField(m.top, "rowItemFocused", FuncName(OnRowItemFocused))
|
||||
DisposableObserveField(m.top, "rowItemSelected", FuncName(OnRealRowItemSelected))
|
||||
DisposableObserveField(m.top, "focusedChild", FuncName(OnFocusedChildChange))
|
||||
DisposableObserveField(m.top, "visible", FuncName(OnVisibilityChange))
|
||||
|
||||
@@ -317,20 +319,28 @@ function OnVideoRowListRowContentTaskResult(output as object) as void
|
||||
LoadRowsIfNeeded()
|
||||
end function
|
||||
|
||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
if LongPressHandler(key, press)
|
||||
return true
|
||||
function OnRealRowItemSelected()
|
||||
' This is the event that fires when m.top.rowItemSelected changes
|
||||
LongPressHandler(RemoteKeys.Ok, true)
|
||||
end function
|
||||
|
||||
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||
' This OnKeyEvent should not handle OK/true, because that will block rowItemSelected from firing
|
||||
' Do not pass OK/true to LongPressHandler, since we did that in OnRealRowItemSelected
|
||||
if not (key = RemoteKeys.Ok and press)
|
||||
if LongPressHandler(key, press)
|
||||
return true
|
||||
end if
|
||||
end if
|
||||
|
||||
if key = OK_LONG_PRESS_KEY and press
|
||||
if key = RemoteKeys.OkLongPress and press
|
||||
OnRowItemLongPressed(m.top.rowItemFocused)
|
||||
return true
|
||||
end if
|
||||
|
||||
if key = "OK" and not press
|
||||
' TODO:P1: rowItemFocused doesn't update fast enough. If direction then Ok are pressed quickly, the wrong item is selected
|
||||
' Use currFocusColumn
|
||||
OnRowItemSelected(m.top.rowItemFocused)
|
||||
if key = RemoteKeys.Ok and not press
|
||||
' item was selected, but was not a long press, this is a request to open the video/channel/playlist
|
||||
OnRowItemSelected(m.top.rowItemSelected)
|
||||
return true
|
||||
end if
|
||||
return false
|
||||
|
||||
@@ -71,9 +71,8 @@ function VideoRowListRowContentTask(input as object) as object
|
||||
continue while
|
||||
end if
|
||||
|
||||
' Invidious returns 400 and "{"error":"Administrator has disabled this endpoint."}" when the Popular feed is disabled
|
||||
if feedSource.endpoint = "popular" and response.error.instr("Administrator has disabled this endpoint.") > -1
|
||||
LogWarn("Popular feedSource not available:", response.error)
|
||||
if response.error.instr("Administrator has disabled this endpoint.") > -1
|
||||
LogWarn(feedSource.endpoint, "feedSource not available:", response.error)
|
||||
if feedSources.Count() = 1
|
||||
parent = feedContentNode.getParent()
|
||||
parent.removeChild(feedContentNode)
|
||||
@@ -116,7 +115,9 @@ function VideoRowListRowContentTask(input as object) as object
|
||||
|
||||
if response.result.items.Count() > 0
|
||||
pageType = feedSource.state.paginationType
|
||||
if pageType = PaginationType.Continuation and hasContinuation
|
||||
if response.result.isLastPage = true
|
||||
feedSource.state.loadState = FeedLoadState.Loaded
|
||||
else if pageType = PaginationType.Continuation and hasContinuation
|
||||
feedSource.state.loadState = FeedLoadState.LoadedPage
|
||||
else if pageType = PaginationType.Pages
|
||||
feedSource.state.loadState = FeedLoadState.LoadedPage
|
||||
|
||||
@@ -8,6 +8,7 @@ import "pkg:/source/AsyncTask/AsyncTask.bs"
|
||||
import "pkg:/source/AsyncTask/Tasks.bs"
|
||||
import "pkg:/source/utils/ErrorUtils.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "pkg:/source/utils/RemoteKeys.bs"
|
||||
|
||||
function Init()
|
||||
SetPlayerStyle()
|
||||
@@ -420,29 +421,29 @@ function HandleOKPress() as boolean
|
||||
return handled
|
||||
end function
|
||||
|
||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||
if press = false
|
||||
return false
|
||||
end if
|
||||
' Unfortunately, a Video node cannot capture the "options" key (because, Roku...)
|
||||
' https://community.roku.com/t5/Roku-Developer-Program/Bug-in-10-0-1-Options-key-is-not-being-consumed-by-onKeyEvent-when-Video-node-is-in-focus/m-p/709200/highlight/true#M49312
|
||||
' Because of that, the button "down" is used to shrink the video for picture in picture mode
|
||||
if key = "down"
|
||||
if key = RemoteKeys.Down
|
||||
if VideoQueueUtils.ToggleVideoPictureInPicture(m.videoQueue)
|
||||
return true
|
||||
end if
|
||||
end if
|
||||
|
||||
if key = "back"
|
||||
if key = RemoteKeys.Back
|
||||
m.videoQueue.closePlayer = true
|
||||
return true
|
||||
end if
|
||||
|
||||
if key = "OK"
|
||||
if key = RemoteKeys.Ok
|
||||
return HandleOKPress()
|
||||
end if
|
||||
|
||||
if key = "left" or key = "right" or key = "rewind" or key = "fastforward"
|
||||
if key = RemoteKeys.Left or key = RemoteKeys.Right or key = RemoteKeys.Rewind or key = RemoteKeys.FastForward
|
||||
' We're paused and one of the buttons is pressed: left, right ff, rw.
|
||||
' That means we're seeking position. Check that in HandleOKPress and exit early
|
||||
m.isSeekingPosition = true
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
enum MinimizeState
|
||||
None ' None is not a valid state, but it is the default value pre-initialization
|
||||
Minimizing
|
||||
Minimized
|
||||
Maximizing
|
||||
Maximized
|
||||
end enum
|
||||
|
||||
function InitializePitctureInPicture()
|
||||
m.minRect = {
|
||||
translation: [834, 460]
|
||||
width: 426
|
||||
height: 240
|
||||
}
|
||||
|
||||
m.maxRect = {
|
||||
translation: [0, 0]
|
||||
width: 1280
|
||||
height: 720
|
||||
}
|
||||
|
||||
InitializePitctureInPictureAnimation()
|
||||
InitializePitctureInPictureFullScreenHint()
|
||||
|
||||
DisposableObserveField(m.top, "minimizeState", FuncName(OnMinimizeStateChange))
|
||||
DisposableObserveFieldScoped(m.container, "fullscreen", FuncName(OnFullScreenChange))
|
||||
|
||||
if m.container.fullscreen
|
||||
m.top.minimizeState = MinimizeState.Maximized
|
||||
else
|
||||
m.top.minimizeState = MinimizeState.Minimized
|
||||
end if
|
||||
end function
|
||||
|
||||
function InitializePitctureInPictureAnimation()
|
||||
m.minimizeAnimation = m.top.findNode("minimizeAnimation")
|
||||
m.widthInterpolator = m.minimizeAnimation.findNode("widthInterpolator")
|
||||
m.heightInterpolator = m.minimizeAnimation.findNode("heightInterpolator")
|
||||
m.translationInterpolator = m.minimizeAnimation.findNode("translationInterpolator")
|
||||
DisposableObserveFieldScoped(m.minimizeAnimation, "state", FuncName(OnMinimizeAnimationStateChange))
|
||||
|
||||
m.widthInterpolator.keyValue = [m.maxRect.width, (m.maxRect.width + m.minRect.width) / 2, m.minRect.width]
|
||||
m.heightInterpolator.keyValue = [m.maxRect.height, (m.maxRect.height + m.minRect.height) / 2, m.minRect.height]
|
||||
midTranslation = [(m.maxRect.translation[0] + m.minRect.translation[0]) / 2, (m.maxRect.translation[1] + m.minRect.translation[1]) / 2]
|
||||
m.translationInterpolator.keyValue = [m.maxRect.translation, midTranslation, m.minRect.translation]
|
||||
end function
|
||||
|
||||
function InitializePitctureInPictureFullScreenHint()
|
||||
m.fullScreenHint = m.top.findNode("fullScreenHint")
|
||||
m.fullScreenHintLabel = m.fullScreenHint.findNode("fullScreenHintLabel")
|
||||
m.fullScreenHintTimer = m.fullScreenHint.findNode("fullScreenHintTimer")
|
||||
DisposableObserveFieldScoped(m.fullScreenHintTimer, "fire", FuncName(HideFullScreenHint))
|
||||
|
||||
m.fullScreenHint.width = m.minRect.width
|
||||
m.fullScreenHintLabel.width = m.minRect.width
|
||||
m.fullScreenHint.translation = [0, m.minRect.height - m.fullScreenHint.height]
|
||||
end function
|
||||
|
||||
function OnMinimizeStateChange()
|
||||
state = m.top.minimizeState
|
||||
|
||||
if state = MinimizeState.Minimizing
|
||||
OnMinimizingState()
|
||||
else if state = MinimizeState.Minimized
|
||||
OnMinimizedState()
|
||||
else if state = MinimizeState.Maximizing
|
||||
OnMaximizingState()
|
||||
else if state = MinimizeState.Maximized
|
||||
OnMaximizedState()
|
||||
end if
|
||||
end function
|
||||
|
||||
function OnMinimizingState()
|
||||
m.videoUi.visible = false
|
||||
|
||||
m.widthInterpolator.reverse = false
|
||||
m.heightInterpolator.reverse = false
|
||||
m.translationInterpolator.reverse = false
|
||||
m.minimizeAnimation.control = "start"
|
||||
end function
|
||||
|
||||
function OnMinimizedState()
|
||||
m.top.width = m.minRect.width
|
||||
m.top.height = m.minRect.height
|
||||
m.top.translation = m.minRect.translation
|
||||
|
||||
m.videoUi.visible = false
|
||||
ShowFullScreenHint()
|
||||
end function
|
||||
|
||||
function OnMaximizingState()
|
||||
m.videoUi.visible = true
|
||||
HideFullScreenHint()
|
||||
|
||||
m.widthInterpolator.reverse = true
|
||||
m.heightInterpolator.reverse = true
|
||||
m.translationInterpolator.reverse = true
|
||||
m.minimizeAnimation.control = "start"
|
||||
end function
|
||||
|
||||
function OnMaximizedState()
|
||||
m.top.width = m.maxRect.width
|
||||
m.top.height = m.maxRect.height
|
||||
m.top.translation = m.maxRect.translation
|
||||
|
||||
HideFullScreenHint()
|
||||
m.videoUi.visible = true
|
||||
end function
|
||||
|
||||
function OnFullScreenChange()
|
||||
if m.container.fullscreen
|
||||
Maximize()
|
||||
else
|
||||
Minimize()
|
||||
end if
|
||||
end function
|
||||
|
||||
function Minimize() as void
|
||||
state = m.top.minimizeState
|
||||
if state = MinimizeState.Minimized
|
||||
return
|
||||
end if
|
||||
|
||||
m.top.minimizeState = MinimizeState.Minimizing
|
||||
end function
|
||||
|
||||
function Maximize() as void
|
||||
state = m.top.minimizeState
|
||||
if state = MinimizeState.Maximized
|
||||
return
|
||||
end if
|
||||
|
||||
m.top.minimizeState = MinimizeState.Maximizing
|
||||
end function
|
||||
|
||||
function ShowFullScreenHint()
|
||||
m.fullScreenHint.visible = true
|
||||
|
||||
m.fullScreenHintTimer.control = "stop"
|
||||
m.fullScreenHintTimer.control = "start"
|
||||
end function
|
||||
|
||||
function HideFullScreenHint()
|
||||
m.fullScreenHint.visible = false
|
||||
end function
|
||||
|
||||
function OnMinimizeAnimationStateChange() as void
|
||||
' "stopped" Indicates that the animation has either run to completion or has been explicitly stopped.
|
||||
' Since we don't stop the animation explicitly, we can assume that the animation has run to completion.
|
||||
' This assumption becomes invalid if we set m.minimizeAnimation.control = "stop"
|
||||
if m.minimizeAnimation.state <> "stopped"
|
||||
return
|
||||
end if
|
||||
|
||||
state = m.top.minimizeState
|
||||
if state = MinimizeState.Minimizing
|
||||
m.top.minimizeState = MinimizeState.Minimized
|
||||
else if state = MinimizeState.Maximizing
|
||||
m.top.minimizeState = MinimizeState.Maximized
|
||||
end if
|
||||
end function
|
||||
|
||||
function ShutDownPitctureInPicture()
|
||||
m.fullScreenHintTimer.control = "stop"
|
||||
end function
|
||||
@@ -0,0 +1,147 @@
|
||||
enum PlayerUiState
|
||||
None ' None is not a valid state, but it is the default value pre-initialization
|
||||
FadingIn
|
||||
Visible
|
||||
FadingOut
|
||||
Hidden
|
||||
end enum
|
||||
|
||||
function InitializePlayerUi()
|
||||
m.top.enableUI = false
|
||||
m.top.enableTrickPlay = false
|
||||
|
||||
FindUiNodes()
|
||||
SetupLoadingSpinner()
|
||||
|
||||
DisposableObserveFieldScoped(m.uiFadeAnimation, "state", FuncName(OnUiFadeAnimationStateChange))
|
||||
DisposableObserveField(m.hideVideoUiTimer, "fire", FuncName(OnHideVideoUiTimer))
|
||||
|
||||
DisposableObserveField(m.top, "playerUiState", FuncName(OnPlayerUiState))
|
||||
|
||||
m.top.playerUiState = PlayerUiState.Visible
|
||||
end function
|
||||
|
||||
function FindUiNodes()
|
||||
m.clock = m.top.findNode("Clock")
|
||||
m.titleLabel = m.top.findNode("TitleLabel")
|
||||
m.secondaryTitleLabel = m.top.findNode("SecondaryTitleLabel")
|
||||
m.backgroundPoster = m.top.findNode("BackgroundPoster")
|
||||
m.backgroundPosterSmall = m.top.findNode("BackgroundPosterSmall")
|
||||
m.previousButton = m.top.findNode("PreviousButton")
|
||||
m.playButton = m.top.findNode("PlayButton")
|
||||
m.nextButton = m.top.findNode("NextButton")
|
||||
m.minimizeButton = m.top.findNode("MinimizeButton")
|
||||
m.trickPlayBar = m.top.findNode("TrickPlayBar")
|
||||
m.videoUi = m.top.findNode("VideoUi")
|
||||
m.progressTimer = m.top.findNode("ProgressTimer")
|
||||
m.hideVideoUiTimer = m.top.findNode("HideVideoUiTimer")
|
||||
m.uiFadeAnimation = m.top.findNode("UiFadeAnimation")
|
||||
m.uiFadeOpacityInterpolator = m.top.findNode("UiFadeOpacityInterpolator")
|
||||
m.loadingUi = m.top.findNode("LoadingUi")
|
||||
m.loadingSpinnerBackground = m.loadingUi.findNode("LoadingSpinnerBackground")
|
||||
m.loadingSpinner = m.loadingUi.findNode("LoadingSpinner")
|
||||
m.loadingLabel = m.loadingSpinner.findNode("LoadingLabel")
|
||||
m.loadingPercentLabel = m.loadingSpinner.findNode("LoadingPercentLabel")
|
||||
end function
|
||||
|
||||
function SetupLoadingSpinner()
|
||||
poster = m.loadingSpinner.poster
|
||||
|
||||
size = 150
|
||||
poster.width = size
|
||||
poster.height = size
|
||||
centerx = (1280 - size) / 2
|
||||
centery = (720 - size) / 2
|
||||
m.loadingSpinner.translation = [centerx, centery]
|
||||
poster.opacity = 0.8
|
||||
poster.uri = "pkg:/images/spinner.png"
|
||||
|
||||
size = 80
|
||||
centerx = (1280 - size) / 2
|
||||
centery = (720 - size) / 2
|
||||
m.loadingSpinnerBackground.translation = [centerx, centery]
|
||||
end function
|
||||
|
||||
function OnPlayerUiState()
|
||||
state = m.top.playerUiState
|
||||
|
||||
if state = PlayerUiState.FadingIn
|
||||
OnPlayerUiFadingIn()
|
||||
else if state = PlayerUiState.Visible
|
||||
OnPlayerUiVisible()
|
||||
else if state = PlayerUiState.FadingOut
|
||||
OnPlayerUiFadingOut()
|
||||
else if state = PlayerUiState.Hidden
|
||||
OnPlayerUiHidden()
|
||||
end if
|
||||
end function
|
||||
|
||||
function OnPlayerUiFadingIn()
|
||||
if m.top.hasFocus()
|
||||
NodeSetFocus(m.playButton, true)
|
||||
end if
|
||||
|
||||
m.uiFadeOpacityInterpolator.reverse = false
|
||||
m.uiFadeAnimation.control = "start"
|
||||
end function
|
||||
|
||||
function OnPlayerUiVisible()
|
||||
if m.top.hasFocus()
|
||||
NodeSetFocus(m.playButton, true)
|
||||
end if
|
||||
|
||||
StartHideVideoUiTimer()
|
||||
end function
|
||||
|
||||
function OnPlayerUiFadingOut()
|
||||
m.uiFadeOpacityInterpolator.reverse = true
|
||||
m.uiFadeAnimation.control = "start"
|
||||
end function
|
||||
|
||||
function OnPlayerUiHidden()
|
||||
m.videoUi.opacity = 0
|
||||
|
||||
if m.top.isInFocusChain() and not m.top.hasFocus()
|
||||
NodeSetFocus(m.top, false)
|
||||
NodeSetFocus(m.top, true)
|
||||
end if
|
||||
end function
|
||||
|
||||
function StartHideVideoUiTimer()
|
||||
m.hideVideoUiTimer.control = "stop"
|
||||
m.hideVideoUiTimer.control = "start"
|
||||
end function
|
||||
|
||||
function StopHideVideoUiTimer()
|
||||
m.hideVideoUiTimer.control = "stop"
|
||||
end function
|
||||
|
||||
function OnHideVideoUiTimer() as void
|
||||
if m.top.playerUiState = PlayerUiState.Hidden
|
||||
return
|
||||
end if
|
||||
|
||||
m.top.playerUiState = PlayerUiState.FadingOut
|
||||
end function
|
||||
|
||||
function OnUiFadeAnimationStateChange() as void
|
||||
' "stopped" Indicates that the animation has either run to completion or has been explicitly stopped.
|
||||
' Since we don't stop the animation explicitly, we can assume that the animation has run to completion.
|
||||
' This assumption becomes invalid if we set m.uiFadeAnimation.control = "stop"
|
||||
if m.uiFadeAnimation.state <> "stopped"
|
||||
return
|
||||
end if
|
||||
|
||||
state = m.top.playerUiState
|
||||
if state = PlayerUiState.FadingIn
|
||||
m.top.playerUiState = PlayerUiState.Visible
|
||||
else if state = PlayerUiState.FadingOut
|
||||
m.top.playerUiState = PlayerUiState.Hidden
|
||||
end if
|
||||
end function
|
||||
|
||||
function ShutDownPlayerUi()
|
||||
m.hideVideoUiTimer.control = "stop"
|
||||
m.loadingSpinner.control = "stop"
|
||||
m.clock.dispose = true
|
||||
end function
|
||||
@@ -5,19 +5,25 @@ import "pkg:/components/Services/Invidious/InvidiousToContentNode.bs"
|
||||
function VideoContentTaskDev(input as object) as object
|
||||
titleLabel = input.titleLabel
|
||||
secondaryTitleLabel = input.secondaryTitleLabel
|
||||
backgroundPoster = input.backgroundPoster
|
||||
contentNode = input.content
|
||||
invidiousNode = input.invidious
|
||||
|
||||
titleLabel.text = contentNode.title
|
||||
secondaryTitleLabel.text = contentNode.secondaryTitle
|
||||
|
||||
if StringUtils.IsNullOrEmpty(contentNode.videoId)
|
||||
videoId = contentNode.videoId
|
||||
|
||||
if StringUtils.IsNullOrEmpty(videoId)
|
||||
throw "Can't load video information: videoId is missing"
|
||||
end if
|
||||
|
||||
service = new Invidious.InvidiousService(invidiousNode)
|
||||
instance = service.GetInstance()
|
||||
|
||||
response = service.GetVideoMetadata(contentNode.videoId, { cancellation: m.top.cancellation })
|
||||
backgroundPoster.uri = `${instance}/vi/${videoId}/maxresdefault.jpg`
|
||||
|
||||
response = service.GetVideoMetadata(videoId, { cancellation: m.top.cancellation })
|
||||
|
||||
if m.top.cancel
|
||||
return invalid
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import "pkg:/source/utils/RemoteKeys.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
function Init()
|
||||
@@ -41,12 +42,12 @@ function OnDisabledChange()
|
||||
m.top.focusable = not disabled
|
||||
end function
|
||||
|
||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||
if not press
|
||||
return false
|
||||
end if
|
||||
|
||||
if key = "OK"
|
||||
if key = RemoteKeys.Ok
|
||||
disabled = m.top.disabled
|
||||
if not disabled
|
||||
m.top.buttonSelected = true
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import "pkg:/components/Navigation/Navigation.bs"
|
||||
import "pkg:/components/VideoPlayerDev/PictureInPicture.bs"
|
||||
import "pkg:/components/VideoPlayerDev/PlayerUi.bs"
|
||||
import "pkg:/components/VideoQueue/VideoQueueUtils.bs"
|
||||
import "pkg:/source/AsyncTask/AsyncTask.bs"
|
||||
import "pkg:/source/AsyncTask/Tasks.bs"
|
||||
@@ -6,35 +8,20 @@ import "pkg:/source/utils/DisposableObserve.bs"
|
||||
import "pkg:/source/utils/ErrorUtils.bs"
|
||||
import "pkg:/source/utils/FocusManagement.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "pkg:/source/utils/RemoteKeys.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
function Init()
|
||||
m.top.enableUI = false
|
||||
m.top.enableTrickPlay = false
|
||||
InitializePlayerUi()
|
||||
|
||||
|
||||
httpAgent = m.top.getHttpAgent()
|
||||
httpAgent.AddHeader("User-Agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0")
|
||||
|
||||
m.clock = m.top.findNode("Clock")
|
||||
m.titleLabel = m.top.findNode("TitleLabel")
|
||||
m.secondaryTitleLabel = m.top.findNode("SecondaryTitleLabel")
|
||||
m.previousButton = m.top.findNode("PreviousButton")
|
||||
m.playButton = m.top.findNode("PlayButton")
|
||||
m.nextButton = m.top.findNode("NextButton")
|
||||
m.minimizeButton = m.top.findNode("MinimizeButton")
|
||||
m.trickPlayBar = m.top.findNode("TrickPlayBar")
|
||||
m.videoUi = m.top.findNode("VideoUI")
|
||||
m.progressTimer = m.top.findNode("ProgressTimer")
|
||||
m.hideVideoUiTimer = m.top.findNode("HideVideoUiTimer")
|
||||
m.fadeAnimation = m.top.findNode("FadeAnimation")
|
||||
m.fadeOpacityInterpolator = m.top.findNode("FadeOpacityInterpolator")
|
||||
|
||||
SetupLoadingSpinner()
|
||||
end function
|
||||
|
||||
function OnNodeReady()
|
||||
SetupMinimizeAnimation()
|
||||
InitializePitctureInPicture()
|
||||
|
||||
DisposableObserveFieldScoped(m.videoQueue, "hasPrevious", FuncName(OnHasPreviousChange))
|
||||
DisposableObserveFieldScoped(m.videoQueue, "hasNext", FuncName(OnHasNextChange))
|
||||
@@ -50,17 +37,16 @@ function OnNodeReady()
|
||||
DisposableObserveField(m.top, "bufferingStatus", FuncName(OnBufferingStatusChange))
|
||||
|
||||
DisposableObserveField(m.progressTimer, "fire", FuncName(OnProgress))
|
||||
DisposableObserveField(m.hideVideoUiTimer, "fire", FuncName(OnHideVideoUiTimer))
|
||||
|
||||
SetNavigation(m.previousButton, "right", m.playButton)
|
||||
SetNavigation(m.playButton, "right", m.nextButton)
|
||||
SetNavigation(m.nextButton, "right", m.minimizeButton)
|
||||
SetNavigation(m.playButton, "right", m.minimizeButton)
|
||||
SetNavigation(m.previousButton, RemoteKeys.Right, m.playButton)
|
||||
SetNavigation(m.playButton, RemoteKeys.Right, m.nextButton)
|
||||
SetNavigation(m.nextButton, RemoteKeys.Right, m.minimizeButton)
|
||||
SetNavigation(m.playButton, RemoteKeys.Right, m.minimizeButton)
|
||||
|
||||
SetNavigation(m.minimizeButton, "left", m.nextButton)
|
||||
SetNavigation(m.minimizeButton, "left", m.playButton)
|
||||
SetNavigation(m.nextButton, "left", m.playButton)
|
||||
SetNavigation(m.playButton, "left", m.previousButton)
|
||||
SetNavigation(m.minimizeButton, RemoteKeys.Left, m.nextButton)
|
||||
SetNavigation(m.minimizeButton, RemoteKeys.Left, m.playButton)
|
||||
SetNavigation(m.nextButton, RemoteKeys.Left, m.playButton)
|
||||
SetNavigation(m.playButton, RemoteKeys.Left, m.previousButton)
|
||||
|
||||
if m.top.hasFocus() and m.videoUi.visible and m.videoUi.opacity = 1
|
||||
NodeSetFocus(m.playButton, true)
|
||||
@@ -70,15 +56,24 @@ end function
|
||||
function PlayWithContent(contentNode as object)
|
||||
videoContentNode = CreateObject("roSGNode", "ContentNode")
|
||||
|
||||
if not StringUtils.IsNullOrEmpty(contentNode.videoId)
|
||||
videoContentNode.AddFields({ videoId: contentNode.videoId })
|
||||
videoId = contentNode.videoId
|
||||
title = contentNode.title
|
||||
author = contentNode._author
|
||||
thumbnail = contentNode.thumbnail
|
||||
|
||||
if not StringUtils.IsNullOrEmpty(videoId)
|
||||
videoContentNode.AddFields({ videoId: videoId })
|
||||
end if
|
||||
if not StringUtils.IsNullOrEmpty(contentNode.title)
|
||||
videoContentNode.title = contentNode.title
|
||||
if not StringUtils.IsNullOrEmpty(title)
|
||||
videoContentNode.title = title
|
||||
end if
|
||||
' NOTE: "_author" not "author". See PlaylistContentNode.xml for explanation.
|
||||
if not StringUtils.IsNullOrEmpty(contentNode._author)
|
||||
videoContentNode.secondaryTitle = contentNode._author
|
||||
if not StringUtils.IsNullOrEmpty(author)
|
||||
videoContentNode.secondaryTitle = author
|
||||
end if
|
||||
|
||||
if not StringUtils.IsNullOrEmpty(thumbnail)
|
||||
m.backgroundPosterSmall.uri = thumbnail
|
||||
end if
|
||||
|
||||
StartVideoContentTask(videoContentNode)
|
||||
@@ -93,7 +88,7 @@ function StartVideoContentTask(videoContentNode as object)
|
||||
|
||||
m.loadingLabel.text = Tr(Locale.VideoPlayer.Loading)
|
||||
m.loadingPercentLabel.text = ""
|
||||
m.loadingSpinner.visible = true
|
||||
m.loadingUi.visible = true
|
||||
m.loadingSpinner.control = "start"
|
||||
|
||||
m.videoContentTask = AsyncTask.Start(Tasks.VideoContentTaskDev, {
|
||||
@@ -101,6 +96,7 @@ function StartVideoContentTask(videoContentNode as object)
|
||||
secondaryTitleLabel: m.secondaryTitleLabel
|
||||
content: videoContentNode
|
||||
invidious: m.top.invidious
|
||||
backgroundPoster: m.backgroundPoster
|
||||
}, OnVideoContentTaskResults)
|
||||
end function
|
||||
|
||||
@@ -145,22 +141,44 @@ function OnClose()
|
||||
m.top.dispose = true
|
||||
end function
|
||||
|
||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
m.hideVideoUiTimer.control = "stop"
|
||||
m.hideVideoUiTimer.control = "start"
|
||||
if ShowVideoUi()
|
||||
return true
|
||||
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||
if press = false
|
||||
return false
|
||||
end if
|
||||
|
||||
state = m.top.state
|
||||
uiState = m.top.playerUiState
|
||||
|
||||
if key = RemoteKeys.Play
|
||||
if state = "paused" and uiState = PlayerUiState.Hidden
|
||||
' If we pressed play and the state is paused, the player is about to resume.
|
||||
' Return false to let the default behavior resume video.
|
||||
return false
|
||||
end if
|
||||
end if
|
||||
|
||||
if key = RemoteKeys.Play or key = RemoteKeys.PlayOnly
|
||||
if state = "playing" and uiState = PlayerUiState.Hidden
|
||||
' If we pressed play and the state is playing, the player is about to pause.
|
||||
' Return false to let the default behavior pause video.
|
||||
m.top.playerUiState = PlayerUiState.FadingIn
|
||||
return false
|
||||
end if
|
||||
end if
|
||||
|
||||
if uiState = PlayerUiState.Visible
|
||||
StartHideVideoUiTimer()
|
||||
end if
|
||||
|
||||
if uiState = PlayerUiState.Hidden or uiState = PlayerUiState.FadingOut
|
||||
m.top.playerUiState = PlayerUiState.FadingIn
|
||||
end if
|
||||
|
||||
if NavigationKeyHandler(key, press).handled
|
||||
return true
|
||||
end if
|
||||
|
||||
if press = false
|
||||
return false
|
||||
end if
|
||||
|
||||
if key = "back"
|
||||
if key = RemoteKeys.Back
|
||||
m.videoQueue.closePlayer = true
|
||||
return true
|
||||
end if
|
||||
@@ -201,7 +219,7 @@ function OnPlayerStateChange() as void
|
||||
state = m.top.state
|
||||
|
||||
if state = "stopping" or state = "stopped"
|
||||
m.videoUi.Visible = false
|
||||
m.videoUi.visible = false
|
||||
return
|
||||
end if
|
||||
|
||||
@@ -220,10 +238,14 @@ function OnPlayerStateChange() as void
|
||||
if state = "buffering"
|
||||
m.loadingLabel.text = Tr(Locale.VideoPlayer.Buffering)
|
||||
m.loadingSpinner.control = "start"
|
||||
m.loadingSpinner.visible = true
|
||||
m.loadingUi.visible = true
|
||||
m.backgroundPoster.visible = true
|
||||
m.backgroundPosterSmall.visible = true
|
||||
else
|
||||
m.loadingSpinner.control = "stop"
|
||||
m.loadingSpinner.visible = false
|
||||
m.loadingUi.visible = false
|
||||
m.backgroundPoster.visible = false
|
||||
m.backgroundPosterSmall.visible = false
|
||||
end if
|
||||
end function
|
||||
|
||||
@@ -246,142 +268,8 @@ function OnProgress() as void
|
||||
m.trickPlayBar.progress = m.top.position / duration
|
||||
end function
|
||||
|
||||
function OnHideVideoUiTimer()
|
||||
HideVideoUi()
|
||||
end function
|
||||
|
||||
function OnDispose()
|
||||
m.fadeAnimation.control = "stop"
|
||||
m.hideVideoUiTimer.control = "stop"
|
||||
m.fullScreenHintTimer.control = "stop"
|
||||
m.loadingSpinner.control = "stop"
|
||||
m.clock.dispose = true
|
||||
ShutDownPitctureInPicture()
|
||||
ShutDownPlayerUi()
|
||||
DisposeObservers()
|
||||
end function
|
||||
|
||||
function SetupLoadingSpinner()
|
||||
m.loadingSpinner = m.top.findNode("LoadingSpinner")
|
||||
poster = m.loadingSpinner.poster
|
||||
|
||||
size = 150
|
||||
poster.width = size
|
||||
poster.height = size
|
||||
centerx = (1280 - size) / 2
|
||||
centery = (720 - size) / 2
|
||||
m.loadingSpinner.translation = [centerx, centery]
|
||||
poster.opacity = 0.8
|
||||
poster.uri = "pkg:/images/spinner.png"
|
||||
|
||||
m.loadingLabel = m.loadingSpinner.findNode("LoadingLabel")
|
||||
m.loadingPercentLabel = m.loadingSpinner.findNode("LoadingPercentLabel")
|
||||
end function
|
||||
|
||||
function SetupMinimizeAnimation()
|
||||
m.fullScreenHint = m.top.findNode("fullScreenHint")
|
||||
m.fullScreenHintLabel = m.top.findNode("fullScreenHintLabel")
|
||||
m.fullScreenHintTimer = m.top.findNode("fullScreenHintTimer")
|
||||
DisposableObserveFieldScoped(m.fullScreenHintTimer, "fire", FuncName(OnFullScreenHintTimer))
|
||||
|
||||
m.minimizeAnimation = m.top.findNode("minimizeAnimation")
|
||||
m.widthInterpolator = m.top.findNode("widthInterpolator")
|
||||
m.heightInterpolator = m.top.findNode("heightInterpolator")
|
||||
m.translationInterpolator = m.top.findNode("translationInterpolator")
|
||||
|
||||
minRect = m.top.minRect
|
||||
maxRect = m.top.maxRect
|
||||
|
||||
m.widthInterpolator.keyValue = [maxRect.width, (maxRect.width + minRect.width) / 2, minRect.width]
|
||||
m.heightInterpolator.keyValue = [maxRect.height, (maxRect.height + minRect.height) / 2, minRect.height]
|
||||
maxTranslation = [maxRect.x, maxRect.y]
|
||||
minTranslation = [minRect.x, minRect.y]
|
||||
midTranslation = [(maxRect.x + minRect.x) / 2, (maxRect.y + minRect.y) / 2]
|
||||
m.translationInterpolator.keyValue = [maxTranslation, midTranslation, minTranslation]
|
||||
|
||||
fullscreen = m.container.fullscreen
|
||||
rect = fullscreen ? maxRect : minRect
|
||||
|
||||
m.top.width = rect.width
|
||||
m.top.height = rect.height
|
||||
m.top.translation = [rect.x, rect.y]
|
||||
|
||||
m.fullScreenHint.width = minRect.width
|
||||
m.fullScreenHintLabel.width = minRect.width
|
||||
m.fullScreenHint.translation = [0, minRect.height - m.fullScreenHint.height]
|
||||
|
||||
m.top.showFullScreenHint = not fullscreen
|
||||
m.videoUi.visible = fullscreen
|
||||
|
||||
DisposableObserveFieldScoped(m.container, "fullscreen", FuncName(OnFullScreenChange))
|
||||
end function
|
||||
|
||||
function OnFullScreenChange()
|
||||
fullscreen = m.container.fullscreen
|
||||
|
||||
m.widthInterpolator.reverse = fullscreen
|
||||
m.heightInterpolator.reverse = fullscreen
|
||||
m.translationInterpolator.reverse = fullscreen
|
||||
m.minimizeAnimation.control = "start"
|
||||
|
||||
m.videoUi.visible = fullscreen
|
||||
m.top.showFullScreenHint = not fullscreen
|
||||
end function
|
||||
|
||||
function OnFullScreenHintTimer()
|
||||
showFullScreenHint = m.top.showFullScreenHint
|
||||
m.fullScreenHint.visible = showFullScreenHint
|
||||
if showFullScreenHint
|
||||
m.top.showFullScreenHint = false
|
||||
end if
|
||||
end function
|
||||
|
||||
function OnShowFullScreenHint() as void
|
||||
m.fullScreenHintTimer.control = "stop"
|
||||
|
||||
if m.container.fullscreen
|
||||
m.fullScreenHint.visible = false
|
||||
return
|
||||
end if
|
||||
|
||||
if m.top.showFullScreenHint
|
||||
' Take 1 second until the shrink animation finishes to show the hint
|
||||
m.fullScreenHintTimer.duration = 1
|
||||
else
|
||||
' Wait 5 seconds then hide the hint
|
||||
m.fullScreenHintTimer.duration = 5
|
||||
end if
|
||||
|
||||
m.fullScreenHintTimer.control = "start"
|
||||
end function
|
||||
|
||||
function ShowVideoUi() as boolean
|
||||
if m.fadeAnimation.state = "stopped"
|
||||
if m.videoUi.opacity = 1
|
||||
return false
|
||||
end if
|
||||
end if
|
||||
|
||||
m.fadeAnimation.control = "stop"
|
||||
m.fadeOpacityInterpolator.reverse = false
|
||||
m.fadeAnimation.control = "start"
|
||||
|
||||
if m.top.hasFocus()
|
||||
NodeSetFocus(m.playButton, true)
|
||||
end if
|
||||
|
||||
return true
|
||||
end function
|
||||
|
||||
function HideVideoUi() as void
|
||||
if m.fadeAnimation.state = "stopped"
|
||||
if m.videoUi.opacity = 0
|
||||
return
|
||||
end if
|
||||
end if
|
||||
m.fadeAnimation.control = "stop"
|
||||
m.fadeOpacityInterpolator.reverse = true
|
||||
m.fadeAnimation.control = "start"
|
||||
|
||||
if m.top.isInFocusChain()
|
||||
NodeSetFocus(m.top, true)
|
||||
end if
|
||||
end function
|
||||
@@ -13,8 +13,9 @@
|
||||
<field id="previousPlayer" type="node" />
|
||||
<field id="minRect" type="rect2D" value="[834,460,426,240]" />
|
||||
<field id="maxRect" type="rect2D" value="[0,0,1280,720]" />
|
||||
<field id="showFullScreenHint" type="boolean" alwaysNotify="true" onChange="OnShowFullScreenHint" />
|
||||
<field id="close" type="boolean" alwaysNotify="true" onChange="OnClose" />
|
||||
<field id="minimizeState" type="integer" />
|
||||
<field id="playerUiState" type="integer" />
|
||||
<function name="PlayWithContent" />
|
||||
</interface>
|
||||
<children>
|
||||
@@ -25,9 +26,18 @@
|
||||
horizOrigin="right"
|
||||
translation="[1280,0]" />
|
||||
|
||||
<Group id="VideoUI">
|
||||
|
||||
<Group id="TopUI">
|
||||
<Group id="VideoUi">
|
||||
<Poster
|
||||
id="BackgroundPosterSmall"
|
||||
width="1280"
|
||||
height="720"
|
||||
blendColor="0x323232" />
|
||||
<Poster
|
||||
id="BackgroundPoster"
|
||||
width="1280"
|
||||
height="720"
|
||||
blendColor="0x323232" />
|
||||
<Group id="TopUi">
|
||||
<Poster
|
||||
uri="pkg:/images/black-gradient.png"
|
||||
opacity="0.8"
|
||||
@@ -86,11 +96,19 @@
|
||||
iconUri="pkg:/images/icons/player/minimize.png" />
|
||||
</LayoutGroup>
|
||||
</Group>
|
||||
<Group>
|
||||
<Group
|
||||
id="LoadingUi"
|
||||
visible="false">
|
||||
<Poster
|
||||
id="LoadingSpinnerBackground"
|
||||
width="80"
|
||||
height="80"
|
||||
uri="pkg:/images/white-circle.png"
|
||||
opacity="0.4"
|
||||
blendColor="0x000000" />
|
||||
<BusySpinner
|
||||
id="LoadingSpinner"
|
||||
spinInterval="1"
|
||||
visible="false">
|
||||
spinInterval="1">
|
||||
<Label
|
||||
id="LoadingPercentLabel"
|
||||
horizAlign="center"
|
||||
@@ -115,11 +133,11 @@
|
||||
</Group>
|
||||
|
||||
<Timer id="HideVideoUiTimer" duration="3" />
|
||||
<Animation id="FadeAnimation" duration="0.3" optional="true">
|
||||
<FloatFieldInterpolator id="FadeOpacityInterpolator" key="[0.0, 0.5, 1.0]" keyValue="[0.0, 0.5, 1.0]" fieldToInterp="VideoUI.opacity" />
|
||||
<Animation id="UiFadeAnimation" duration="0.3" optional="true">
|
||||
<FloatFieldInterpolator id="UiFadeOpacityInterpolator" key="[0.0, 0.5, 1.0]" keyValue="[0.0, 0.5, 1.0]" fieldToInterp="VideoUi.opacity" />
|
||||
</Animation>
|
||||
|
||||
<Animation id="minimizeAnimation" duration="0.3" optional="true">
|
||||
<Animation id="minimizeAnimation" duration="0.2" optional="true">
|
||||
<FloatFieldInterpolator id="widthInterpolator" key="[0.0, 0.5, 1.0]" fieldToInterp="VideoPlayer.width" />
|
||||
<FloatFieldInterpolator id="heightInterpolator" key="[0.0, 0.5, 1.0]" fieldToInterp="VideoPlayer.height" />
|
||||
<Vector2DFieldInterpolator id="translationInterpolator" key="[0.0, 0.5, 1.0]" fieldToInterp="VideoPlayer.translation" />
|
||||
|
||||
@@ -5,6 +5,7 @@ import "pkg:/source/utils/DisposableObserve.bs"
|
||||
import "pkg:/source/utils/FocusManagement.bs"
|
||||
import "pkg:/source/utils/Locale.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "pkg:/source/utils/RemoteKeys.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
function Init()
|
||||
@@ -16,8 +17,8 @@ function Init()
|
||||
DisposableObserveField(m.clearButton, "buttonSelected", FuncName(OnClearButtonSelected))
|
||||
DisposableObserveField(m.queueList, "itemSelected", FuncName(OnItemSelected))
|
||||
|
||||
SetNavigation(m.queueList, "up", m.clearButton)
|
||||
SetNavigation(m.clearButton, "down", m.queueList)
|
||||
SetNavigation(m.queueList, RemoteKeys.Up, m.clearButton)
|
||||
SetNavigation(m.clearButton, RemoteKeys.Down, m.queueList)
|
||||
|
||||
m.videosDetailsToLoad = []
|
||||
end function
|
||||
@@ -48,16 +49,18 @@ function OnContentSet() as void
|
||||
end if
|
||||
|
||||
index = content.index
|
||||
videoCount = content.getChildCount()
|
||||
if IsInt(index) and index <> -1
|
||||
m.queueLabel.text = Tr(Locale.VideoQueue.Queue) + ` (${index + 1}/${content.getChildCount()})`
|
||||
m.queueLabel.text = Tr(Locale.VideoQueue.Queue) + ` (${index + 1}/${videoCount})`
|
||||
else
|
||||
m.queueLabel.text = Tr(Locale.VideoQueue.Queue) + ` (${content.getChildCount()})`
|
||||
m.queueLabel.text = Tr(Locale.VideoQueue.Queue) + ` (${videoCount})`
|
||||
end if
|
||||
|
||||
AdjustFocus(videoCount)
|
||||
LoadVideoDetailsIfNeeded()
|
||||
end function
|
||||
|
||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||
if NavigationKeyHandler(key, press).handled
|
||||
return true
|
||||
end if
|
||||
@@ -66,7 +69,7 @@ function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
return false
|
||||
end if
|
||||
|
||||
if key = "back"
|
||||
if key = RemoteKeys.Back
|
||||
Close()
|
||||
return true
|
||||
end if
|
||||
@@ -145,6 +148,14 @@ function LoadVideoDetailsIfNeeded() as void
|
||||
})
|
||||
end function
|
||||
|
||||
function AdjustFocus(videoCount as integer)
|
||||
hasVideos = videoCount > 0
|
||||
if not hasVideos and m.queueList.hasFocus()
|
||||
NodeSetFocus(m.clearButton, true)
|
||||
end if
|
||||
m.queueList.focusable = hasVideos
|
||||
end function
|
||||
|
||||
function OnDispose()
|
||||
m.queueList.content = invalid
|
||||
DisposeObservers()
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Http
|
||||
m.SetState(Http.HttpConnectionState.RECV_REQUEST)
|
||||
m.client = m.socket.getReceivedFromAddress().getAddress()
|
||||
|
||||
LogInfo("accepted connection @" + m.client)
|
||||
LogDebug("accepted connection @" + m.client)
|
||||
|
||||
' try to read right away rather than going through another iteration
|
||||
' of the poll loop.
|
||||
@@ -162,7 +162,7 @@ namespace Http
|
||||
'info(m,op + " would have blocked @"+m.client)
|
||||
else
|
||||
if m.socket.eSuccess()
|
||||
LogInfo(op + " peer closed @" + m.client)
|
||||
LogDebug(op + " peer closed @" + m.client)
|
||||
else
|
||||
LogError(op + " transfer error @" + m.client, m.socket.status())
|
||||
end if
|
||||
|
||||
@@ -121,7 +121,8 @@ ${m.GeneratedBy()}
|
||||
buf_pos = m.start + m.sent - m.buf_start
|
||||
buf_remaining = m.body_buffer.count() - buf_pos
|
||||
if buf_remaining = 0
|
||||
LogInfo("source buffer is empty")
|
||||
' This is expected if there's an ETag cache hit
|
||||
LogDebug("source buffer is empty")
|
||||
end if
|
||||
req_remaining = m.body_buffer_length - m.sent
|
||||
if buf_remaining > req_remaining
|
||||
|
||||
@@ -6,7 +6,14 @@ namespace Http
|
||||
function MimeType(uri = "" as string) as string
|
||||
map = m.MimeTypes
|
||||
if map = invalid
|
||||
map = ParseJson(ReadAsciiFile("libpkg:/config/mime-types.json5"))
|
||||
json = ReadAsciiFile("libpkg:/config/mime-types.json5")
|
||||
if StringUtils.IsNullOrEmpty(json)
|
||||
return "application/octet-stream"
|
||||
end if
|
||||
map = ParseJson(json)
|
||||
if not IsAssociativeArray(map)
|
||||
return "application/octet-stream"
|
||||
end if
|
||||
m.MimeTypes = map
|
||||
end if
|
||||
ext = m.GetExtension(uri)
|
||||
@@ -29,7 +36,14 @@ namespace Http
|
||||
function HttpTitle(code = 0 as integer) as string
|
||||
map = m.httpCodesMap
|
||||
if map = invalid
|
||||
map = ParseJson(ReadAsciiFile("libpkg:/config/http-codes.json5"))
|
||||
json = ReadAsciiFile("libpkg:/config/http-codes.json5")
|
||||
if StringUtils.IsNullOrEmpty(json)
|
||||
return ""
|
||||
end if
|
||||
map = ParseJson(json)
|
||||
if not IsAssociativeArray(map)
|
||||
return ""
|
||||
end if
|
||||
m.httpCodesMap = map
|
||||
end if
|
||||
return ValidString(map[`${code}`])
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"Deleting system32...",
|
||||
"Updating: 3 hours 32 minutes remaining...",
|
||||
"Asking ChatGPT for humorous loading messages...",
|
||||
"Loading today's sponsor... NordVPN!",
|
||||
"Loading today's sponsor... Just kidding!",
|
||||
"Don't worry, this is normal...",
|
||||
"Don't forget to like and subscribe...",
|
||||
"Shoveling coal into the server...",
|
||||
|
||||
@@ -1,8 +1,404 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.0" language="es_ES" sourcelanguage="en_US">
|
||||
<defaultcodec>UTF-8</defaultcodec>
|
||||
<context>
|
||||
<name>default</name>
|
||||
</context>
|
||||
</TS>
|
||||
<defaultcodec>UTF-8</defaultcodec>
|
||||
<context>
|
||||
<name>default</name>
|
||||
<message>
|
||||
<source>Profile</source>
|
||||
<translation>Perfil</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Search</source>
|
||||
<translation>Buscar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Home</source>
|
||||
<translation>Inicio</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bookmarks</source>
|
||||
<translation>Marcadores</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Settings</source>
|
||||
<translation>Ajustes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Remote</source>
|
||||
<translation>Remoto</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Info</source>
|
||||
<translation>Información</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>OK</source>
|
||||
<translation>De acuerdo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Activate</source>
|
||||
<translation>Activar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>In Use</source>
|
||||
<translation>En uso</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Login</source>
|
||||
<translation>Inicio de sesión</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Logout</source>
|
||||
<translation>Cerrar sesión</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Close</source>
|
||||
<translation>Cerrar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Exit</source>
|
||||
<translation>Salir</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cancel</source>
|
||||
<translation>Cancelar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Filters</source>
|
||||
<translation>Filtros</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Subscriptions</source>
|
||||
<translation>Suscripciones</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Playlists</source>
|
||||
<translation>Listas de reproducción</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Watch history</source>
|
||||
<translation>Ver el historial</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Trending</source>
|
||||
<translation>Tendencias</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Trending - Movies</source>
|
||||
<translation>Tendencias - Películas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Trending - Music</source>
|
||||
<translation>Tendencias - Música</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Trending - Gaming</source>
|
||||
<translation>Tendencias - Juegos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Popular</source>
|
||||
<translation>Popular</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Videos</source>
|
||||
<translation>Vídeos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Shorts</source>
|
||||
<translation>Vídeos cortos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Live</source>
|
||||
<translation>Directos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Releases</source>
|
||||
<translation>Publicaciones</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Podcasts</source>
|
||||
<translation>Podcasts</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Edit</source>
|
||||
<translation>Editar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Save</source>
|
||||
<translation>Guardar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Test instance</source>
|
||||
<translation>Probar instancia</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Subscribe</source>
|
||||
<translation>Suscribirte</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unsubscribe</source>
|
||||
<translation>Cancelar suscripción</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Login to Invidious</source>
|
||||
<translation>Conectarse a Invidious</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>IP address not available</source>
|
||||
<translation>Dirección IP no disponible</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Scan the QR code</source>
|
||||
<translation>Escanear el código QR</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Please note that an Invidious account is different from a YouTube account.</source>
|
||||
<translation>Por favor, ten en cuenta que una cuenta de Invidious es diferente de una cuenta de YouTube.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Do you want to exit Playlet?</source>
|
||||
<translation>¿Quieres salir de Playlet?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sort %1 by</source>
|
||||
<translation>Ordenar %1 por</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Latest</source>
|
||||
<translation>Más reciente</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Oldest</source>
|
||||
<translation>Más antiguo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Date added (newest)</source>
|
||||
<translation>Fecha en que se añadió (más reciente)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Last video added</source>
|
||||
<translation>Último vídeo añadido</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Channel load error</source>
|
||||
<translation>Error al cargar el canal</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Failed to load channel %1</source>
|
||||
<translation>Error al cargar el canal %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Playlist load error</source>
|
||||
<translation>Error al carga la lista de reproducción</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Failed to load playlist %1</source>
|
||||
<translation>Error al cargar la lista de reproducción %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No results found</source>
|
||||
<translation>Sin resultados</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>We didn't find any results for your search. Please try again with a different query or different filters.</source>
|
||||
<translation>No hemos encontrado ningún resultado para tu búsqueda. Por favor, inténtalo de nuevo con una consulta diferente o filtros diferentes.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Invidious public instances load error</source>
|
||||
<translation>Error deal carga las instancias públicas de Invidious</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Failed to load Invidious public instances</source>
|
||||
<translation>Error al cargar instancias públicas de Invidious</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Failed to load feed</source>
|
||||
<translation>Fallo al cargar el feed</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>User logged out</source>
|
||||
<translation>Usuario desconectado</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Lounge service setup error</source>
|
||||
<translation>Error de configuración del servicio Lounge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Failed to get screen ID. Please restart Playlet to use the cast function.</source>
|
||||
<translation>No se pudo obtener el ID de tu pantalla. Por favor reinicia Playlet para usar la función de transmitir.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Not a valid screen id: %1</source>
|
||||
<translation>Id de pantalla no válida: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Failed to get lounge token. Please restart Playlet to use the cast function.</source>
|
||||
<translation>No se ha podido obtener el token dela sala. Por favor, reinicia Playlet para utilizar la función de la transmisión.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Failed to get session data. Please restart Playlet to use the cast function.</source>
|
||||
<translation>No se han podido obtener los datos de la sesión. Por favor, reinicia Playlet para utilizar la función de transmisión.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Invalid response: %1</source>
|
||||
<translation>Respuesta no válida: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Invidious custom instance</source>
|
||||
<translation>Instancia personalizada de Invidious</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Or</source>
|
||||
<translation>O</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Invidious public instances</source>
|
||||
<translation>Instancias públicas de Invidious</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Move up</source>
|
||||
<translation>Subir</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Move down</source>
|
||||
<translation>Bajar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>name</source>
|
||||
<translation>nombre</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>version</source>
|
||||
<translation>versión</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>users</source>
|
||||
<translation>usuarios</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>signup</source>
|
||||
<translation>inscríbete</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>location</source>
|
||||
<translation>ubicación</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>health</source>
|
||||
<translation>salud</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Yes</source>
|
||||
<translation>Sí</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No</source>
|
||||
<translation>No</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Success</source>
|
||||
<translation>Éxito</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Play next video</source>
|
||||
<translation>Reproducir el siguiente vídeo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Clear</source>
|
||||
<translation>Limpiar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Test</source>
|
||||
<translation>Prueba</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Testing %1</source>
|
||||
<translation>Probando %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Status</source>
|
||||
<translation>Estado</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Test duration</source>
|
||||
<translation>Duración de la prueba</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Details</source>
|
||||
<translation>Detalles</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Valid URL</source>
|
||||
<translation>URL verificada</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Fetch video details</source>
|
||||
<translation>Obtener detalles del vídeo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Instance reachable</source>
|
||||
<translation>Instancia accesible</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Fetch video comments</source>
|
||||
<translation>Obtener comentarios del video</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Fetch video captions</source>
|
||||
<translation>Obtener subtítulos del video</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Fetch video thumbnails</source>
|
||||
<translation>Obtener miniaturas del video</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Url must start with http:// or https://</source>
|
||||
<translation>La URL debe comenzar con http:// o https://</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Press 'OK' for details</source>
|
||||
<translation>Presiona 'De acuerdo' para más detalles</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The url seems to be of a valid format</source>
|
||||
<translation>La URL parece tener un formato válido</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Invalid JSON from %1 (couldn't read %2)</source>
|
||||
<translation>JSON no válido para %1 (no se pudo leer %2)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>It looks like you are logged in to Invidious, but do not have the required permissions.\nFor that reason, we have logged you out from the following profiles: %1\nPlease log in again.\nThis can happen when Playlet is updated with new features.\nWe apologize for the inconvenience.</source>
|
||||
<translation>Parece que has iniciado sesión en Invidious, pero no tienes los permisos necesarios.\nPor este motivo, hemos cerrado tu sesión en los siguientes perfiles: %1\nPor favor, inicia sesión de nuevo.\nEsto puede suceder cuando Playlet se actualiza con nuevas características.\nDisculpa las molestias.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Refresh</source>
|
||||
<translation>Recargar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Login to Invidious in order to view Subscriptions, Playlists, and use the Watch history.</source>
|
||||
<translation>Inicia sesión en Invidious para ver las suscripciones, las listas de reproducción y utilizar el historial.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Fetch with CORS</source>
|
||||
<translation>Obtener con CORS</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Url must not end with /</source>
|
||||
<translation>La URL no debe terminar con /</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Invalid JSON from %1</source>
|
||||
<translation>JSON no válido para %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The instance is reachable and running %1 version %2</source>
|
||||
<translation>La instancia es accesible y está utilizando %1 versión %2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The instance can fetch video details for ID %1 (%2)</source>
|
||||
<translation>La instancia puede obtener detalles del video para ID %1 (%2)</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -2,10 +2,11 @@ title=PlayletLib
|
||||
|
||||
# Do not update version manually, it is auto updated from package.json
|
||||
major_version=0
|
||||
minor_version=24
|
||||
minor_version=25
|
||||
build_version=00005
|
||||
|
||||
ui_resolutions=hd
|
||||
uri_resolution_autosub=$$RES$$,480p,720p,1080p
|
||||
|
||||
sg_component_libs_provided=PlayletLib
|
||||
hidden=1
|
||||
|
||||
@@ -11,9 +11,9 @@ namespace QrCode
|
||||
function Generate(text as string, size as integer, padding as integer, mode = QrCode.QrMode.Byte as QrCode.QrMode) as string
|
||||
fileName = m.GetFileName(text, mode, size, padding)
|
||||
|
||||
#if DEBUG
|
||||
#if DISABLE_CACHE
|
||||
#else
|
||||
#if DISABLE_CACHE
|
||||
#if DEBUG
|
||||
#else
|
||||
fs = CreateObject("roFileSystem")
|
||||
if fs.exists(fileName)
|
||||
|
||||
@@ -16,9 +16,9 @@ namespace Tests
|
||||
node1 = CreateObject("roSGNode", "Node")
|
||||
node2 = CreateObject("roSGNode", "Node")
|
||||
|
||||
m.top@.SetNavigation(node1, "right", node2)
|
||||
m.top@.SetNavigation(node1, RemoteKeys.Right, node2)
|
||||
|
||||
m.assertAAHasKey(m.node._navigation, "right")
|
||||
m.assertAAHasKey(m.node._navigation, RemoteKeys.Right)
|
||||
end function
|
||||
|
||||
@it("navigates to the right node")
|
||||
@@ -26,12 +26,12 @@ namespace Tests
|
||||
node1 = CreateObject("roSGNode", "Node")
|
||||
node2 = CreateObject("roSGNode", "Node")
|
||||
|
||||
m.top@.SetNavigation(node1, "right", node2)
|
||||
m.top@.SetNavigation(node1, RemoteKeys.Right, node2)
|
||||
|
||||
NodeSetFocus(node1, true)
|
||||
node2.focusable = true
|
||||
|
||||
m.top@.NavigationKeyHandler("right", true)
|
||||
m.top@.NavigationKeyHandler(RemoteKeys.Right, true)
|
||||
|
||||
m.assertFalse(node1.hasFocus())
|
||||
m.assertTrue(node2.hasFocus())
|
||||
@@ -41,11 +41,11 @@ namespace Tests
|
||||
function _()
|
||||
node2 = CreateObject("roSGNode", "Node")
|
||||
|
||||
m.top@.SetNavigation(invalid, "right", node2)
|
||||
m.top@.SetNavigation(invalid, RemoteKeys.Right, node2)
|
||||
|
||||
node2.focusable = true
|
||||
|
||||
m.top@.NavigationKeyHandler("right", true)
|
||||
m.top@.NavigationKeyHandler(RemoteKeys.Right, true)
|
||||
|
||||
m.assertTrue(node2.hasFocus())
|
||||
end function
|
||||
|
||||
@@ -87,18 +87,42 @@ class ApplicationInfo
|
||||
|
||||
function GetLibVersion() as string
|
||||
values = m.GetLibManifestValues()
|
||||
if values = invalid
|
||||
return "0.0.0"
|
||||
end if
|
||||
|
||||
Major = values["major_version"].toInt()
|
||||
Minor = values["minor_version"].toInt()
|
||||
Build = values["build_version"].toInt()
|
||||
major = 0
|
||||
minor = 0
|
||||
build = 0
|
||||
|
||||
return `${Major}.${Minor}.${Build}`
|
||||
if values.DoesExist("major_version")
|
||||
value = values["major_version"]
|
||||
if IsString(value)
|
||||
major = value.toInt()
|
||||
end if
|
||||
end if
|
||||
|
||||
if values.DoesExist("minor_version")
|
||||
value = values["minor_version"]
|
||||
if IsString(value)
|
||||
minor = value.toInt()
|
||||
end if
|
||||
end if
|
||||
|
||||
if values.DoesExist("build_version")
|
||||
value = values["build_version"]
|
||||
if IsString(value)
|
||||
build = value.toInt()
|
||||
end if
|
||||
end if
|
||||
|
||||
return `${major}.${minor}.${build}`
|
||||
end function
|
||||
|
||||
function GetLibGitCommitHash() as string
|
||||
values = m.GetLibManifestValues()
|
||||
|
||||
if values.doesexist("git_commit_sha")
|
||||
if values.DoesExist("git_commit_sha")
|
||||
return values["git_commit_sha"]
|
||||
end if
|
||||
return ""
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
' https://developer.roku.com/en-ca/docs/references/scenegraph/component-functions/onkeyevent.md
|
||||
enum RemoteKeys
|
||||
Back = "back"
|
||||
Up = "up"
|
||||
Down = "down"
|
||||
Left = "left"
|
||||
Right = "right"
|
||||
Ok = "OK"
|
||||
Replay = "replay"
|
||||
Play = "play"
|
||||
PlayOnly = "playonly"
|
||||
Rewind = "rewind"
|
||||
FastForward = "fastforward"
|
||||
Options = "options"
|
||||
Pause = "pause"
|
||||
|
||||
' Long press keys - these are not standard, and used to handle long press events
|
||||
OkLongPress = "OK_LONG_PRESS"
|
||||
OptionsLongPress = "OPTIONS_LONG_PRESS"
|
||||
end enum
|
||||
Generated
+904
-701
File diff suppressed because it is too large.
Load diff
+15
-15
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "playlet-web",
|
||||
"version": "0.24.5",
|
||||
"version": "0.25.5",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -9,23 +9,23 @@
|
||||
"check": "svelte-check --tsconfig ./tsconfig.json"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sveltejs/vite-plugin-svelte": "^3.1.1",
|
||||
"@tailwindcss/typography": "^0.5.13",
|
||||
"@sveltejs/vite-plugin-svelte": "^3.1.2",
|
||||
"@tailwindcss/typography": "^0.5.15",
|
||||
"@tsconfig/svelte": "^5.0.4",
|
||||
"@vitejs/plugin-legacy": "^5.4.1",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"@vitejs/plugin-legacy": "^5.4.2",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"daisyui": "^4.12.10",
|
||||
"dotenv": "^16.4.5",
|
||||
"ip": "^2.0.1",
|
||||
"postcss": "^8.4.38",
|
||||
"svelte": "^4.2.18",
|
||||
"svelte-check": "^3.8.4",
|
||||
"svelte-preprocess": "^6.0.1",
|
||||
"tailwindcss": "^3.4.4",
|
||||
"terser": "^5.31.1",
|
||||
"tslib": "^2.6.3",
|
||||
"typescript": "^5.5.2",
|
||||
"vite": "^5.3.2",
|
||||
"vite-tsconfig-paths": "^4.3.2"
|
||||
"postcss": "^8.4.41",
|
||||
"svelte": "^4.2.19",
|
||||
"svelte-check": "^3.8.6",
|
||||
"svelte-preprocess": "^6.0.2",
|
||||
"tailwindcss": "^3.4.10",
|
||||
"terser": "^5.31.6",
|
||||
"tslib": "^2.7.0",
|
||||
"typescript": "^5.5.4",
|
||||
"vite": "^5.4.2",
|
||||
"vite-tsconfig-paths": "^5.0.1"
|
||||
}
|
||||
}
|
||||
@@ -1,2 +1,3 @@
|
||||
# Playlet Brighterscript Plugins
|
||||
|
||||
This is the folder containing different [Brighterscript Plugins](https://github.com/rokucommunity/brighterscript/blob/master/docs/plugins.md) used by Playlet. Find their documentation [here](/docs/plugins.md)
|
||||
@@ -155,7 +155,7 @@ export class LocaleValidationPlugin implements CompilerPlugin {
|
||||
start: { line: 0, character: 0 },
|
||||
end: { line: 0, character: 0 }
|
||||
},
|
||||
message: `Missing keys in enum from ${translationFile}: ${missingKeys.join(', ')}`,
|
||||
message: `Missing keys in enum from ${translationFile.srcPath}: ${missingKeys.join(', ')}`,
|
||||
severity: DiagnosticSeverity.Error,
|
||||
code: 'LOCALE_MISSING_ENUM_KEYS',
|
||||
}]);
|
||||
|
||||
Reference in new issue
Block a user