File size: 1,734 Bytes
b05b4ac
 
 
1d818b8
 
 
 
b05b4ac
 
1d818b8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b05b4ac
 
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
<!DOCTYPE html>
<html lang="id">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <title>Ark Re Code Scraper</title>
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- Background Video -->
  <video id="bgVideo" autoplay loop muted>
    <source src="https://video.twimg.com/ext_tw_video/1892164405464629249/pu/vid/avc1/1280x720/cgW9XdNOX1DPI6Rq.mp4" type="video/mp4">
  </video>

  <div class="container">
    <h1>Ark Re Code Scraper</h1>
    <label for="charName">Cari Karakter:</label>
    <input type="text" id="charName" placeholder="Masukkan nama karakter...">
    <button onclick="fetchData()">Cari</button>
    <br>
    <button onclick="playVideo('Edalia')">Edalia</button>
    <button onclick="playVideo('Ermes')">Ermes</button>
    <div id="result"></div>
  </div>

  <!-- Tempat Video Ditampilkan -->
  <div id="videoWrapper"></div>

  <script>
    function playVideo(charName) {
      const fileName = `Ark Re Code - ${charName}.mp4`;
      const videoPath = `https://gilbertclaus.pythonanywhere.com/video/Ark ReCode/${fileName}`;
      const encodedURL = encodeURI(videoPath);

      const wrapper = document.getElementById("videoWrapper");
      wrapper.innerHTML = "";

      const video = document.createElement("video");
      video.src = encodedURL;
      video.width = 360;
      video.controls = true;
      video.autoplay = true;
      video.volume = 0.1;
      video.style.marginTop = "20px";
      wrapper.appendChild(video);
    }

    function fetchData() {
      const name = document.getElementById("charName").value;
      alert(`Fungsi fetchData untuk karakter "${name}" belum diimplementasikan`);
    }
  </script>
</body>
</html>