-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
53bcef5
commit bdfd6cd
Showing
66 changed files
with
5,072 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
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,4 @@ | ||
node_modules | ||
dist | ||
out | ||
.gitignore |
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,38 @@ | ||
/* eslint-env node */ | ||
require('@rushstack/eslint-patch/modern-module-resolution') | ||
|
||
module.exports = { | ||
root: true, | ||
env: { | ||
browser: true, | ||
commonjs: true, | ||
es6: true, | ||
node: true, | ||
'vue/setup-compiler-macros': true | ||
}, | ||
extends: [ | ||
'plugin:vue/vue3-recommended', | ||
'eslint:recommended', | ||
'@vue/eslint-config-typescript/recommended', | ||
'@vue/eslint-config-prettier' | ||
], | ||
rules: { | ||
'@typescript-eslint/ban-ts-comment': ['error', { 'ts-ignore': 'allow-with-description' }], | ||
'@typescript-eslint/explicit-function-return-type': 'error', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/no-empty-function': ['error', { allow: ['arrowFunctions'] }], | ||
'@typescript-eslint/no-explicit-any': 'error', | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
'@typescript-eslint/no-var-requires': 'off', | ||
'vue/require-default-prop': 'off', | ||
'vue/multi-word-component-names': 'off' | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['*.js'], | ||
rules: { | ||
'@typescript-eslint/explicit-function-return-type': 'off' | ||
} | ||
} | ||
] | ||
} |
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,4 @@ | ||
node_modules | ||
dist | ||
out | ||
*.log* |
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,2 @@ | ||
ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ | ||
shamefully-hoist=true |
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,6 @@ | ||
out | ||
dist | ||
pnpm-lock.yaml | ||
LICENSE.md | ||
tsconfig.json | ||
tsconfig.*.json |
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,4 @@ | ||
singleQuote: true | ||
semi: false | ||
printWidth: 100 | ||
trailingComma: none |
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,3 @@ | ||
{ | ||
"recommendations": ["dbaeumer.vscode-eslint"] | ||
} |
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,18 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Debug Main Process", | ||
"type": "node", | ||
"request": "launch", | ||
"cwd": "${workspaceRoot}", | ||
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite", | ||
"windows": { | ||
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite.cmd" | ||
}, | ||
"runtimeArgs": [ | ||
"--sourcemap" | ||
] | ||
} | ||
] | ||
} |
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,11 @@ | ||
{ | ||
"[typescript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[javascript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[json]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
} | ||
} |
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,36 @@ | ||
# camera | ||
|
||
#### Description | ||
桌面摄像头软件 | ||
|
||
#### Software Architecture | ||
Software architecture description | ||
|
||
#### Installation | ||
|
||
1. xxxx | ||
2. xxxx | ||
3. xxxx | ||
|
||
#### Instructions | ||
|
||
1. xxxx | ||
2. xxxx | ||
3. xxxx | ||
|
||
#### Contribution | ||
|
||
1. Fork the repository | ||
2. Create Feat_xxx branch | ||
3. Commit your code | ||
4. Create Pull Request | ||
|
||
|
||
#### Gitee Feature | ||
|
||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md | ||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com) | ||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) | ||
4. The most valuable open source project [GVP](https://gitee.com/gvp) | ||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) | ||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) |
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,2 +1,31 @@ | ||
# camera | ||
桌面摄像头软件,可用于直播录课、远程教学 | ||
# 桌面摄像头 | ||
|
||
> 向军大叔每晚八点在 [抖音](https://live.douyin.com/houdunren) 和 [bilibli](https://space.bilibili.com/282190994) 直播 | ||
<img src="./assets/xj.jpg" alt="xj-small" style="border-radius: 10px;object-fit: cover;height:200px;" /> | ||
|
||
基于 Electron+Vue3+Vite 开发的桌面摄像头软件,方便直播录课、短视频拍摄等场景。 | ||
|
||
## 功能特点 | ||
|
||
- 电脑有多个摄像头时,支持更换摄像头 | ||
- 摄像头窗口置顶 | ||
- 配置边框宽度 | ||
- 定义边框颜色 | ||
- 支持 window、Mac 多平台 | ||
|
||
## 效果展示 | ||
|
||
摄像头角效果 | ||
|
||
<img src="./assets/image-20230303145607103.png" alt="image-20230303145607103" style="zoom:50%;" /> | ||
|
||
|
||
|
||
支持多种参数的配置 | ||
|
||
<img src="./assets/image-20230303145726417.png" alt="image-20230303145726417" style="zoom:50%;" /> | ||
|
||
支持多摄像头摄像头选择 | ||
|
||
<img src="./assets/image-20230303145754324.png" alt="image-20230303145754324" style="zoom:50%;" /> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.security.cs.allow-jit</key> | ||
<true/> | ||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key> | ||
<true/> | ||
<key>com.apple.security.cs.allow-dyld-environment-variables</key> | ||
<true/> | ||
</dict> | ||
</plist> |
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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,36 @@ | ||
const { notarize } = require('@electron/notarize') | ||
|
||
module.exports = async (context) => { | ||
if (process.platform !== 'darwin') return | ||
|
||
console.log('aftersign hook triggered, start to notarize app.') | ||
|
||
if (!process.env.CI) { | ||
console.log(`skipping notarizing, not in CI.`) | ||
return | ||
} | ||
|
||
if (!('APPLE_ID' in process.env && 'APPLE_ID_PASS' in process.env)) { | ||
console.warn('skipping notarizing, APPLE_ID and APPLE_ID_PASS env variables must be set.') | ||
return | ||
} | ||
|
||
const appId = 'com.electron.app' | ||
|
||
const { appOutDir } = context | ||
|
||
const appName = context.packager.appInfo.productFilename | ||
|
||
try { | ||
await notarize({ | ||
appBundleId: appId, | ||
appPath: `${appOutDir}/${appName}.app`, | ||
appleId: process.env.APPLE_ID, | ||
appleIdPassword: process.env.APPLEIDPASS | ||
}) | ||
} catch (error) { | ||
console.error(error) | ||
} | ||
|
||
console.log(`done notarizing ${appId}.`) | ||
} |
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,3 @@ | ||
provider: generic | ||
url: https://example.com/auto-updates | ||
updaterCacheDirName: electron-app-updater |
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,46 @@ | ||
appId: com.houdunren.camera | ||
productName: houdunren-camera | ||
directories: | ||
buildResources: build | ||
files: | ||
- '!**/.vscode/*' | ||
- '!src/*' | ||
- '!electron.vite.config.{js,ts,mjs,cjs}' | ||
- '!{.eslintignore,.eslintrc.cjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}' | ||
- '!{tsconfig.json,tsconfig.node.json,tsconfig.web.json}' | ||
asarUnpack: | ||
- resources/* | ||
afterSign: build/notarize.js | ||
win: | ||
executableName: houdunren-camera | ||
nsis: | ||
artifactName: ${name}-${version}-setup.${ext} | ||
shortcutName: ${productName} | ||
uninstallDisplayName: ${productName} | ||
createDesktopShortcut: always | ||
mac: | ||
entitlementsInherit: build/entitlements.mac.plist | ||
extendInfo: | ||
- NSCameraUsageDescription: Application requests access to the device's camera. | ||
- NSMicrophoneUsageDescription: Application requests access to the device's microphone. | ||
- NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder. | ||
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder. | ||
dmg: | ||
artifactName: ${name}-${version}.${ext} | ||
linux: | ||
target: | ||
- AppImage | ||
- snap | ||
- deb | ||
maintainer: electronjs.org | ||
category: Utility | ||
appImage: | ||
artifactName: ${name}-${version}.${ext} | ||
npmRebuild: false | ||
# publish: | ||
# provider: generic | ||
# url: https://github.com/houdunwang/camera | ||
# publish: | ||
# provider: github | ||
# releaseType: release | ||
# url: https://github.com/houdunwang/camera |
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,20 @@ | ||
import { resolve } from 'path' | ||
import { defineConfig, externalizeDepsPlugin } from 'electron-vite' | ||
import vue from '@vitejs/plugin-vue' | ||
|
||
export default defineConfig({ | ||
main: { | ||
plugins: [externalizeDepsPlugin()] | ||
}, | ||
preload: { | ||
plugins: [externalizeDepsPlugin()] | ||
}, | ||
renderer: { | ||
resolve: { | ||
alias: { | ||
'@renderer': resolve('src/renderer/src') | ||
} | ||
}, | ||
plugins: [vue()] | ||
} | ||
}) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,57 @@ | ||
{ | ||
"name": "houdunren-camera", | ||
"version": "1.0.0", | ||
"description": "方便好用的桌面摄像头软件,适合直播、录课、内容分享时使用", | ||
"main": "./out/main/index.js", | ||
"author": "向军大叔", | ||
"homepage": "https://www.hdcms.com", | ||
"repository": "https://github.com/houdunwang/camera", | ||
"scripts": { | ||
"format": "prettier --write .", | ||
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts,.vue --fix", | ||
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false", | ||
"typecheck:web": "vue-tsc --noEmit -p tsconfig.web.json --composite false", | ||
"typecheck": "npm run typecheck:node && npm run typecheck:web", | ||
"start": "electron-vite preview", | ||
"dev": "electron-vite dev", | ||
"build": "npm run typecheck && electron-vite build", | ||
"postinstall": "electron-builder install-app-deps", | ||
"build:win": "npm run build && electron-builder --win --config", | ||
"build:mac": "npm run build && electron-builder --mac --config", | ||
"build:linux": "npm run build && electron-builder --linux --config" | ||
}, | ||
"dependencies": { | ||
"@electron-toolkit/preload": "^1.0.3", | ||
"@electron-toolkit/utils": "^1.0.2", | ||
"@icon-park/vue-next": "^1.4.2", | ||
"electron-updater": "^5.3.0", | ||
"element-plus": "^2.2.32", | ||
"pinia": "^2.0.32", | ||
"pinia-plugin-persistedstate": "^3.1.0" | ||
}, | ||
"devDependencies": { | ||
"@electron-toolkit/tsconfig": "^1.0.1", | ||
"@electron/notarize": "^1.2.3", | ||
"@rushstack/eslint-patch": "^1.2.0", | ||
"@types/node": "16.18.11", | ||
"@vitejs/plugin-vue": "^4.0.0", | ||
"@vue/eslint-config-prettier": "^7.1.0", | ||
"@vue/eslint-config-typescript": "^11.0.2", | ||
"autoprefixer": "^10.4.13", | ||
"electron": "^21.4.2", | ||
"electron-builder": "^23.6.0", | ||
"electron-vite": "^1.0.19", | ||
"eslint": "^8.35.0", | ||
"eslint-plugin-vue": "^9.9.0", | ||
"less": "^4.1.3", | ||
"postcss": "^8.4.21", | ||
"prettier": "^2.8.4", | ||
"sass": "^1.58.3", | ||
"scss": "^0.2.4", | ||
"tailwindcss": "^3.2.7", | ||
"typescript": "^4.9.5", | ||
"vite": "^4.1.4", | ||
"vue": "^3.2.47", | ||
"vue-tsc": "^1.2.0" | ||
} | ||
} |
Oops, something went wrong.