import {StrictMode} from 'react';
import {createRoot} from 'react-dom/client';
import muxjs from 'mux.js';
import App from './App.tsx';
import './index.css';

// Ensure muxjs is available globally for Shaka Player transmuxing
const realMux = (muxjs as any)?.default || muxjs;
if (typeof window !== 'undefined') {
  (window as any).muxjs = (window as any).muxjs || realMux;
  (window as any).mux = (window as any).mux || realMux;
}

createRoot(document.getElementById('root')!).render(
  <StrictMode>
    <App />
  </StrictMode>,
);

