demo.html 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <!doctype html>
  2. <html lang='en'>
  3. <head>
  4. <meta charset='utf-8'>
  5. <meta name='viewport' content='width=device-width'>
  6. <title>Show</title>
  7. <style type='text/css'>
  8. * { margin: 0; padding: 0; }
  9. html, body, main { height: 100%; width: 100%; }
  10. body { background: #000; }
  11. video, img { display: block; margin: 0 auto; cursor: none; }
  12. .fillwidth { width: 100%; height: auto; }
  13. .fillheight { height: 100%; width: auto; }
  14. footer { display: none; height: 0; width: 0; }
  15. </style>
  16. </head>
  17. <body>
  18. <main></main>
  19. <footer>
  20. <script src='show.js'></script>
  21. <script>
  22. let files = [
  23. 'image.png',
  24. 'image.jpg',
  25. {
  26. file: 'animated.gif',
  27. delay: 960*5,
  28. },
  29. {
  30. file: 'substitute/%s.png',
  31. range: [4, 9],
  32. },
  33. {
  34. file: 'substitutev2/%s.png',
  35. range: ["one", "two", "three", "four"],
  36. },
  37. {
  38. file: 'prefixed-group/%03s.png',
  39. range: [1, 200],
  40. delay: 200,
  41. },
  42. {
  43. file: 'video.webm',
  44. delay: 3,
  45. },
  46. {
  47. file: 'video.mp4',
  48. delay: 5,
  49. },
  50. ];
  51. let s = new Show(document.getElementsByTagName('main')[0], files, 1500);
  52. </script>
  53. </footer>
  54. </body>
  55. </html>