next-video
Version:
A React component for adding video to your Next.js application. It extends both the video element and your Next app with features for automatic video optimization.
19 lines (18 loc) • 432 B
JavaScript
import { setVideoConfig } from "./config.js";
import handler, { GET, POST } from "./request-handler.js";
import { withNextVideo as withNextVideoInternal } from "./with-next-video.js";
function NextVideo(config) {
setVideoConfig(config);
const withNextVideo = (nextConfig) => {
return withNextVideoInternal(nextConfig, config);
};
return {
GET,
POST,
handler,
withNextVideo
};
}
export {
NextVideo
};