@krx3d/tizentube2 1.15.930 → 1.15.950
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/dist/service.js +10 -10
- package/dist/userScript.js +1 -1
- package/package.json +1 -1
- package/standalone/index.html +21 -4
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krx3d/tizentube2",
|
|
3
3
|
"appName": "TizenTube",
|
|
4
|
-
"version": "1.15.
|
|
4
|
+
"version": "1.15.950",
|
|
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",
|
package/standalone/index.html
CHANGED
|
@@ -91,6 +91,15 @@
|
|
|
91
91
|
|
|
92
92
|
const serviceId = pkgId + ".StandaloneService";
|
|
93
93
|
|
|
94
|
+
// Bounds the isConnecting poll below. Waiting is preferred over the proxy
|
|
95
|
+
// path — the proxy rewrites YouTube's traffic, which is confirmed to
|
|
96
|
+
// trigger verification challenges that stop playback (see README) — but
|
|
97
|
+
// waiting forever is how a wedged isConnecting became a permanent splash
|
|
98
|
+
// screen. Roughly 30s of patience, then take the degraded path rather
|
|
99
|
+
// than none at all.
|
|
100
|
+
var MAX_CONNECTING_POLLS = 30;
|
|
101
|
+
var connectingPolls = 0;
|
|
102
|
+
|
|
94
103
|
function useInjectorOrProxy() {
|
|
95
104
|
sendLog('INFO', 'useInjectorOrProxy() called, fetching getState');
|
|
96
105
|
const data = tizen.application.getCurrentApplication().getRequestedAppControl().appControl.data;
|
|
@@ -112,16 +121,24 @@
|
|
|
112
121
|
} else if (!res.canConnectToDaemon) {
|
|
113
122
|
sendLog('INFO', 'Taking proxy path, navigating to localhost:8099/tv');
|
|
114
123
|
location.href = `http://localhost:8099/tv?additionalDataUrl=http%3A%2F%2Flocalhost%3A8095%2Fdial%2Fapps%2FYouTube${args ? `&${args}` : ''}`
|
|
115
|
-
} else {
|
|
124
|
+
} else if (connectingPolls < MAX_CONNECTING_POLLS) {
|
|
116
125
|
// canConnectToDaemon && isConnecting: a connection attempt is
|
|
117
126
|
// (or was) already in progress. Neither branch above matched,
|
|
118
127
|
// so previously this silently did nothing — a permanent hang
|
|
119
128
|
// whenever isConnecting got stuck true (e.g. a previous CDP
|
|
120
129
|
// attempt that never completed or failed, confirmed on-device).
|
|
121
|
-
// Poll
|
|
122
|
-
//
|
|
123
|
-
|
|
130
|
+
// Poll rather than give up: injector.js times out a stuck
|
|
131
|
+
// attempt, so the usual outcome is the preferred CDP path.
|
|
132
|
+
connectingPolls++;
|
|
133
|
+
sendLog('INFO', 'canConnectToDaemon but isConnecting, retrying in 1s (' + connectingPolls + '/' + MAX_CONNECTING_POLLS + ')');
|
|
124
134
|
setTimeout(useInjectorOrProxy, 1000);
|
|
135
|
+
} else {
|
|
136
|
+
// Out of patience. isConnecting has stayed true well past
|
|
137
|
+
// injector.js's own give-up point, so nothing is coming —
|
|
138
|
+
// fall back to the proxy instead of sitting on the splash
|
|
139
|
+
// screen indefinitely, which is what this state used to do.
|
|
140
|
+
sendLog('ERROR', 'isConnecting still true after ' + MAX_CONNECTING_POLLS + ' polls, falling back to proxy path');
|
|
141
|
+
location.href = `http://localhost:8099/tv?additionalDataUrl=http%3A%2F%2Flocalhost%3A8095%2Fdial%2Fapps%2FYouTube${args ? `&${args}` : ''}`
|
|
125
142
|
}
|
|
126
143
|
}).catch((err) => {
|
|
127
144
|
sendLog('ERROR', 'getState fetch failed, reloading: ' + (err && err.message || err));
|