Skip to content

Commit 4166b7d

Browse files
committed
update: optimize ui
1 parent bbfe03d commit 4166b7d

File tree

14 files changed

+287
-233
lines changed

14 files changed

+287
-233
lines changed

.eslintrc.cjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ require('@rushstack/eslint-patch/modern-module-resolution')
33

44
module.exports = {
55
root: true,
6-
'extends': [
6+
extends: [
77
'plugin:vue/vue3-essential',
88
'eslint:recommended',
99
'@vue/eslint-config-typescript',
10-
'@vue/eslint-config-prettier'
10+
'@vue/eslint-config-prettier',
1111
],
1212
parserOptions: {
13-
ecmaVersion: 'latest'
14-
}
13+
ecmaVersion: 'latest',
14+
},
1515
}

README-en.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
## Web MediaDevices Player
2+
3+
A web application for playing system [video/audio] input devices using the [Media Capture and Streams API](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia) technology.
4+
5+
- Web version: https://canwdev.github.io/web-mediadevices-player/
6+
- Tauri packaged client: [Releases](https://github.com/canwdev/web-mediadevices-player/releases)
7+
- [Chinese Readme](./README.md)
8+
9+
Main purposes:
10+
- View HDMI to USB capture card
11+
- Play webcam videos, desktop screen recording
12+
- Capture screenshots and record in webm format
13+
- v1.1.5 New features
14+
- [CH9329](https://one-kvm.mofeng.run/ch9329_hid/) KVM keyboard and mouse control, ref: [webusbkvm](https://github.com/kkocdko/kblog/blob/master/source/toys/webusbkvm/README.md)
15+
- Supports relative mouse, absolute mouse, hotkeys, and ASCII text sending.
16+
- Video screen QR code scanning
17+
18+
![screenshot](docs/screenshot-2.jpg)
19+
![screenshot](docs/screenshot-3.jpg)
20+
![screenshot](docs/screenshot.png)
21+
22+
Tips:
23+
- The first time you use it, it will request camera and microphone permissions. You can reject microphone permissions if not needed. After requesting, it will wait a few seconds to load the devices.
24+
- This page must run in https or localhost environments. Other environments (such as: filesystem) do not have access to devices.
25+
- There may be issues with dragging the progress bar of the recorded webm video. Manually transcoding it to mp4 can solve the problem.
26+
27+
## Development
28+
29+
> Contributions are welcome
30+
31+
```sh
32+
# Install dependencies
33+
yarn install
34+
35+
# Development mode
36+
yarn dev
37+
38+
# Build the Web version
39+
yarn build
40+
41+
# Build Tauri App
42+
yarn build:tauri
43+
```
44+
45+
---
46+
47+
## Star History
48+
49+
- Thanks for your stars https://www.ruanyifeng.com/blog/2024/06/weekly-issue-303.html
50+
51+
[![Star History Chart](https://api.star-history.com/svg?repos=canwdev/web-mediadevices-player&type=Date)](https://star-history.com/#canwdev/web-mediadevices-player&Date)

README.md

Lines changed: 7 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
- 网页版:https://canwdev.github.io/web-mediadevices-player/
66
- Tauri 打包的客户端:[Releases](https://github.com/canwdev/web-mediadevices-player/releases)
7-
- [English Readme](https://github.com/canwdev/web-mediadevices-player/tree/master?tab=readme-ov-file#english)
7+
- [English Readme](./README-en.md)
88

99
主要用途:
1010
- HDMI to USB 采集卡查看
@@ -15,9 +15,9 @@
1515
- 支持相对鼠标、绝对鼠标、快捷键、ASCII文本发送
1616
- 视频画面二维码扫描
1717

18-
![screenshot](screenshot-2.jpg)
19-
![screenshot](screenshot-3.jpg)
20-
![screenshot](screenshot.png)
18+
![screenshot](docs/screenshot-2.jpg)
19+
![screenshot](docs/screenshot-3.jpg)
20+
![screenshot](docs/screenshot.png)
2121

2222
提示:
2323
- 首次使用会请求摄像头和麦克风权限,如果不需要麦克风权限可以拒绝,请求过后会等待几秒钟加载设备。
@@ -46,45 +46,8 @@ yarn build:tauri
4646

4747
---
4848

49-
## English
49+
## Star History
5050

51-
A web application for playing system [video/audio] input devices using the [Media Capture and Streams API](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia) technology.
51+
- Thanks for your stars https://www.ruanyifeng.com/blog/2024/06/weekly-issue-303.html
5252

53-
- Web version: https://canwdev.github.io/web-mediadevices-player/
54-
- Tauri packaged client: [Releases](https://github.com/canwdev/web-mediadevices-player/releases)
55-
56-
Main purposes:
57-
- View HDMI to USB capture card
58-
- Play webcam videos, desktop screen recording
59-
- Capture screenshots and record in webm format
60-
- v1.1.5 New features
61-
- [CH9329](https://one-kvm.mofeng.run/ch9329_hid/) KVM keyboard and mouse control, ref: [webusbkvm](https://github.com/kkocdko/kblog/blob/master/source/toys/webusbkvm/README.md)
62-
- Supports relative mouse, absolute mouse, hotkeys, and ASCII text sending.
63-
- Video screen QR code scanning
64-
65-
![screenshot](screenshot-2.jpg)
66-
![screenshot](screenshot-3.jpg)
67-
![screenshot](screenshot.png)
68-
69-
Tips:
70-
- The first time you use it, it will request camera and microphone permissions. You can reject microphone permissions if not needed. After requesting, it will wait a few seconds to load the devices.
71-
- This page must run in https or localhost environments. Other environments (such as: filesystem) do not have access to devices.
72-
- There may be issues with dragging the progress bar of the recorded webm video. Manually transcoding it to mp4 can solve the problem.
73-
74-
## Development
75-
76-
> Contributions are welcome
77-
78-
```sh
79-
# Install dependencies
80-
yarn install
81-
82-
# Development mode
83-
yarn dev
84-
85-
# Build the Web version
86-
yarn build
87-
88-
# Build Tauri App
89-
yarn build:tauri
90-
```
53+
[![Star History Chart](https://api.star-history.com/svg?repos=canwdev/web-mediadevices-player&type=Date)](https://star-history.com/#canwdev/web-mediadevices-player&Date)
File renamed without changes.
File renamed without changes.
File renamed without changes.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "web-mediadevices-player",
3-
"version": "1.1.5",
3+
"version": "1.1.6",
44
"private": true,
55
"type": "module",
66
"scripts": {

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"package": {
1010
"productName": "web-mediadevices-player",
11-
"version": "1.1.5"
11+
"version": "1.1.6"
1212
},
1313
"tauri": {
1414
"allowlist": {

src/components/KvmPlayer/SettingsPrompt.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const kvmInputHelp = () => {
3838
</script>
3939

4040
<template>
41-
<transition name="fade">
41+
<transition name="fade-scale">
4242
<div
4343
ref="rootRef"
4444
v-if="mVisible"
@@ -62,10 +62,10 @@ const kvmInputHelp = () => {
6262
</select>
6363
</label>
6464

65-
<label title="Toggle video element controls" class="cursor-pointer">
66-
<input type="checkbox" v-model="settingsStore.isShowControls" />
67-
<span>Video Controls UI</span>
68-
</label>
65+
<!--<label title="Toggle video element controls" class="cursor-pointer">-->
66+
<!-- <input type="checkbox" v-model="settingsStore.isShowControls" />-->
67+
<!-- <span>Video Controls UI</span>-->
68+
<!--</label>-->
6969

7070
<label class="cursor-pointer">
7171
<input type="checkbox" v-model="settingsStore.floatUI" />

src/components/KvmPlayer/UI/DragButton.vue

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,26 @@ const {docked} = toRefs(props)
1414
</script>
1515

1616
<template>
17-
<div class="darg-button-wrapper">
17+
<div class="drag-button-wrapper">
1818
<button :class="{docked}" class="btn-no-style btn-action-bar-drag">
19-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
20-
<path
21-
d="M16,12A2,2 0 0,1 18,10A2,2 0 0,1 20,12A2,2 0 0,1 18,14A2,2 0 0,1 16,12M10,12A2,2 0 0,1 12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12M4,12A2,2 0 0,1 6,10A2,2 0 0,1 8,12A2,2 0 0,1 6,14A2,2 0 0,1 4,12Z"
22-
/>
19+
<!--<svg v-if="docked" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">-->
20+
<!-- <path-->
21+
<!-- d="M16,12A2,2 0 0,1 18,10A2,2 0 0,1 20,12A2,2 0 0,1 18,14A2,2 0 0,1 16,12M10,12A2,2 0 0,1 12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12M4,12A2,2 0 0,1 6,10A2,2 0 0,1 8,12A2,2 0 0,1 6,14A2,2 0 0,1 4,12Z"-->
22+
<!-- />-->
23+
<!--</svg>-->
24+
<svg v-if="docked" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
25+
<path d="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z" />
26+
</svg>
27+
28+
<svg v-else xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
29+
<path d="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z" />
2330
</svg>
2431
</button>
2532
</div>
2633
</template>
2734

2835
<style lang="scss" scoped>
29-
.darg-button-wrapper {
36+
.drag-button-wrapper {
3037
position: absolute;
3138
top: 0;
3239
left: 0;
@@ -43,10 +50,14 @@ const {docked} = toRefs(props)
4350
line-height: 1;
4451
color: white;
4552
46-
transition: all 0.3s;
47-
transform: translateY(15px);
53+
transition: all 0.3s cubic-bezier(0.6, 0.08, 0.55, 1.4);
54+
transform: translateY(10px);
4855
border-radius: var(--radius);
4956
//opacity: 0;
57+
//background-color: red;
58+
height: 10px;
59+
display: flex;
60+
align-items: center;
5061
5162
&::before {
5263
left: -80% !important;
@@ -62,6 +73,7 @@ const {docked} = toRefs(props)
6273
transform: translateY(0px);
6374
border-radius: 0 0 var(--radius) var(--radius);
6475
background-color: var(--bg);
76+
height: 20px;
6577
&::before {
6678
left: -100% !important;
6779
opacity: 1 !important;

0 commit comments

Comments
 (0)