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

    Type Alias VideoOptions

    What spoolProxy({ video }) does to <video> start tags. preload is the value to set, or false to leave the attribute alone. autoplay: 'defer' removes the autoplay attribute, marks the tag data-spool-autoplay, adds controls so a visitor can start the video, and sets preload to none unless the option is metadata. With 'keep' the autoplay attribute stays, and a video that autoplays loads its file whatever preload says. when limits the rewrite to a visitor who sent Save-Data: on (save-data) or who also has an ECT of slow-2g, 2g or 3g (slow). Defaults: preload: 'none', autoplay: 'keep', when: 'always'.

    type VideoOptions = {
        autoplay?: "keep" | "defer";
        preload?: "none" | "metadata" | false;
        when?: "always" | "save-data" | "slow";
    }
    Index
    autoplay?: "keep" | "defer"
    preload?: "none" | "metadata" | false
    when?: "always" | "save-data" | "slow"