/**
 * Get a flat surface with a video texture
 * @example
 * ```
  addTo(root, getVideoPlayer({ src: 'https://cdn.hibervr.com/video/bike.mp4', p: [0, 0, 5], width: 5 }));
 * ```
 */
export const getVideoPlayer = (options) => {
    const { name, p = [0, 0, 0], r = [0, 0, 0], src = '', width = 7, emissiveStrength = 0.9, ratio = 16 / 9 } = options;
    const { transform } = {
        ...options,
        transform: {
            pos: p,
            rot: r,
        },
    };
    const video = {
        name,
        prefabId: 'cube_01',
        // rendering: { //TBD, material crash video
        //   materialID: 'palette_01_black',
        // },
        transform: {
            ...transform,
            scale: [width, width / ratio, 0.02],
        },
        videoTexture: {
            url: src,
            emissiveStrength,
            startPlayingAfter: options.startPlayingAfter,
        },
    };
    return video;
};
//# sourceMappingURL=getVideoPlayer.js.map