Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Telegram Video Player</title> | |
| <script src="https://telegram.org/js/telegram-web-app.js"></script> | |
| <style> | |
| body { | |
| font-family: Arial, sans-serif; | |
| margin: 0; | |
| padding: 0; | |
| background-color: #f0f0f0; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| height: 100vh; | |
| } | |
| .video-container { | |
| width: 90%; | |
| max-width: 800px; | |
| background-color: #fff; | |
| padding: 20px; | |
| border-radius: 10px; | |
| box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); | |
| } | |
| video { | |
| width: 100%; | |
| border-radius: 10px; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="video-container"> | |
| <h2>Video Player</h2> | |
| <video controls> | |
| <source src="https://your-server-url.com/video.mp4" type="video/mp4"> <!-- Replace with your hosted video URL --> | |
| Your browser does not support HTML5 video. | |
| </video> | |
| </div> | |
| <script> | |
| // Initialize Telegram Web App | |
| const tg = window.Telegram.WebApp; | |
| // Notify Telegram that the app is ready | |
| tg.ready(); | |
| // Optionally expand the app to full screen | |
| tg.expand(); | |
| // Main button functionality (optional) | |
| tg.MainButton.setText("Close App").show().onClick(() => { | |
| tg.close(); | |
| }); | |
| </script> | |
| </body> | |
| </html> | |