@krx3d/tizentube2 1.30.520 → 1.30.540

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@krx3d/tizentube2",
3
3
  "appName": "TizenTube",
4
- "version": "1.30.520",
4
+ "version": "1.30.540",
5
5
  "description": "TizenTube is an ad-free and sponsor-free solution for your favourite streaming website on your Tizen (Samsung) TVs.",
6
6
  "packageType": "mods",
7
7
  "websiteURL": "https://youtube.com/tv?additionalDataUrl=http%3A%2F%2Flocalhost%3A8085%2Fdial%2Fapps%2FYouTube",
@@ -85,10 +85,21 @@
85
85
  } catch (e) { }
86
86
  }
87
87
 
88
- // Stages a start is meant to end at. Anything else as the last entry
89
- // means that start never got anywhere.
88
+ // Stages a start is meant to end at.
90
89
  var TERMINAL_STAGES = ['cdp-handoff', 'proxy-nav'];
91
90
 
91
+ // Below this, a start that stopped short of a decision is the platform
92
+ // replacing the page, not a fault.
93
+ //
94
+ // This read "DIED AT" for any start that did not reach a terminal
95
+ // stage, and a capture showed why that is too eager: a start lasting
96
+ // 741ms and ending at health-ok, twice, in the same minute as one that
97
+ // reached cdp-handoff. That is the documented auto-relaunch — the app
98
+ // hands off, exits, and Tizen starts the launcher again — so the run
99
+ // ends before any decision is recorded and nothing is wrong. Calling
100
+ // that a death would bury the real hang, which sits for minutes.
101
+ var SHORT_START_MS = 10000;
102
+
92
103
  function reportPreviousStart() {
93
104
  try {
94
105
  var all = [];
@@ -96,11 +107,19 @@
96
107
  if (!(all instanceof Array) || !all.length) return;
97
108
  window.localStorage.removeItem(BREADCRUMB_KEY);
98
109
  var last = all[all.length - 1];
99
- var ended = TERMINAL_STAGES.indexOf(last.stage) !== -1;
100
- sendLog(ended ? 'INFO' : 'ERROR',
101
- 'previous start ' + (ended ? 'reached' : 'DIED AT') + ' "' + last.stage + '"'
102
- + ' after ' + last.at + 'ms (' + last.ts + '), ' + all.length + ' stages: '
103
- + JSON.stringify(all));
110
+ var trail = ', ' + all.length + ' stages: ' + JSON.stringify(all);
111
+ if (TERMINAL_STAGES.indexOf(last.stage) !== -1) {
112
+ sendLog('INFO', 'previous start reached "' + last.stage + '" after ' + last.at + 'ms ('
113
+ + last.ts + ')' + trail);
114
+ return;
115
+ }
116
+ if (last.at < SHORT_START_MS) {
117
+ sendLog('INFO', 'previous start ended at "' + last.stage + '" after only ' + last.at
118
+ + 'ms (' + last.ts + '), which is the app being relaunched rather than a fault' + trail);
119
+ return;
120
+ }
121
+ sendLog('ERROR', 'previous start STALLED AT "' + last.stage + '" for ' + last.at + 'ms ('
122
+ + last.ts + ') without reaching a decision' + trail);
104
123
  } catch (e) { }
105
124
  }
106
125
 
@@ -331,6 +350,10 @@
331
350
  function waitForNetworkThen(next) {
332
351
  var started = Date.now();
333
352
  var attempts = 0;
353
+ // On screen this is "Warte auf das Netzwerk…", which is what a
354
+ // stalled start looks like to the user, so the trail says whether
355
+ // it was waiting and for how long.
356
+ breadcrumb('network-wait');
334
357
  var delay = 1000;
335
358
 
336
359
  if (navigator.onLine !== false) {
@@ -390,6 +413,7 @@
390
413
  finished = true;
391
414
  clearTimeout(timer);
392
415
  sendLog('INFO', 'Network ready after ' + (Date.now() - started) + 'ms, ' + attempts + ' check(s)');
416
+ breadcrumb('network-ready', Date.now() - started);
393
417
  next();
394
418
  })
395
419
  .catch(function (e) {