2022-12-17 09:54:27 +01:00
|
|
|
import React, { Suspense } from "react";
|
2022-02-16 21:30:12 +01:00
|
|
|
import ReactDOM from "react-dom";
|
|
|
|
import { HashRouter } from "react-router-dom";
|
2022-12-13 23:50:13 +01:00
|
|
|
import { ErrorBoundary } from "@/components/layout/ErrorBoundary";
|
2023-01-07 21:36:18 +01:00
|
|
|
import { conf } from "@/setup/config";
|
|
|
|
|
|
|
|
import App from "@/setup/App";
|
|
|
|
import "@/setup/i18n";
|
|
|
|
import "@/setup/index.css";
|
2023-01-11 21:16:48 +01:00
|
|
|
import "@/backend";
|
2022-12-29 18:25:57 +01:00
|
|
|
|
|
|
|
// initialize
|
|
|
|
const key =
|
|
|
|
(window as any)?.__CONFIG__?.VITE_KEY ?? import.meta.env.VITE_KEY ?? null;
|
|
|
|
if (key) {
|
|
|
|
(window as any).initMW(conf().BASE_PROXY_URL, key);
|
|
|
|
}
|
2021-07-14 00:31:37 +02:00
|
|
|
|
2023-01-14 00:30:50 +01:00
|
|
|
// TODO video todos:
|
|
|
|
// - captions
|
2023-01-16 21:26:01 +01:00
|
|
|
// - chrome cast support
|
2023-01-14 00:30:50 +01:00
|
|
|
// - safari fullscreen will make video overlap player controls
|
|
|
|
// - safari progress bar is fucked (video doesnt change time but video.currentTime does change)
|
|
|
|
|
|
|
|
// TODO stuff to test:
|
|
|
|
// - browser: firefox, chrome, edge, safari desktop
|
|
|
|
// - phones: android firefox, android chrome, iphone safari
|
|
|
|
// - devices: ipadOS
|
2023-01-16 21:25:16 +01:00
|
|
|
// - HLS
|
|
|
|
// - HLS error handling
|
|
|
|
// - video player error handling
|
|
|
|
|
|
|
|
// TODO backend system:
|
|
|
|
// - caption support
|
|
|
|
// - implement jons providers/embedscrapers
|
|
|
|
// - AFTER all that: rank providers/embedscrapers
|
2023-01-14 00:30:50 +01:00
|
|
|
|
2023-01-15 16:01:07 +01:00
|
|
|
// TODO general todos:
|
2023-01-24 18:12:37 +01:00
|
|
|
// - localize everything (fix loading screen text (series vs movies)) (and have EN file instead)
|
2023-01-15 16:01:07 +01:00
|
|
|
|
2021-07-14 00:31:37 +02:00
|
|
|
ReactDOM.render(
|
2022-02-16 21:30:12 +01:00
|
|
|
<React.StrictMode>
|
|
|
|
<ErrorBoundary>
|
|
|
|
<HashRouter>
|
2022-12-17 09:54:27 +01:00
|
|
|
<Suspense fallback="">
|
|
|
|
<App />
|
|
|
|
</Suspense>
|
2022-02-16 21:30:12 +01:00
|
|
|
</HashRouter>
|
|
|
|
</ErrorBoundary>
|
|
|
|
</React.StrictMode>,
|
|
|
|
document.getElementById("root")
|
2021-07-14 00:31:37 +02:00
|
|
|
);
|