@officebeats/matrix-iptv-cli 4.0.17 → 4.0.20

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/debug_redirect.py DELETED
@@ -1,22 +0,0 @@
1
- import requests
2
-
3
- url_ts = "http://zfruvync.duperab.xyz/live/PE1S9S8U/11EZZUMW/53504.ts"
4
- url_m3u8 = "http://zfruvync.duperab.xyz/live/PE1S9S8U/11EZZUMW/53504.m3u8"
5
- headers = {
6
- "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
7
- }
8
-
9
- def check(name, u):
10
- print(f"Checking {name}...")
11
- try:
12
- r = requests.head(u, headers=headers, allow_redirects=False, timeout=5)
13
- print(f"Status: {r.status_code}")
14
- if 'Location' in r.headers:
15
- print(f"Location: {r.headers['Location']}")
16
- else:
17
- print("No Location header")
18
- except Exception as e:
19
- print(f"Error: {e}")
20
-
21
- check("TS", url_ts)
22
- check("M3U8", url_m3u8)
package/debug_stream.py DELETED
@@ -1,28 +0,0 @@
1
- import requests
2
- import sys
3
-
4
- url = "http://zfruvync.duperab.xyz/live/PE1S9S8U/11EZZUMW/53504.ts"
5
- headers = {
6
- "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
7
- "Referer": "http://zfruvync.duperab.xyz/"
8
- }
9
-
10
- print(f"Testing URL: {url}")
11
- try:
12
- with requests.get(url, headers=headers, stream=True, timeout=10) as r:
13
- print(f"Status Code: {r.status_code}")
14
- print("Headers:")
15
- for k, v in r.headers.items():
16
- print(f" {k}: {v}")
17
-
18
- if r.status_code == 200:
19
- print("\nReading first 64 bytes...")
20
- chunk = next(r.iter_content(chunk_size=64))
21
- print(f"Bytes len: {len(chunk)}")
22
- if len(chunk) > 0:
23
- print("SUCCESS: Stream is alive!")
24
- else:
25
- print(f"\nFAILURE: Server returned {r.status_code}")
26
-
27
- except Exception as e:
28
- print(f"\nEXCEPTION: {e}")
Binary file
package/index.html DELETED
@@ -1,246 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Matrix IPTV PWA</title>
7
- <script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
8
- <style>
9
- body {
10
- background-color: #0d0208;
11
- color: #00ff41;
12
- font-family: "Courier New", Courier, monospace;
13
- margin: 0;
14
- padding: 0;
15
- overflow: hidden;
16
- display: flex;
17
- flex-direction: column;
18
- height: 100vh;
19
- }
20
- #terminal {
21
- flex: 1;
22
- white-space: pre;
23
- padding: 5px;
24
- font-size: 1.8vw; /* Responsive font size */
25
- line-height: 1.1;
26
- overflow: hidden;
27
- border-bottom: 1px solid #003b00;
28
- touch-action: none; /* Prevent browser scrolling to allow custom touch gestures */
29
- }
30
- #video-container {
31
- width: 100%;
32
- background: #000;
33
- display: none;
34
- position: relative; /* ensure overlay positioning works */
35
- aspect-ratio: 16 / 9;
36
- border-top: 2px solid #00ff41;
37
- box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
38
- }
39
- video {
40
- width: 100%;
41
- height: 100%;
42
- outline: none;
43
- }
44
- #video-close {
45
- position: absolute;
46
- top: 10px;
47
- right: 10px;
48
- background: rgba(13, 2, 8, 0.8);
49
- color: #00ff41;
50
- border: 1px solid #00ff41;
51
- padding: 8px 12px;
52
- cursor: pointer;
53
- z-index: 10;
54
- font-weight: bold;
55
- font-family: inherit;
56
- backdrop-filter: blur(4px);
57
- transition: all 0.2s ease;
58
- }
59
- #video-close:hover {
60
- background: #00ff41;
61
- color: #0d0208;
62
- box-shadow: 0 0 10px #00ff41;
63
- }
64
- .mobile-controls {
65
- display: none;
66
- position: absolute;
67
- bottom: 20px;
68
- left: 0;
69
- width: 100%;
70
- justify-content: center;
71
- gap: 10px;
72
- z-index: 10;
73
- opacity: 0.7;
74
- }
75
- .ctrl-btn {
76
- background: rgba(13, 2, 8, 0.8);
77
- border: 1px solid #00ff41;
78
- color: #00ff41;
79
- padding: 10px 15px;
80
- font-weight: bold;
81
- border-radius: 5px;
82
- }
83
- @media (min-width: 1024px) {
84
- #terminal {
85
- font-size: 14px;
86
- line-height: 16px;
87
- }
88
- #video-container {
89
- position: absolute;
90
- bottom: 20px;
91
- right: 20px;
92
- width: 480px;
93
- border: 2px solid #00ff41;
94
- box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
95
- }
96
- }
97
- @media (max-width: 1023px) {
98
- .mobile-controls {
99
- display: flex;
100
- }
101
- }
102
- </style>
103
- </head>
104
- <body>
105
- <div id="terminal">Loading Matrix Interface...</div>
106
- <div class="mobile-controls">
107
- <!-- Added explicit back button for easy exit on mobile without gestures -->
108
- <button
109
- class="ctrl-btn"
110
- onclick="
111
- document.dispatchEvent(
112
- new KeyboardEvent('keydown', { key: 'Escape' }),
113
- )
114
- "
115
- >
116
- ESC / BACK
117
- </button>
118
- </div>
119
- <div id="video-container">
120
- <button id="video-close" onclick="closeVideo()">[ X ] CLOSE</button>
121
- <video id="video" controls playsinline></video>
122
- </div>
123
-
124
- <script>
125
- // Global function for Wasm to call
126
- window.playStream = function (url) {
127
- console.log("[JS] Playing:", url);
128
- const video = document.getElementById("video");
129
- const container = document.getElementById("video-container");
130
- container.style.display = "block";
131
-
132
- if (Hls.isSupported()) {
133
- const hls = new Hls();
134
- hls.loadSource(url);
135
- hls.attachMedia(video);
136
- hls.on(Hls.Events.MANIFEST_PARSED, function () {
137
- video.play();
138
- });
139
- } else if (video.canPlayType("application/vnd.apple.mpegurl")) {
140
- // Native HLS support (Safari)
141
- video.src = url;
142
- video.addEventListener("loadedmetadata", function () {
143
- video.play();
144
- });
145
- }
146
- };
147
-
148
- window.closeVideo = function () {
149
- const video = document.getElementById("video");
150
- video.pause();
151
- video.src = "";
152
- document.getElementById("video-container").style.display = "none";
153
- };
154
- </script>
155
-
156
- <script type="module">
157
- import init, { WasmClient } from "./pkg/matrix_iptv.js";
158
-
159
- async function run() {
160
- try {
161
- await init();
162
- const client = new WasmClient();
163
- const terminal = document.getElementById("terminal");
164
-
165
- // Render Loop
166
- function step() {
167
- const output = client.draw();
168
- terminal.textContent = output;
169
- requestAnimationFrame(step);
170
- }
171
- requestAnimationFrame(step);
172
-
173
- // Input Handling
174
- document.addEventListener("keydown", (event) => {
175
- if (
176
- [
177
- "ArrowUp",
178
- "ArrowDown",
179
- "ArrowLeft",
180
- "ArrowRight",
181
- "Space",
182
- ].includes(event.code)
183
- ) {
184
- event.preventDefault();
185
- }
186
- client.handle_key(event.key);
187
- });
188
-
189
- // Touch Input Handling Setup
190
- let touchStartX = 0;
191
- let touchStartY = 0;
192
- let touchStartT = 0;
193
-
194
- document.addEventListener(
195
- "touchstart",
196
- (e) => {
197
- if (
198
- e.target.tagName.toLowerCase() === "button" ||
199
- e.target.tagName.toLowerCase() === "video"
200
- )
201
- return;
202
- touchStartX = e.changedTouches[0].screenX;
203
- touchStartY = e.changedTouches[0].screenY;
204
- touchStartT = Date.now();
205
- },
206
- { passive: false },
207
- );
208
-
209
- document.addEventListener("touchend", (e) => {
210
- if (
211
- e.target.tagName.toLowerCase() === "button" ||
212
- e.target.tagName.toLowerCase() === "video"
213
- )
214
- return;
215
- let touchEndX = e.changedTouches[0].screenX;
216
- let touchEndY = e.changedTouches[0].screenY;
217
- let dx = touchEndX - touchStartX;
218
- let dy = touchEndY - touchStartY;
219
- let dt = Date.now() - touchStartT;
220
-
221
- if (dt < 400) {
222
- // Tap or quick swipe
223
- if (Math.abs(dx) > Math.abs(dy) && Math.abs(dx) > 30) {
224
- // Horizontal Swipe
225
- if (dx > 0) client.handle_key("ArrowRight");
226
- else client.handle_key("ArrowLeft");
227
- } else if (Math.abs(dy) > Math.abs(dx) && Math.abs(dy) > 30) {
228
- // Vertical Swipe
229
- if (dy > 0) client.handle_key("ArrowDown");
230
- else client.handle_key("ArrowUp");
231
- } else if (Math.abs(dx) < 10 && Math.abs(dy) < 10) {
232
- // Tap
233
- client.handle_key("Enter");
234
- }
235
- }
236
- });
237
- } catch (e) {
238
- console.error("Wasm Init Failed:", e);
239
- document.getElementById("terminal").textContent =
240
- "CRITICAL FAILURE: WASM LOAD ERROR\n" + e;
241
- }
242
- }
243
- run();
244
- </script>
245
- </body>
246
- </html>
package/matrix-iptv.exe DELETED
Binary file