Spaces:
Running
Running
Update app.js
Browse files
app.js
CHANGED
@@ -49,20 +49,17 @@ class SakuraCyberDashboard {
|
|
49 |
async launchLiveStreamer() {
|
50 |
this.log('Connecting to Live Stream...');
|
51 |
try {
|
52 |
-
//
|
53 |
-
const response = await fetch('/launch/live-streamer', { method: 'POST' });
|
54 |
-
const data = await response.json();
|
55 |
-
this.log(`Live Stream Established: ${data.status}`);
|
56 |
-
|
57 |
-
// Open Telegram bot in new window
|
58 |
const width = Math.min(1000, window.innerWidth * 0.8);
|
59 |
-
const height = width * (
|
60 |
const left = (window.innerWidth - width) / 2;
|
61 |
const top = (window.innerHeight - height) / 2;
|
62 |
|
63 |
-
window.open(
|
64 |
-
|
65 |
-
|
|
|
|
|
66 |
} catch (error) {
|
67 |
this.log(`Stream Connection Error: ${error.message}`);
|
68 |
}
|
|
|
49 |
async launchLiveStreamer() {
|
50 |
this.log('Connecting to Live Stream...');
|
51 |
try {
|
52 |
+
// Open the Telegram bot link in a new window
|
|
|
|
|
|
|
|
|
|
|
53 |
const width = Math.min(1000, window.innerWidth * 0.8);
|
54 |
+
const height = width * (9 / 16); // 16:9 aspect ratio
|
55 |
const left = (window.innerWidth - width) / 2;
|
56 |
const top = (window.innerHeight - height) / 2;
|
57 |
|
58 |
+
window.open(
|
59 |
+
'https://telegram.me/python3463_bot',
|
60 |
+
'Live Streamer',
|
61 |
+
`width=${width},height=${height},left=${left},top=${top}`
|
62 |
+
);
|
63 |
} catch (error) {
|
64 |
this.log(`Stream Connection Error: ${error.message}`);
|
65 |
}
|