File size: 1,418 Bytes
a2dcd2b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
674a31c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!DOCTYPE html>
<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>