miru/app/test.html
ThaUnknown b0f98f2b6a look at this fucking idiot not commiting all night:
alRequest improvements, home screen work
2021-01-05 08:38:41 +01:00

47 lines
No EOL
1.6 KiB
HTML

<video src="https://openings.moe/video/Kobayashi-SanChiNoMaidDragon-OP01-NCBD.mp4" muted controls id="video"></video>
<script src="js/subtitles-octopus.js"></script>
<script>
let header = `[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Roboto Medium,26,&H00FFFFFF,&H000000FF,&H00020713,&H00000000,0,0,0,0,100,100,0,0,1,1.3,0,2,20,20,23,1`
let options = {
video: video,
lossyRender: true,
fonts: ["https://fonts.gstatic.com/s/roboto/v20/KFOlCnqEu92Fr1MmEU9fBBc4.woff2"],
workerUrl: 'js/subtitles-octopus-worker.js',
subContent: header,
onReady: ready,
debug: true,
onError: console.log
};
let octopusInstance = new SubtitlesOctopus(options);
function ready() {
octopusInstance.createEvent({
Duration: 2960,
Effect: "",
Layer: 100,
MarginL: 0,
MarginR: 0,
MarginV: 0,
Name: "",
ReadOrder: 0,
Start: 180,
Style: 1,
Text: "Miss Kobayashi's Dragon Something!",
})
octopusInstance.createEvent({
Duration: 1750,
Effect: "",
Layer: 100,
MarginL: 0,
MarginR: 0,
MarginV: 0,
Name: "",
ReadOrder: 1,
Start: 1940,
Style: 1,
Text: "What's with the "
})
}
</script>