Skip to content
@drupflare/spool v1.0.0 GitHub
    Preparing search index...

    Function rewriteVideo

    • Rewrites the <video> start tags of html as options ask and says how many tags changed. It reads tags with tagsOf and skips a tag inside an HTML comment, a tag that never closes, and every element that is not <video>. A tag that already says what the options ask for is not counted. Everything outside the edited start tags stays byte for byte, and the edits are ASCII, so a page in another charset read one byte per character comes back the same way.

      Parameters

      Returns { html: string; rewritten: number }