import { CE } from "@utils/html";
import { onChangeVideoPlayerType } from "../stream/stream-settings-utils";
import { StreamSettings } from "../stream/stream-settings";
export function localRedirect(path: string) {
const url = window.location.href.substring(0, 31) + path;
const $pageContent = document.getElementById('PageContent');
if (!$pageContent) {
return;
}
const $anchor = CE('a', {
href: url,
class: 'bx-hidden bx-offscreen'
}, '');
$anchor.addEventListener('click', e => {
// Remove element after clicking on it
window.setTimeout(() => {
$pageContent.removeChild($anchor);
}, 1000);
});
$pageContent.appendChild($anchor);
$anchor.click();
}
export function setupStreamUi() {
StreamSettings.getInstance();
onChangeVideoPlayerType();
}