App.svelte 1.9 KB

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