Usage:
++ 请点击下面的图标,启用Flash +
++ 若没有见到这个图标,Chrome浏览器请打开 + chrome://settings/content/flash 并修改为"Ask first"。 +
+diff --git a/player/.gitignore b/player/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/player/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/player/README.md b/player/README.md new file mode 100644 index 0000000..86b2b11 --- /dev/null +++ b/player/README.md @@ -0,0 +1,75 @@ +# React + TypeScript + Vite + +This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. + +Currently, two official plugins are available: + +- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh +- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh + +## React Compiler + +The React Compiler is enabled on this template. See [this documentation](https://react.dev/learn/react-compiler) for more information. + +Note: This will impact Vite dev & build performances. + +## Expanding the ESLint configuration + +If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules: + +```js +export default defineConfig([ + globalIgnores(['dist']), + { + files: ['**/*.{ts,tsx}'], + extends: [ + // Other configs... + + // Remove tseslint.configs.recommended and replace with this + tseslint.configs.recommendedTypeChecked, + // Alternatively, use this for stricter rules + tseslint.configs.strictTypeChecked, + // Optionally, add this for stylistic rules + tseslint.configs.stylisticTypeChecked, + + // Other configs... + ], + languageOptions: { + parserOptions: { + project: ['./tsconfig.node.json', './tsconfig.app.json'], + tsconfigRootDir: import.meta.dirname, + }, + // other options... + }, + }, +]) +``` + +You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules: + +```js +// eslint.config.js +import reactX from 'eslint-plugin-react-x' +import reactDom from 'eslint-plugin-react-dom' + +export default defineConfig([ + globalIgnores(['dist']), + { + files: ['**/*.{ts,tsx}'], + extends: [ + // Other configs... + // Enable lint rules for React + reactX.configs['recommended-typescript'], + // Enable lint rules for React DOM + reactDom.configs.recommended, + ], + languageOptions: { + parserOptions: { + project: ['./tsconfig.node.json', './tsconfig.app.json'], + tsconfigRootDir: import.meta.dirname, + }, + // other options... + }, + }, +]) +``` diff --git a/player/eslint.config.js b/player/eslint.config.js new file mode 100644 index 0000000..5e6b472 --- /dev/null +++ b/player/eslint.config.js @@ -0,0 +1,23 @@ +import js from '@eslint/js' +import globals from 'globals' +import reactHooks from 'eslint-plugin-react-hooks' +import reactRefresh from 'eslint-plugin-react-refresh' +import tseslint from 'typescript-eslint' +import { defineConfig, globalIgnores } from 'eslint/config' + +export default defineConfig([ + globalIgnores(['dist']), + { + files: ['**/*.{ts,tsx}'], + extends: [ + js.configs.recommended, + tseslint.configs.recommended, + reactHooks.configs.flat.recommended, + reactRefresh.configs.vite, + ], + languageOptions: { + ecmaVersion: 2020, + globals: globals.browser, + }, + }, +]) diff --git a/player/index.html b/player/index.html new file mode 100644 index 0000000..ae48f3c --- /dev/null +++ b/player/index.html @@ -0,0 +1,13 @@ + + +
+ + + +0&&(q.setInitialMediaSettingsForType(t,W),K.addMediaInfosToBuffer(W,t,c));if(0===(u=u.filter((function(e){return!e.isEmbedded}))).length)return;if(t===a.a.IMAGE)return void(v=Z(R).create({streamInfo:W,adapter:P,baseURLController:e.baseURLController,timelineConverter:e.timelineConverter,debug:S,eventBus:w,events:l.a,dashConstants:o.a,dashMetrics:e.dashMetrics,segmentBaseController:e.segmentBaseController})).initialize();w.trigger(l.a.STREAM_INITIALIZING,{streamInfo:W,mediaInfo:f}),q.setInitialMediaSettingsForType(t,W);var m=function(t,n){var i=t&&t.length>0?t[0]:null,o=E.getModel(i?i.type:null),s=i?i.type:null,u=i?i.mimeType:null,l=i?i.isFragmented:null,c=j(R).create({streamInfo:W,type:s,mimeType:u,timelineConverter:F,adapter:P,manifestModel:C,mediaPlayerModel:D,fragmentModel:o,dashMetrics:e.dashMetrics,baseURLController:e.baseURLController,segmentBaseController:e.segmentBaseController,abrController:B,playbackController:G,mediaController:q,textController:K,errHandler:U,settings:X,boxParser:b,segmentBlacklistController:_});c.initialize(n,d,l),r.push(c);for(var f=0;fs&&(n=s-u),a=n;a>=0;a--){for(var f=!0,d=0;di&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;oi)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return T(this,e,t,n);case"latin1":case"binary":return b(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function w(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i
+
+
+
+
+
+
+
+
diff --git a/player/players/srs-http-server_index.html b/player/players/srs-http-server_index.html
new file mode 100644
index 0000000..8968d03
--- /dev/null
+++ b/player/players/srs-http-server_index.html
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/player/players/srs_gb28181.html b/player/players/srs_gb28181.html
new file mode 100644
index 0000000..3ad7ccf
--- /dev/null
+++ b/player/players/srs_gb28181.html
@@ -0,0 +1,1085 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/player/players/srs_publisher_flash.html b/player/players/srs_publisher_flash.html
new file mode 100644
index 0000000..8b311c9
--- /dev/null
+++ b/player/players/srs_publisher_flash.html
@@ -0,0 +1,644 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ Video:
+
+
+ Simulator: Drop
+
+
+
+
+
+ Video:
+
+
+ Simulator: Drop
+
+
+