<reponame>jackitaliano/Make23<filename>NotesApp/frontend/node_modules/subscribable-things/build/es2019/factories/video-frame.js<gh_stars>0export const createVideoFrame = (emitNotSupportedError, wrapSubscribeFunction) => {
    return (videoElement) => wrapSubscribeFunction((observer) => {
        if (videoElement.cancelVideoFrameCallback === undefined || videoElement.requestVideoFrameCallback === undefined) {
            return emitNotSupportedError(observer);
        }
        let videoFrameHandle = videoElement.requestVideoFrameCallback(function videoFrameCallback(now, metadata) {
            videoFrameHandle = videoElement.requestVideoFrameCallback(videoFrameCallback);
            observer.next({ ...metadata, now });
        });
        return () => videoElement.cancelVideoFrameCallback(videoFrameHandle);
    });
};
//# sourceMappingURL=video-frame.js.map