
let videoList = [
  'assets/videos/Ocean_King_3_Buffalo_Thunder_Video.mp4',
  'assets/videos/Nautilus_Video.mp4',
  'assets/videos/Ocean_King_4_Golden_Paradise_Video.mp4',
  'assets/videos/Golden_Dragon_Video.mp4',
  'assets/videos/Black_Pearl_Video.mp4',
  'assets/videos/Apes_Rampage.mp4',
  'assets/videos/Gadzilla.mp4',
  'assets/videos/Batman.mp4',
  'assets/videos/Poseidon.mp4',
  'assets/videos/Legend_of_the_Phoenix.mp4',
  'assets/videos/Buffalo_Thunder_1.mp4',
  'assets/videos/Buffalo_Thunder_2.mp4'
];
let currentVideo = 0;
function openVideo(src) {
  let index = videoList.indexOf(src);
  if (index === -1) index = 0; // fallback if not found

  // send index + list to video.html
  const url = "video.html?index=" + index + "&list=" + encodeURIComponent(JSON.stringify(videoList));
  window.open(url, "_blank");

}



