App.svelte 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <style>
  2. .container {
  3. width: 100%;
  4. display: flex;
  5. flex-wrap: wrap;
  6. height: calc(100% - 55px);
  7. flex-direction: column;
  8. /* max-width:1320px; */
  9. margin: auto;
  10. }
  11. .desc {
  12. display: none;
  13. padding: 15px;
  14. color: white;
  15. margin-top: auto;
  16. }
  17. .videoContainer {
  18. position: relative;
  19. width: 100%;
  20. display: flex;
  21. flex-direction: column;
  22. }
  23. .chatContainer {
  24. position: relative;
  25. width: 100%;
  26. flex-grow: 1;
  27. }
  28. @media (min-width: 576px) {
  29. }
  30. @media (min-width: 768px) {
  31. .container {
  32. flex-direction: row;
  33. }
  34. .desc {
  35. display: block;
  36. }
  37. .videoContainer {
  38. flex: 0 0 70%;
  39. max-width: 70%;
  40. }
  41. .chatContainer {
  42. flex: 0 0 30%;
  43. max-width: 30%;
  44. }
  45. }
  46. @media (min-width: 992px) {
  47. }
  48. @media (min-width: 1200px) {
  49. }
  50. @media (min-width: 1400px) {
  51. }
  52. </style>
  53. <script>
  54. import VideoPlayer from "./components/VideoPlayer.svelte";
  55. import Chat from "./components/Chat.svelte";
  56. import Nav from "./components/Nav.svelte";
  57. import Description from "./components/Description.svx";
  58. // import { onMount } from "svelte";
  59. // import { live, channel } from "./stores.js";
  60. // let liveChannels = [];
  61. // onMount(async () => {
  62. // const res = await fetch(
  63. // `https://cors-anywhere.herokuapp.com/https://live.autistici.org/stats`
  64. // );
  65. // const xmlText = await res.text();
  66. // liveChannels = await new window.DOMParser().parseFromString(
  67. // xmlText,
  68. // "text/xml"
  69. // );
  70. // const streams = liveChannels
  71. // .getElementsByTagName("application")[0]
  72. // .getElementsByTagName("stream");
  73. // for (const i = 0; i < streams.length; i++) {
  74. // livechannels.push(streams[i].getElementsByTagName("name")[0].textContent);
  75. // }
  76. // });
  77. </script>
  78. <Nav />
  79. <div class="container">
  80. <div class="videoContainer">
  81. <VideoPlayer />
  82. <div class="desc">
  83. <Description />
  84. </div>
  85. </div>
  86. <div class="chatContainer">
  87. <Chat />
  88. </div>
  89. </div>