Load ruffle

This commit is contained in:
tusooa 2025-02-26 20:23:10 -05:00
commit b46de85926
No known key found for this signature in database
GPG key ID: 42AEC43D48433C51
4 changed files with 50 additions and 2 deletions

View file

@ -1,11 +1,12 @@
const createRuffleService = () => {
let ruffleInstance = null
const getRuffle = () => new Promise((resolve, reject) => {
const getRuffle = async () => new Promise((resolve, reject) => {
if (ruffleInstance) {
resolve(ruffleInstance)
return
}
// Ruffle needs these to be set before it's loaded
// https://github.com/ruffle-rs/ruffle/issues/3952
window.RufflePlayer = {}