diff --git a/experiments/modern/src/App.js b/experiments/modern/src/App.js index 5c57440d..c81c3217 100644 --- a/experiments/modern/src/App.js +++ b/experiments/modern/src/App.js @@ -1,9 +1,26 @@ import React from "react"; import JSZip from "jszip"; import "./App.css"; -import { xml2js } from "xml-js"; import * as Utils from "./utils"; +const IGNORE_IDS = new Set([ + // The maki script shows/hides these depending on which corner you are in + "main2", + "main3", + "main4", + "Title2", + "Title3", + "Title4", + "mask2", + "mask3", + "mask4", + // These need the maki script to get sized + "volumethumb", + "seekfull", + "seek1", + "Repeat", +]); + const SkinContext = React.createContext(null); async function getSkin() { @@ -37,7 +54,11 @@ async function getSkin() { } } } - return images; + + const player = await Utils.readXml(zip, "xml/player-normal.xml"); + // Gross hack returing a tuple here. We're just doing some crazy stuff to get + // some data returned in the laziest way possible + return [player, images]; } function Layout({ @@ -127,6 +148,38 @@ function ToggleButton(props) { return