tizenbrew-kodi-live 1.0.0 → 1.0.1

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/index.html CHANGED
@@ -214,13 +214,24 @@
214
214
 
215
215
  var checkTimeout = setTimeout(function() {
216
216
  showError("Tiempo de espera agotado. Verifica que el servidor esté activo en tu PC.");
217
- }, 3500);
217
+ }, 4000);
218
218
 
219
219
  var xhr = new XMLHttpRequest();
220
- xhr.open("HEAD", "http://" + host + "/kodi.html?t=" + Date.now(), true);
220
+ xhr.open("GET", "http://" + host + "/api/tunnel_url?t=" + Date.now(), true);
221
221
  xhr.onload = function() {
222
222
  clearTimeout(checkTimeout);
223
223
  if (xhr.status >= 200 && xhr.status < 400) {
224
+ try {
225
+ var res = JSON.parse(xhr.responseText);
226
+ if (res.url && res.url.indexOf("https://") === 0) {
227
+ statusText.innerText = "¡Conectado! Iniciando Kodi (HTTPS)...";
228
+ spinner.style.display = "none";
229
+ setTimeout(function() {
230
+ window.location.replace(res.url + "/kodi.html");
231
+ }, 150);
232
+ return;
233
+ }
234
+ } catch(e) {}
224
235
  statusText.innerText = "¡Conectado! Iniciando Kodi...";
225
236
  spinner.style.display = "none";
226
237
  setTimeout(function() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tizenbrew-kodi-live",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Kodi Piers WebAssembly Live Dev Launcher for Samsung Tizen TV",
5
5
  "packageType": "app",
6
6
  "appName": "Kodi Live",
@@ -33,4 +33,4 @@
33
33
  "ColorF3Blue",
34
34
  "Info"
35
35
  ]
36
- }
36
+ }
Binary file