Skip to content

Commit

Permalink
christ on a bike
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBozzz34 committed Mar 13, 2024
1 parent 420a142 commit e377167
Show file tree
Hide file tree
Showing 11 changed files with 2,347 additions and 41,540 deletions.
23 changes: 22 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,25 @@ yarn-error.log*
/playwright-report/
/playwright/.cache/

/.npm-only-allow
/.npm-only-allow
# next-video
videos/*
!videos/*.json
!videos/*.js
!videos/*.ts
public/_next-video

# next-video
videos/*
!videos/*.json
!videos/*.js
!videos/*.ts
public/_next-video

# next-video
videos/*
!videos/*.json
!videos/*.js
!videos/*.ts
public/_next-video
ScoreConnectIAMUser_accessKeys.csv
2 changes: 2 additions & 0 deletions app/api/video/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// app/api/video/route.js
export { GET } from 'next-video/request-handler';
18 changes: 18 additions & 0 deletions components/Video/Video.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use client';

import MuxPlayer from '@mux/mux-player-react';

type Params = {
playbackId: string;
};


export default function Page({ params: { playbackId } }: { params: Params }) {
return (
<MuxPlayer
playbackId={playbackId}
poster="https://image.mux.com/{playbackId}/thumbnail.jpg?width=1920"
style={{ width: '100%', height: '100%' }}
/>
);
}
34 changes: 20 additions & 14 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
import withBundleAnalyzer from "@next/bundle-analyzer"
import withPlugins from "next-compose-plugins"
import { env } from "./env.mjs"
import withBundleAnalyzer from "@next/bundle-analyzer";
import withPlugins from "next-compose-plugins";
import { withNextVideo } from "next-video/process";
import { env } from "./env.mjs";

/**
* @type {import('next').NextConfig}
*/
const config = withPlugins([[withBundleAnalyzer({ enabled: env.ANALYZE })]], {
const nextConfig = {
reactStrictMode: true,
experimental: { instrumentationHook: true },
rewrites() {
return [
{ source: "/healthz", destination: "/api/health" },
{ source: "/api/healthz", destination: "/api/health" },
{ source: "/health", destination: "/api/health" },
{ source: "/ping", destination: "/api/health" },
]
},
images: {
domains: ["avatars.githubusercontent.com", "lh3.googleusercontent.com"],
},
})
};

const config = withPlugins([
[withBundleAnalyzer({ enabled: env.ANALYZE })],
[withNextVideo(nextConfig, {
provider: 'amazon-s3',
providerConfig: {
'amazon-s3': {
endpoint: 'https://s3.us-east-2.amazonaws.com',
},
bucket: 'next-videos-j8ndjk0vixy',
}
})]
]);

export default config
export default config;
Loading

0 comments on commit e377167

Please sign in to comment.