@oxymoron.13/tizentube-s95b 0.3.2 → 0.3.3

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/mods/config.js CHANGED
@@ -38,7 +38,7 @@ const defaultConfig = {
38
38
  enablePatchingVideoPlayer: true,
39
39
  enableMPButton: true,
40
40
  enableSwapMPWithPIP: false,
41
- enablePreviews: true,
41
+ enablePreviews: false,
42
42
  enableHideWatchedVideos: false,
43
43
  hideWatchedVideosThreshold: 80,
44
44
  hideWatchedVideosPages: [],
@@ -15,6 +15,8 @@ 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). Wirkt ab dem nächsten Laden der Seite.',
18
20
  mini: 'Mini-Player',
19
21
  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
22
  miniOn: 'Mini-Player anbieten',
@@ -39,6 +41,8 @@ export const STRINGS = Object.freeze({
39
41
  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
42
  exitCancel: 'Cancel', exitNow: 'Yes, exit the app',
41
43
  exitFailed: 'Could not exit. Please use the remote’s Home key.',
44
+ previews: 'Video preview on focus',
45
+ previewsHint: 'Plays a video with sound as soon as a tile is focused (TizenTube feature). Applies from the next page load.',
42
46
  mini: 'Mini player',
43
47
  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
48
  miniOn: 'Offer mini player',
@@ -15,7 +15,7 @@ import { MINI_POSITIONS, MINI_SIZES, MINI_BROWSE } from './s95bMiniPlayer.js';
15
15
  const STATE_KEY = 's95b-perf-edition-v1';
16
16
  const EDITED = ['enablePreviews', 'enableDeArrow', 'enableDeArrowThumbnails'];
17
17
  const VERSION = String(S95B_VERSION_TAG).split(':')[1] || '?';
18
- const defaultState = { lang: 'de', light: false, previous: null };
18
+ const defaultState = { lang: 'de', light: false, previous: null, previewsOff033: false };
19
19
  let state = { ...defaultState };
20
20
 
21
21
  function readState() {
@@ -24,7 +24,8 @@ function readState() {
24
24
  if (data && typeof data === 'object') {
25
25
  state = { ...defaultState,
26
26
  lang: data.lang === 'en' ? 'en' : 'de', light: data.light === true,
27
- previous: data.previous && typeof data.previous === 'object' ? data.previous : null };
27
+ previous: data.previous && typeof data.previous === 'object' ? data.previous : null,
28
+ previewsOff033: data.previewsOff033 === true };
28
29
  }
29
30
  } catch (_) { state = { ...defaultState }; }
30
31
  }
@@ -139,6 +140,8 @@ function buildOptions() {
139
140
  codecMenu(t),
140
141
  qualityMenu(t),
141
142
  miniMenu(),
143
+ // TizenTube's own switch (also in green > misc): plays a video with sound when a tile is focused.
144
+ { name: t('previews'), subtitle: t('previewsHint'), value: 'enablePreviews' },
142
145
  { name: t('light'), subtitle: t('lightHint'), value: 's95bLowOverhead' },
143
146
  exitMenu()
144
147
  ];
@@ -176,7 +179,18 @@ function onConfigChange(event) {
176
179
  } else if (detail.key === 's95bLanguage') { state.lang = detail.value === 'en' ? 'en' : 'de'; save(); }
177
180
  }
178
181
 
182
+ // Once, on the first start of 0.3.3 or later: switch TizenTube's tile previews off (they autoplay with sound).
183
+ // Afterwards the user's choice in the menu is never touched again.
184
+ function previewsOffOnce() {
185
+ if (state.previewsOff033) return;
186
+ if (configRead('enablePreviews') !== false) configWrite('enablePreviews', false);
187
+ if (state.previous && Object.prototype.hasOwnProperty.call(state.previous, 'enablePreviews')) state.previous.enablePreviews = false;
188
+ state.previewsOff033 = true;
189
+ save();
190
+ }
191
+
179
192
  function init() {
193
+ previewsOffOnce();
180
194
  // Menu entries read their current value from the TizenTube config, so mirror our stored state into it first.
181
195
  if (configRead('s95bLowOverhead') !== state.light) configWrite('s95bLowOverhead', state.light);
182
196
  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';
2
+ export const S95B_VERSION_TAG = 's95b-version:0.3.3';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oxymoron.13/tizentube-s95b",
3
- "appName": "TizenTube S95B 0.3.2 (Fork)",
4
- "version": "0.3.2",
3
+ "appName": "TizenTube S95B 0.3.3 (Fork)",
4
+ "version": "0.3.3",
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",