nuvio-tizen 1.8.1 → 1.8.2

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/css/style.css CHANGED
@@ -1,4 +1,7 @@
1
1
  /* Nuvio for Tizen 3.0 — conservative CSS (no CSS grid gap edge cases, flexbox is fine on Chromium 47) */
2
+ /* Sentinel: app.js checks this element's width to confirm the stylesheet applied. */
3
+ #css-sentinel { width: 11px; }
4
+
2
5
  * { box-sizing: border-box; margin: 0; padding: 0; }
3
6
 
4
7
  html, body {
package/index.html CHANGED
@@ -4,9 +4,11 @@
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=1920, height=1080, user-scalable=no">
6
6
  <title>Nuvio</title>
7
- <link rel="stylesheet" href="css/style.css?v=1.8.1">
7
+ <link rel="stylesheet" href="css/style.css?v=1.8.2">
8
8
  </head>
9
9
  <body>
10
+ <!-- CSS-applied sentinel (kept off-screen); app.js waits for its width before rendering -->
11
+ <div id="css-sentinel" style="position:absolute;left:-9999px;top:0;height:1px;overflow:hidden;"></div>
10
12
  <!-- AVPlay video plane (Tizen). Sits behind the UI; shown only during playback. -->
11
13
  <object type="application/avplayer" id="av-player"></object>
12
14
  <!-- HTML5 fallback for desktop/dev testing when webapis.avplay is absent -->
@@ -45,13 +47,13 @@
45
47
 
46
48
  <!-- Load order matters: polyfills -> util -> data -> input -> player -> views -> app -->
47
49
  <!-- ?v= busts the TV webview cache on every release (keep in sync with package.json) -->
48
- <script src="js/polyfills.js?v=1.8.1"></script>
49
- <script src="js/util.js?v=1.8.1"></script>
50
- <script src="js/stremio.js?v=1.8.1"></script>
51
- <script src="js/keys.js?v=1.8.1"></script>
52
- <script src="js/focus.js?v=1.8.1"></script>
53
- <script src="js/player.js?v=1.8.1"></script>
54
- <script src="js/views.js?v=1.8.1"></script>
55
- <script src="js/app.js?v=1.8.1"></script>
50
+ <script src="js/polyfills.js?v=1.8.2"></script>
51
+ <script src="js/util.js?v=1.8.2"></script>
52
+ <script src="js/stremio.js?v=1.8.2"></script>
53
+ <script src="js/keys.js?v=1.8.2"></script>
54
+ <script src="js/focus.js?v=1.8.2"></script>
55
+ <script src="js/player.js?v=1.8.2"></script>
56
+ <script src="js/views.js?v=1.8.2"></script>
57
+ <script src="js/app.js?v=1.8.2"></script>
56
58
  </body>
57
59
  </html>
package/js/app.js CHANGED
@@ -86,7 +86,7 @@ var App = (function () {
86
86
  }
87
87
  }
88
88
 
89
- function start() {
89
+ function actualStart() {
90
90
  Player.init();
91
91
  Keys.init();
92
92
  Keys.setHandler(onKey);
@@ -94,6 +94,30 @@ var App = (function () {
94
94
  Views.renderHome();
95
95
  }
96
96
 
97
+ // On a cold launch the stylesheet fetch can race/fail, leaving the app unstyled.
98
+ // Confirm the CSS applied (sentinel width) before rendering; re-request it if not.
99
+ function start() {
100
+ function styled() {
101
+ var s = document.getElementById('css-sentinel');
102
+ return s && s.offsetWidth === 11;
103
+ }
104
+ function reloadCss() {
105
+ var l = document.createElement('link');
106
+ l.rel = 'stylesheet';
107
+ l.href = 'css/style.css?rl=' + Date.now();
108
+ document.head.appendChild(l);
109
+ }
110
+ if (styled()) { actualStart(); return; }
111
+ var tries = 0;
112
+ reloadCss();
113
+ var iv = setInterval(function () {
114
+ tries++;
115
+ if (styled()) { clearInterval(iv); actualStart(); return; }
116
+ if (tries % 8 === 0) { reloadCss(); } // re-attempt every ~2s
117
+ if (tries > 60) { clearInterval(iv); actualStart(); } // ~15s: render anyway
118
+ }, 250);
119
+ }
120
+
97
121
  return {
98
122
  start: start, back: back,
99
123
  openDetail: openDetail, openSettings: openSettings, openSearch: openSearch,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuvio-tizen",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "description": "Nuvio-style Stremio-addon streaming client for Tizen 3.0+ Samsung TVs (TizenBrew app module).",
5
5
  "packageType": "app",
6
6
  "appName": "Nuvio",