Skip to content

Commit

Permalink
Merge pull request #115 from XeryYue/feat/example
Browse files Browse the repository at this point in the history
feat: 优化example示例文件
  • Loading branch information
numberwolf authored Jan 26, 2022
2 parents 9322c4d + 61bca99 commit c55da3f
Show file tree
Hide file tree
Showing 44 changed files with 9,621 additions and 0 deletions.
11 changes: 11 additions & 0 deletions example_normal/README_EN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Setup

```bash

$ npm run serve

# or

$ yarn serve

```
11 changes: 11 additions & 0 deletions example_normal/REAME.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# 启动

```bash

$ npm run serve

# or

$ yarn serve

```
5 changes: 5 additions & 0 deletions example_normal/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"scripts": {
"serve": "node ./server.js"
}
}
31 changes: 31 additions & 0 deletions example_normal/server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const http = require('http')
const path = require('path')
const fs = require('fs')

const exmaplePath = path.join(__dirname, 'index.html')

http
.createServer((req, res) => {
const url = req.url
if (url !== '/') {
let basePath = __dirname
if (url === '/hevc_test_moov_set_head_16s.mp4') {
basePath = path.join(__dirname, '..', 'example')
}
const staticFilePath = path.join(basePath, url)
if (fs.existsSync(staticFilePath)) {
fs.readFile(staticFilePath, (err, data) => {
if (err) console.log(err)
res.end(data)
})
}
} else {
fs.readFile(exmaplePath, (err, data) => {
if (err) console.log(err)
res.end(data)
})
}
})
.listen(3000, () => {
console.log('server work at: http:localhost:3000')
})
23 changes: 23 additions & 0 deletions example_vue/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.DS_Store
node_modules
/dist


# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
12 changes: 12 additions & 0 deletions example_vue/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# example_vue

## Usage

```bash


$ yarn install

$ yarn serve

```
5 changes: 5 additions & 0 deletions example_vue/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
25 changes: 25 additions & 0 deletions example_vue/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "example_vue",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.6.5",
"vue": "^3.0.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/compiler-sfc": "^3.0.0",
"wasm-loader": "^1.3.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
Binary file added example_vue/public/dist/assets/demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example_vue/public/dist/assets/demo3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example_vue/public/dist/assets/demo4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example_vue/public/dist/assets/donate/alipay.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example_vue/public/dist/assets/donate/wechat.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example_vue/public/dist/assets/icon-loading.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example_vue/public/dist/assets/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example_vue/public/dist/assets/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example_vue/public/dist/assets/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example_vue/public/dist/assets/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example_vue/public/dist/demo3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
168 changes: 168 additions & 0 deletions example_vue/public/dist/h265webjs-v20220117.js

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions example_vue/public/dist/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*********************************************************
* LICENSE: GPL-3.0 https://www.gnu.org/licenses/gpl-3.0.txt
*
* Author: Numberwolf - ChangYanlong
* QQ: 531365872
* QQ Group:925466059
* Wechat: numberwolf11
* Discord: numberwolf#8694
* E-Mail: [email protected]
* Github: https://github.com/numberwolf/h265web.js
*
* 作者: 小老虎(Numberwolf)(常炎隆)
* QQ: 531365872
* QQ群: 531365872
* 微信: numberwolf11
* Discord: numberwolf#8694
* 邮箱: [email protected]
* 博客: https://www.jianshu.com/u/9c09c1e00fd1
* Github: https://github.com/numberwolf/h265web.js
*
**********************************************************/
require('./h265webjs-v20220117');
export default class h265webjs {
static createPlayer(videoURL, config) {
return window.new265webjs(videoURL, config);
}

static clear() {
global.STATICE_MEM_playerCount = -1;
global.STATICE_MEM_playerIndexPtr = 0;
}
}
2 changes: 2 additions & 0 deletions example_vue/public/dist/missile-120func-v20220117.js

Large diffs are not rendered by default.

Binary file not shown.
2 changes: 2 additions & 0 deletions example_vue/public/dist/missile-120func.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions example_vue/public/dist/missile-256mb-v20220117.js

Large diffs are not rendered by default.

Binary file not shown.
2 changes: 2 additions & 0 deletions example_vue/public/dist/missile-256mb.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions example_vue/public/dist/missile-512mb-v20220117.js

Large diffs are not rendered by default.

Binary file not shown.
2 changes: 2 additions & 0 deletions example_vue/public/dist/missile-512mb.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions example_vue/public/dist/missile-v20220117.js

Large diffs are not rendered by default.

Binary file added example_vue/public/dist/missile-v20220117.wasm
Binary file not shown.
2 changes: 2 additions & 0 deletions example_vue/public/dist/missile.js

Large diffs are not rendered by default.

Loading

0 comments on commit c55da3f

Please sign in to comment.