diff --git a/.gitignore b/.gitignore index 4e55447..910beec 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ **/node_modules -**/target \ No newline at end of file +**/target +**/dist \ No newline at end of file diff --git a/apps/mock/nest-cli.json b/apps/mock/nest-cli.json new file mode 100644 index 0000000..9b63989 --- /dev/null +++ b/apps/mock/nest-cli.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json.schemastore.org/nest-cli", + "collection": "@nestjs/schematics", + "sourceRoot": "src", + "compilerOptions": { + "deleteOutDir": true + } +} \ No newline at end of file diff --git a/apps/mock/package.json b/apps/mock/package.json new file mode 100644 index 0000000..e5393f8 --- /dev/null +++ b/apps/mock/package.json @@ -0,0 +1,25 @@ +{ + "name": "mock", + "version": "0.1.0", + "private": true, + "scripts": { + "start": "nest start --watch -b swc", + "dev": "pnpm run start" + }, + "keywords": [], + "license": "MIT", + "dependencies": { + "@nestjs/common": "^11.0.11", + "@nestjs/config": "^4.0.1", + "@nestjs/core": "^11.0.11", + "@nestjs/platform-express": "^11.0.11", + "@nestjs/serve-static": "^5.0.3", + "reflect-metadata": "^0.2.2" + }, + "devDependencies": { + "@nestjs/cli": "^11.0.0", + "@nestjs/schematics": "^11.0.0", + "@swc/cli": "^0.6.0", + "@swc/core": "^1.11.8" + } +} \ No newline at end of file diff --git a/apps/mock/public/video-sample/audiosample.webm b/apps/mock/public/video-sample/audiosample.webm new file mode 100644 index 0000000..e49dc5b Binary files /dev/null and b/apps/mock/public/video-sample/audiosample.webm differ diff --git a/apps/mock/public/video-sample/test.webm b/apps/mock/public/video-sample/test.webm new file mode 100644 index 0000000..6c2138d Binary files /dev/null and b/apps/mock/public/video-sample/test.webm differ diff --git a/apps/mock/public/video-sample/video-webm-codecs-avc1-42E01E.webm b/apps/mock/public/video-sample/video-webm-codecs-avc1-42E01E.webm new file mode 100644 index 0000000..d1e58b0 Binary files /dev/null and b/apps/mock/public/video-sample/video-webm-codecs-avc1-42E01E.webm differ diff --git a/apps/mock/public/video-sample/video-webm-codecs-vp8.webm b/apps/mock/public/video-sample/video-webm-codecs-vp8.webm new file mode 100644 index 0000000..ec3576e Binary files /dev/null and b/apps/mock/public/video-sample/video-webm-codecs-vp8.webm differ diff --git a/apps/mock/src/app.module.ts b/apps/mock/src/app.module.ts new file mode 100644 index 0000000..150a10d --- /dev/null +++ b/apps/mock/src/app.module.ts @@ -0,0 +1,19 @@ +import { Module } from '@nestjs/common'; +import { ServeStaticModule } from '@nestjs/serve-static'; +import path from 'node:path'; + +@Module({ + imports: [ + ServeStaticModule.forRoot({ + rootPath: path.join(__dirname, '..', 'public'), + serveRoot: '/api/static', + serveStaticOptions: { + cacheControl: true, + maxAge: '1d', + }, + }) + ], + controllers: [], + providers: [], +}) +export class AppModule { } diff --git a/apps/mock/src/main.ts b/apps/mock/src/main.ts new file mode 100644 index 0000000..62525e5 --- /dev/null +++ b/apps/mock/src/main.ts @@ -0,0 +1,8 @@ +import { NestFactory } from '@nestjs/core'; +import { AppModule } from './app.module'; + +async function bootstrap() { + const app = await NestFactory.create(AppModule); + await app.listen(process.env.port ?? 5001); +} +bootstrap(); diff --git a/apps/mock/tsconfig.json b/apps/mock/tsconfig.json new file mode 100644 index 0000000..4f82a26 --- /dev/null +++ b/apps/mock/tsconfig.json @@ -0,0 +1,28 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "module": "CommonJS", + "moduleResolution": "node", + "declaration": true, + "emitDeclarationOnly": false, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowImportingTsExtensions": false, + "outDir": "./dist", + "rootDir": ".", + "baseUrl": ".", + "lib": [ + "ES2024" + ] + }, + "include": [ + "src/**/*" + ], + "exclude": [ + "node_modules", + "dist", + "test", + "**/*spec.ts" + ] +} \ No newline at end of file diff --git a/apps/playground/.gitignore b/apps/playground/.gitignore index 38d7344..57cba4c 100644 --- a/apps/playground/.gitignore +++ b/apps/playground/.gitignore @@ -10,4 +10,4 @@ dist/ # IDE .vscode/* !.vscode/extensions.json -.idea +.idea \ No newline at end of file diff --git a/apps/playground/package.json b/apps/playground/package.json index c6c3ed6..730bed2 100644 --- a/apps/playground/package.json +++ b/apps/playground/package.json @@ -9,8 +9,8 @@ "preview": "rsbuild preview" }, "dependencies": { - "lit": "^3.2.1", - "rxjs": "^7.8.2" + "konoebml": "0.1.0-rc.6", + "lit": "^3.2.1" }, "devDependencies": { "@rsbuild/core": "^1.2.14", diff --git a/apps/playground/rsbuild.config.ts b/apps/playground/rsbuild.config.ts index 8285d12..9ad1a96 100644 --- a/apps/playground/rsbuild.config.ts +++ b/apps/playground/rsbuild.config.ts @@ -1,7 +1,9 @@ import { defineConfig } from '@rsbuild/core'; export default defineConfig({ + html: { + title: 'Konoplayer Playground', template: './src/index.html', }, source: { @@ -9,4 +11,8 @@ export default defineConfig({ version: 'legacy', }, }, + server: { + host: '0.0.0.0', + port: 5000, + }, }); diff --git a/apps/playground/src/index.css b/apps/playground/src/index.css index 85e7e2b..a2e219a 100644 --- a/apps/playground/src/index.css +++ b/apps/playground/src/index.css @@ -1,6 +1,4 @@ body { margin: 0; - color: #fff; font-family: Inter, Avenir, Helvetica, Arial, sans-serif; - background-image: linear-gradient(to bottom, #020917, #101725); } diff --git a/apps/playground/src/index.html b/apps/playground/src/index.html index 9c001c2..819ba76 100644 --- a/apps/playground/src/index.html +++ b/apps/playground/src/index.html @@ -1,5 +1,8 @@ +
+