-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from JoaquinBCh/refactor/decoupling
Decouple the Player from the Web Application
- Loading branch information
Showing
21 changed files
with
7,424 additions
and
2,681 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,61 @@ | ||
{ | ||
"name": "@kixelated/moq", | ||
"type": "module", | ||
"version": "0.1.4", | ||
"name": "moq-player", | ||
"version": "0.0.1", | ||
"description": "Media over QUIC library", | ||
"license": "(MIT OR Apache-2.0)", | ||
"repository": "github:kixelated/moq-js", | ||
"entry": "playback/index.ts", | ||
"main": "dist/moq-player.cjs.js", | ||
"module": "dist/moq-player.esm.js", | ||
"iife": "dist/moq-player.iife.js", | ||
"types": "dist/types/moq-player.d.ts", | ||
"scripts": { | ||
"build": "tsc -b && cp ../LICENSE* ./dist && cp ./README.md ./dist && cp ./package.json ./dist", | ||
"lint": "eslint .", | ||
"build": "rollup -c", | ||
"dev": "rollup -c -w", | ||
"lint": "eslint . --ext .js,.ts,.jsx,.tsx", | ||
"fmt": "prettier --write ." | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.26.0", | ||
"@babel/preset-env": "^7.26.0", | ||
"@babel/preset-typescript": "^7.26.0", | ||
"@rollup/plugin-babel": "^6.0.4", | ||
"@rollup/plugin-commonjs": "^28.0.1", | ||
"@rollup/plugin-node-resolve": "^15.3.0", | ||
"@rollup/plugin-terser": "^0.4.4", | ||
"@rollup/plugin-typescript": "^12.1.1", | ||
"@types/audioworklet": "^0.0.50", | ||
"@types/dom-mediacapture-transform": "^0.1.6", | ||
"@types/dom-webcodecs": "^0.1.8", | ||
"@typescript/lib-dom": "npm:@types/web@^0.0.115", | ||
"@typescript-eslint/eslint-plugin": "^6.4.0", | ||
"@typescript-eslint/parser": "^6.4.0", | ||
"@typescript/lib-dom": "npm:@types/web@^0.0.115", | ||
"cross-env": "^7.0.2", | ||
"eslint": "^8.47.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-prettier": "^5.0.0", | ||
"npm-run-all": "^4.1.5", | ||
"prettier": "^3.0.1", | ||
"typescript": "^5.1.6" | ||
"rollup": "^4.28.0", | ||
"rollup-plugin-sourcemaps": "^0.6.2", | ||
"rollup-plugin-web-worker-loader": "github:montevideo-tech/rollup-plugin-web-worker-loader", | ||
"tslib": "^2.8.1", | ||
"typescript": "^5.7.2" | ||
}, | ||
"dependencies": { | ||
"mp4box": "^0.5.2" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
"chrome >= 97", | ||
"edge >= 98", | ||
"firefox >= 130", | ||
"opera >= 83", | ||
"safari >= 18" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
"use strict" | ||
const resolve = require("@rollup/plugin-node-resolve") | ||
const commonjs = require("@rollup/plugin-commonjs") | ||
const typescript = require("@rollup/plugin-typescript") | ||
const workerLoader = require("rollup-plugin-web-worker-loader") | ||
const babel = require("@rollup/plugin-babel") | ||
const terser = require("@rollup/plugin-terser") | ||
const sourceMaps = require("rollup-plugin-sourcemaps") | ||
const pkg = require("./package.json") | ||
|
||
const config = [] | ||
|
||
config.push({ | ||
input: pkg.entry, | ||
output: { | ||
file: pkg.iife, | ||
format: "iife", | ||
name: "moqplayer", | ||
sourcemap: true, | ||
}, | ||
plugins: [ | ||
resolve(), | ||
commonjs({ | ||
include: [/node_modules/, /src/], | ||
transformMixedEsModules: true, | ||
}), | ||
workerLoader({ preserveSource: true }), | ||
typescript({ | ||
typescript: require("typescript"), | ||
}), | ||
sourceMaps(), | ||
babel({ | ||
babelHelpers: "bundled", | ||
presets: ["@babel/preset-env", "@babel/preset-typescript"], | ||
exclude: "./node_modules/*", | ||
}), | ||
terser(), | ||
], | ||
}) | ||
|
||
config.push({ | ||
input: pkg.entry, | ||
output: { | ||
file: pkg.module, | ||
format: "esm", | ||
sourcemap: true, | ||
}, | ||
external: [], | ||
plugins: [ | ||
resolve(), | ||
commonjs(), | ||
workerLoader({ preserveSource: true }), | ||
typescript({ | ||
typescript: require("typescript"), | ||
}), | ||
sourceMaps(), | ||
babel({ | ||
babelHelpers: "bundled", | ||
presets: ["@babel/preset-env", "@babel/preset-typescript"], | ||
exclude: "./node_modules/*", | ||
}), | ||
terser(), | ||
], | ||
}) | ||
|
||
module.exports = config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,18 @@ | ||
{ | ||
"files": [], // don't build anything with these settings. | ||
"compilerOptions": { | ||
"target": "es2022", | ||
"module": "es2022", | ||
"sourceMap": true, | ||
"moduleResolution": "node", | ||
"rootDir": ".", | ||
"module": "es2022", | ||
"target": "es2022", | ||
"lib": ["es2022", "dom", "dom.iterable"], | ||
"outDir": "./dist", | ||
"declaration": true, | ||
"strict": true, | ||
"composite": true, | ||
"declarationMap": true, | ||
"sourceMap": true, | ||
"isolatedModules": true, | ||
"types": [], // Don't automatically import any @types modules. | ||
"lib": ["es2022", "dom"], | ||
"typeRoots": ["./types", "../node_modules/@types"] | ||
"allowJs": false, | ||
"allowSyntheticDefaultImports": true, | ||
"downlevelIteration": true, | ||
"removeComments": false, | ||
"isolatedModules": false, | ||
"noEmit": false | ||
}, | ||
"references": [ | ||
{ | ||
"path": "./common" | ||
}, | ||
{ | ||
"path": "./playback" | ||
}, | ||
{ | ||
"path": "./playback/worklet" | ||
}, | ||
{ | ||
"path": "./contribute" | ||
}, | ||
{ | ||
"path": "./transport" | ||
}, | ||
{ | ||
"path": "./media" | ||
} | ||
], | ||
"paths": { | ||
"@/*": ["*"] | ||
} | ||
"exclude": ["node_modules"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
declare module "web-worker:*" { | ||
const WorkerFactory: new () => Worker | ||
export default WorkerFactory | ||
} | ||
|
||
declare module "audio-worklet:*" { | ||
const value: any | ||
export default value | ||
} |
Oops, something went wrong.