@oxymoron.13/tizentube-s95b 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/S95B-CHANGES.txt +2 -2
- package/S95B-SHA256.txt +5 -0
- package/dist/userScript.js +1 -1
- package/mods/features/s95bI18n.js +8 -2
- package/mods/features/s95bMenu.js +21 -3
- package/mods/features/s95bVersion.js +1 -1
- package/package.json +2 -2
|
@@ -3,7 +3,7 @@ export const STRINGS = Object.freeze({
|
|
|
3
3
|
de: Object.freeze({
|
|
4
4
|
title: 'S95B · Performance', language: 'Sprache', codec: 'Videocodec', quality: 'Standardqualität (alle Videos)',
|
|
5
5
|
automatic: 'Automatisch', light: 'Ressourcenschonender Modus',
|
|
6
|
-
lightHint: 'Schaltet Vorschauen und DeArrow ab
|
|
6
|
+
lightHint: 'Schaltet Vorschauen und DeArrow ab. Beim Ausschalten kommen die vorherigen Werte zurück, außer du hast sie inzwischen selbst geändert. Ändert sich dabei die Vorschau, lädt die Seite neu.',
|
|
7
7
|
codecHint: 'H.264 liefert bei YouTube in der Regel höchstens 1080p; 4K gibt es nur als VP9 oder AV1. Ein Codec wird nur erzwungen, wenn dadurch keine Qualität verloren geht. Gilt ab dem nächsten Video.',
|
|
8
8
|
qualityHint: 'Gilt für alle Videos (YouTubes eigene Zeile „Qualität“ ändert nur das laufende Video). Eine feste Qualität gilt sofort. „Automatisch“ wirkt eventuell erst nach einem Neustart von YouTube.',
|
|
9
9
|
languageHint: 'Gilt für dieses Menü, beim nächsten Öffnen.',
|
|
@@ -15,6 +15,9 @@ export const STRINGS = Object.freeze({
|
|
|
15
15
|
exitHintSignal: 'Die Tizen-Funktion zum Beenden ist hier nicht verfügbar; es wird YouTubes Beenden-Signal versucht (am TV ungeprüft). Sonst die Home-Taste der Fernbedienung benutzen.',
|
|
16
16
|
exitCancel: 'Abbrechen', exitNow: 'Ja, App beenden',
|
|
17
17
|
exitFailed: 'Beenden nicht möglich. Bitte die Home-Taste der Fernbedienung benutzen.',
|
|
18
|
+
previews: 'Video-Vorschau beim Markieren',
|
|
19
|
+
previewsHint: 'Spielt ein Video mit Ton an, sobald eine Kachel markiert ist (TizenTube-Funktion). Nach dem Umschalten lädt die Seite neu (ein laufendes Video wird dabei beendet).',
|
|
20
|
+
reloading: 'Vorschau-Einstellung geändert, Seite wird neu geladen …',
|
|
18
21
|
mini: 'Mini-Player',
|
|
19
22
|
miniHint: 'TizenTubes Mini-Player (Eintrag „MiniPlayer“ im Video-Menü). Änderungen gelten beim nächsten Start des Mini-Players. Ein neu gestartetes Video öffnet im Vollbild und ersetzt den Mini-Player.',
|
|
20
23
|
miniOn: 'Mini-Player anbieten',
|
|
@@ -27,7 +30,7 @@ export const STRINGS = Object.freeze({
|
|
|
27
30
|
en: Object.freeze({
|
|
28
31
|
title: 'S95B · Performance', language: 'Language', codec: 'Video codec', quality: 'Default quality (all videos)',
|
|
29
32
|
automatic: 'Automatic', light: 'Low-overhead mode',
|
|
30
|
-
lightHint: 'Disables previews and DeArrow
|
|
33
|
+
lightHint: 'Disables previews and DeArrow. Switching it off restores the previous values, except those you changed yourself in the meantime. If the preview setting changes, the page reloads.',
|
|
31
34
|
codecHint: 'On YouTube, H.264 usually tops out at 1080p; 4K is only available as VP9 or AV1. A codec is only forced if no quality is lost. Applies from the next video.',
|
|
32
35
|
qualityHint: 'Applies to all videos (YouTube’s own “Quality” row only changes the current video). A fixed quality applies immediately. “Automatic” may only take effect after restarting YouTube.',
|
|
33
36
|
languageHint: 'Applies to this menu, the next time it is opened.',
|
|
@@ -39,6 +42,9 @@ export const STRINGS = Object.freeze({
|
|
|
39
42
|
exitHintSignal: 'The Tizen exit function is not available here; YouTube’s exit signal is tried instead (untested on the TV). Otherwise use the remote’s Home key.',
|
|
40
43
|
exitCancel: 'Cancel', exitNow: 'Yes, exit the app',
|
|
41
44
|
exitFailed: 'Could not exit. Please use the remote’s Home key.',
|
|
45
|
+
previews: 'Video preview on focus',
|
|
46
|
+
previewsHint: 'Plays a video with sound as soon as a tile is focused (TizenTube feature). The page reloads after switching (a playing video is stopped).',
|
|
47
|
+
reloading: 'Preview setting changed, reloading the page …',
|
|
42
48
|
mini: 'Mini player',
|
|
43
49
|
miniHint: 'TizenTube’s mini player (“MiniPlayer” row in the video menu). Changes apply the next time the mini player starts. A newly started video opens full screen and replaces the mini player.',
|
|
44
50
|
miniOn: 'Offer mini player',
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/* S95B Performance Edition – GPL-3.0-only
|
|
2
2
|
* The yellow remote key opens a menu that YouTube itself draws (TizenTube's own optionShow),
|
|
3
3
|
* the same mechanism as the green (settings) and blue (speed) menus. No DOM overlay is added to the page.
|
|
4
|
-
* Uses only existing TizenTube configRead/configWrite APIs. No firmware calls
|
|
4
|
+
* Uses only existing TizenTube configRead/configWrite APIs. No firmware calls or network requests; the only timer
|
|
5
|
+
* is the short delay before the page reloads after the preview setting changed.
|
|
5
6
|
*/
|
|
6
7
|
import { configRead, configWrite, configChangeEmitter } from '../config.js';
|
|
7
8
|
import { optionShow } from '../ui/settings.js';
|
|
@@ -35,6 +36,7 @@ function t(key) { return translate(state.lang, key); }
|
|
|
35
36
|
|
|
36
37
|
|
|
37
38
|
// Low-overhead mode: switches off a few TizenTube features and remembers the previous values.
|
|
39
|
+
// Switching it off restores only switches that are still off: anything changed by hand in the meantime is kept.
|
|
38
40
|
function turnLight(enable) {
|
|
39
41
|
if (enable === state.light) return;
|
|
40
42
|
if (enable) {
|
|
@@ -45,7 +47,7 @@ function turnLight(enable) {
|
|
|
45
47
|
state.light = true;
|
|
46
48
|
} else {
|
|
47
49
|
if (state.previous) EDITED.forEach(key => {
|
|
48
|
-
if (Object.prototype.hasOwnProperty.call(state.previous, key)) {
|
|
50
|
+
if (Object.prototype.hasOwnProperty.call(state.previous, key) && configRead(key) === false) {
|
|
49
51
|
configWrite(key, state.previous[key]);
|
|
50
52
|
}
|
|
51
53
|
});
|
|
@@ -139,6 +141,8 @@ function buildOptions() {
|
|
|
139
141
|
codecMenu(t),
|
|
140
142
|
qualityMenu(t),
|
|
141
143
|
miniMenu(),
|
|
144
|
+
// TizenTube's own switch (also in green > misc): plays a video with sound when a tile is focused.
|
|
145
|
+
{ name: t('previews'), subtitle: t('previewsHint'), value: 'enablePreviews' },
|
|
142
146
|
{ name: t('light'), subtitle: t('lightHint'), value: 's95bLowOverhead' },
|
|
143
147
|
exitMenu()
|
|
144
148
|
];
|
|
@@ -165,10 +169,23 @@ function onKeys(e) {
|
|
|
165
169
|
}
|
|
166
170
|
}
|
|
167
171
|
|
|
172
|
+
// Tile previews: YouTube reads TizenTube's preview switch while it builds the page and tiles, so a change while the
|
|
173
|
+
// page is running leaves a half-switched state. Reload once the value really differs from the one the page loaded with
|
|
174
|
+
// (yellow menu, green menu or low-overhead mode). TizenBrew injects the module again into the reloaded page.
|
|
175
|
+
let previewsAtLoad;
|
|
176
|
+
let reloadPending = false;
|
|
177
|
+
function reloadForPreviews(value) {
|
|
178
|
+
if (reloadPending || value === previewsAtLoad) return;
|
|
179
|
+
reloadPending = true;
|
|
180
|
+
try { showToast('TizenTube', t('reloading')); } catch (_) { /* reload anyway */ }
|
|
181
|
+
setTimeout(() => window.location.reload(), 1500);
|
|
182
|
+
}
|
|
183
|
+
|
|
168
184
|
function onConfigChange(event) {
|
|
169
185
|
const detail = event && event.detail;
|
|
170
186
|
if (!detail) return;
|
|
171
|
-
if (detail.key === '
|
|
187
|
+
if (detail.key === 'enablePreviews') reloadForPreviews(detail.value);
|
|
188
|
+
else if (detail.key === 's95bLowOverhead') turnLight(detail.value === true);
|
|
172
189
|
else if (detail.key === 's95bExit') {
|
|
173
190
|
if (detail.value !== 'now') return;
|
|
174
191
|
configWrite('s95bExit', 'no'); // never leave "now" stored
|
|
@@ -177,6 +194,7 @@ function onConfigChange(event) {
|
|
|
177
194
|
}
|
|
178
195
|
|
|
179
196
|
function init() {
|
|
197
|
+
previewsAtLoad = configRead('enablePreviews');
|
|
180
198
|
// Menu entries read their current value from the TizenTube config, so mirror our stored state into it first.
|
|
181
199
|
if (configRead('s95bLowOverhead') !== state.light) configWrite('s95bLowOverhead', state.light);
|
|
182
200
|
if (configRead('s95bLanguage') !== state.lang) configWrite('s95bLanguage', state.lang);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by create-fork.mjs from the kit's VERSION file. Do not edit.
|
|
2
|
-
export const S95B_VERSION_TAG = 's95b-version:0.3.
|
|
2
|
+
export const S95B_VERSION_TAG = 's95b-version:0.3.4';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxymoron.13/tizentube-s95b",
|
|
3
|
-
"appName": "TizenTube S95B 0.3.
|
|
4
|
-
"version": "0.3.
|
|
3
|
+
"appName": "TizenTube S95B 0.3.4 (Fork)",
|
|
4
|
+
"version": "0.3.4",
|
|
5
5
|
"description": "Unofficial fork of TizenTube (@foxreis/tizentube) for TizenBrew: reversible performance profile, German/English settings, smaller bundle.",
|
|
6
6
|
"packageType": "mods",
|
|
7
7
|
"websiteURL": "https://youtube.com/tv?additionalDataUrl=http%3A%2F%2Flocalhost%3A8085%2Fdial%2Fapps%2FYouTube",
|