Module VideoResource-PIXI.Impl

let _create: source:[ `HTMLVideoElement(Webapi.Dom.Element.t) | `String(string) | `Object(array(sourceObject)) ] => ?⁠options:'a => unit => t;
let create: source:[ `HTMLVideoElement(Webapi.Dom.Element.t) | `Object(array(sourceObject)) | `String(string) ] => ?⁠options:Js.t({. autoLoad: Js.undefined(bool), autoPlay: Js.undefined(bool), crossorigin: Js.undefined(bool), updateFPS: Js.undefined(int), }) => unit => t;

creates new video resource

parameter source

The source of the resource

let getAutoPlay: Js.t(PIXI.C1.#resource) => bool;

When set to true will automatically play videos used by this texture once they are loaded. If false, it will not modify the playing state.

let getUpdateFPS: Js.t(PIXI.C1.#resource) => int;

How many times a second to update the texture from the video. Leave at 0 to update at every render. A lower fps can help performance, as updating the texture at 60fps on a 30ps video may not be efficient.

let load: Js.t(PIXI.C1.#resource) => unit;

Start preloading the video resource.