@rupamotion/player/file
Copy as Markdown@rupamotion/player/file: loads a .rupaplay file and mounts the player on its markup.
loadFile(src, options?)resolves to{ file }or{ error }: never a rejection, never a throw.srcis a URL (fetched without credentials to another origin), aBlob, anArrayBuffer(or a view), aResponse, or a file already loaded;options.integrity(sha256-…) is checked before the bytes are read.mountFile(root, src, options?)resolves to{ player }or{ error }: the file loaded, its CSS and fonts installed (released by the player’sdestroy), its markup kept or written (markup), sanitised, then mounted. A failure leavesrootas it was (nothing injected, nothing installed, never hidden) and the root sendsrupaerror(detail.error, anddetail.src: thesrcgiven, so a page tells a load it replaced from the one it wants) as well.rootnot an object is the caller’sTypeError.