import { O as ImageRenderer, P as utils } from "./watermark.js";
class VideoRenderer extends ImageRenderer {
  constructor({ model, editor, canvas, hooks }) {
    super({ model, editor, canvas, hooks });
  }
  load() {
    const { model, options } = this;
    const startTime = model.invertPlay ? model.naturalDuration - model.endTime : model.startTime;
    return Promise.all([
      model.url ? utils.loadVideo(model.url, (startTime || 0) / 1e3, options.fitCrossOrigin) : null,
      model.mask ? utils.loadImage(model.mask, options.fitCrossOrigin) : null
    ]);
  }
}
export { VideoRenderer as V };
