feat: mp
parent
e867d9a81b
commit
bcf4db28e4
|
@ -49,11 +49,13 @@
|
|||
"@ant-design/colors": "^7.0.0",
|
||||
"@ant-design/icons-vue": "^6.1.0",
|
||||
"@iconify/iconify": "^3.1.1",
|
||||
"@videojs-player/vue": "^1.0.0",
|
||||
"@vue/runtime-core": "^3.3.4",
|
||||
"@vueuse/core": "^10.3.0",
|
||||
"@zxcvbn-ts/core": "^3.0.3",
|
||||
"ant-design-vue": "^4.0.0",
|
||||
"axios": "^1.4.0",
|
||||
"benz-amr-recorder": "^1.1.5",
|
||||
"codemirror": "^5.65.3",
|
||||
"cron-parser": "^4.9.0",
|
||||
"cropperjs": "^1.5.13",
|
||||
|
@ -70,6 +72,7 @@
|
|||
"sortablejs": "^1.15.0",
|
||||
"tinymce": "^5.10.7",
|
||||
"vditor": "^3.9.4",
|
||||
"video-js": "^0.7.0",
|
||||
"vue": "^3.3.4",
|
||||
"vue-i18n": "^9.2.2",
|
||||
"vue-json-pretty": "^2.2.4",
|
||||
|
@ -95,7 +98,7 @@
|
|||
"@types/sortablejs": "^1.15.1",
|
||||
"@typescript-eslint/eslint-plugin": "^6.4.1",
|
||||
"@typescript-eslint/parser": "^6.4.1",
|
||||
"@vitejs/plugin-vue": "4.3.2",
|
||||
"@vitejs/plugin-vue": "4.3.3",
|
||||
"@vitejs/plugin-vue-jsx": "^3.0.2",
|
||||
"@vue/compiler-sfc": "^3.3.4",
|
||||
"cross-env": "^7.0.3",
|
||||
|
@ -115,7 +118,7 @@
|
|||
"postcss-less": "^6.0.0",
|
||||
"prettier": "^3.0.2",
|
||||
"rimraf": "^5.0.1",
|
||||
"rollup": "^3.28.0",
|
||||
"rollup": "^3.28.1",
|
||||
"rollup-plugin-visualizer": "^5.9.2",
|
||||
"stylelint": "^15.10.3",
|
||||
"stylelint-config-recess-order": "^4.3.0",
|
||||
|
|
289
pnpm-lock.yaml
289
pnpm-lock.yaml
|
@ -14,6 +14,9 @@ dependencies:
|
|||
'@iconify/iconify':
|
||||
specifier: ^3.1.1
|
||||
version: 3.1.1
|
||||
'@videojs-player/vue':
|
||||
specifier: ^1.0.0
|
||||
version: 1.0.0(@types/video.js@7.3.52)(video.js@7.21.5)(vue@3.3.4)
|
||||
'@vue/runtime-core':
|
||||
specifier: ^3.3.4
|
||||
version: 3.3.4
|
||||
|
@ -29,6 +32,9 @@ dependencies:
|
|||
axios:
|
||||
specifier: ^1.4.0
|
||||
version: 1.4.0(debug@4.3.4)
|
||||
benz-amr-recorder:
|
||||
specifier: ^1.1.5
|
||||
version: 1.1.5
|
||||
codemirror:
|
||||
specifier: ^5.65.3
|
||||
version: 5.65.3
|
||||
|
@ -77,6 +83,9 @@ dependencies:
|
|||
vditor:
|
||||
specifier: ^3.9.4
|
||||
version: 3.9.4
|
||||
video-js:
|
||||
specifier: ^0.7.0
|
||||
version: 0.7.0
|
||||
vue:
|
||||
specifier: ^3.3.4
|
||||
version: 3.3.4
|
||||
|
@ -149,8 +158,8 @@ devDependencies:
|
|||
specifier: ^6.4.1
|
||||
version: 6.4.1(eslint@8.47.0)(typescript@5.1.6)
|
||||
'@vitejs/plugin-vue':
|
||||
specifier: 4.3.2
|
||||
version: 4.3.2(vite@4.4.9)(vue@3.3.4)
|
||||
specifier: 4.3.3
|
||||
version: 4.3.3(vite@4.4.9)(vue@3.3.4)
|
||||
'@vitejs/plugin-vue-jsx':
|
||||
specifier: ^3.0.2
|
||||
version: 3.0.2(vite@4.4.9)(vue@3.3.4)
|
||||
|
@ -209,11 +218,11 @@ devDependencies:
|
|||
specifier: ^5.0.1
|
||||
version: 5.0.1
|
||||
rollup:
|
||||
specifier: ^3.28.0
|
||||
version: 3.28.0
|
||||
specifier: ^3.28.1
|
||||
version: 3.28.1
|
||||
rollup-plugin-visualizer:
|
||||
specifier: ^5.9.2
|
||||
version: 5.9.2(rollup@3.28.0)
|
||||
version: 5.9.2(rollup@3.28.1)
|
||||
stylelint:
|
||||
specifier: ^15.10.3
|
||||
version: 15.10.3
|
||||
|
@ -243,7 +252,7 @@ devDependencies:
|
|||
version: 5.1.6
|
||||
unocss:
|
||||
specifier: ^0.55.2
|
||||
version: 0.55.2(postcss@8.4.28)(rollup@3.28.0)(vite@4.4.9)
|
||||
version: 0.55.2(postcss@8.4.28)(rollup@3.28.1)(vite@4.4.9)
|
||||
vite:
|
||||
specifier: ^4.4.9
|
||||
version: 4.4.9(@types/node@20.5.0)(less@4.2.0)(terser@5.19.2)
|
||||
|
@ -267,7 +276,7 @@ devDependencies:
|
|||
version: 2.0.1(vite@4.4.9)
|
||||
vite-vue-plugin-html:
|
||||
specifier: ^1.0.2
|
||||
version: 1.0.2(rollup@3.28.0)(vite@4.4.9)
|
||||
version: 1.0.2(rollup@3.28.1)(vite@4.4.9)
|
||||
vue-eslint-parser:
|
||||
specifier: ^9.3.1
|
||||
version: 9.3.1(eslint@8.47.0)
|
||||
|
@ -2659,7 +2668,7 @@ packages:
|
|||
rollup: 2.79.1
|
||||
dev: true
|
||||
|
||||
/@rollup/pluginutils@5.0.2(rollup@3.28.0):
|
||||
/@rollup/pluginutils@5.0.2(rollup@3.28.1):
|
||||
resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
peerDependencies:
|
||||
|
@ -2671,10 +2680,10 @@ packages:
|
|||
'@types/estree': 1.0.0
|
||||
estree-walker: 2.0.2
|
||||
picomatch: 2.3.1
|
||||
rollup: 3.28.0
|
||||
rollup: 3.28.1
|
||||
dev: true
|
||||
|
||||
/@rollup/pluginutils@5.0.3(rollup@3.28.0):
|
||||
/@rollup/pluginutils@5.0.3(rollup@3.28.1):
|
||||
resolution: {integrity: sha512-hfllNN4a80rwNQ9QCxhxuHCGHMAvabXqxNdaChUSSadMre7t4iEUI6fFAhBOn/eIYTgYVhBv7vCLsAJ4u3lf3g==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
peerDependencies:
|
||||
|
@ -2686,7 +2695,7 @@ packages:
|
|||
'@types/estree': 1.0.0
|
||||
estree-walker: 2.0.2
|
||||
picomatch: 2.3.1
|
||||
rollup: 3.28.0
|
||||
rollup: 3.28.1
|
||||
dev: true
|
||||
|
||||
/@simonwep/pickr@1.8.2:
|
||||
|
@ -2852,6 +2861,10 @@ packages:
|
|||
resolution: {integrity: sha512-cputDpIbFgLUaGQn6Vqg3/YsJwxUwHLO13v3i5ouxT4lat0khip9AEWxtERujXV9wxIB1EyF97BSJFt6vpdI8g==}
|
||||
dev: true
|
||||
|
||||
/@types/video.js@7.3.52:
|
||||
resolution: {integrity: sha512-WFj/HkNVCfkchXDeDU0QbimC356FB5vva3g5mgsjk8n3UMKqP9S522rQAmu9LGPiCmShZRPuAlkXmbp5WId6ow==}
|
||||
dev: false
|
||||
|
||||
/@types/web-bluetooth@0.0.17:
|
||||
resolution: {integrity: sha512-4p9vcSmxAayx72yn70joFoL44c9MO/0+iVEBIQXe3v2h2SiAsEIo/G5v6ObFWvNKRFjbrVadNf9LqEEZeQPzdA==}
|
||||
dev: false
|
||||
|
@ -3110,7 +3123,7 @@ packages:
|
|||
eslint-visitor-keys: 3.4.3
|
||||
dev: true
|
||||
|
||||
/@unocss/astro@0.55.2(rollup@3.28.0)(vite@4.4.9):
|
||||
/@unocss/astro@0.55.2(rollup@3.28.1)(vite@4.4.9):
|
||||
resolution: {integrity: sha512-cSzBKPEveZZQDZp5bq0UlL8CVvzB/1LsgZmZufxi9oMMjMJYqzfTkKg5z65GcP82Xp5c0N3KKkl/R6I+/7Iwvw==}
|
||||
peerDependencies:
|
||||
vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0
|
||||
|
@ -3120,19 +3133,19 @@ packages:
|
|||
dependencies:
|
||||
'@unocss/core': 0.55.2
|
||||
'@unocss/reset': 0.55.2
|
||||
'@unocss/vite': 0.55.2(rollup@3.28.0)(vite@4.4.9)
|
||||
'@unocss/vite': 0.55.2(rollup@3.28.1)(vite@4.4.9)
|
||||
vite: 4.4.9(@types/node@20.5.0)(less@4.2.0)(terser@5.19.2)
|
||||
transitivePeerDependencies:
|
||||
- rollup
|
||||
dev: true
|
||||
|
||||
/@unocss/cli@0.55.2(rollup@3.28.0):
|
||||
/@unocss/cli@0.55.2(rollup@3.28.1):
|
||||
resolution: {integrity: sha512-ZJ8aBhm+3WjGCA5HcOQ4C3mbtJwkgMX2gpjjJ0MPh/iZOz3+/zmHlrXJCS3jIFouRYSwxxanWdrGUuLIQLqPhQ==}
|
||||
engines: {node: '>=14'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@ampproject/remapping': 2.2.1
|
||||
'@rollup/pluginutils': 5.0.3(rollup@3.28.0)
|
||||
'@rollup/pluginutils': 5.0.3(rollup@3.28.1)
|
||||
'@unocss/config': 0.55.2
|
||||
'@unocss/core': 0.55.2
|
||||
'@unocss/preset-uno': 0.55.2
|
||||
|
@ -3284,13 +3297,13 @@ packages:
|
|||
'@unocss/core': 0.55.2
|
||||
dev: true
|
||||
|
||||
/@unocss/vite@0.55.2(rollup@3.28.0)(vite@4.4.9):
|
||||
/@unocss/vite@0.55.2(rollup@3.28.1)(vite@4.4.9):
|
||||
resolution: {integrity: sha512-JEyEaJt8D+Ed3Z8GDQ0hMWqKsB47/DoS+aPzDoXSIVozgi8seHtfSChBOBUSgcCrozfBVp42YHbYYyloDkb2Yw==}
|
||||
peerDependencies:
|
||||
vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0
|
||||
dependencies:
|
||||
'@ampproject/remapping': 2.2.1
|
||||
'@rollup/pluginutils': 5.0.3(rollup@3.28.0)
|
||||
'@rollup/pluginutils': 5.0.3(rollup@3.28.1)
|
||||
'@unocss/config': 0.55.2
|
||||
'@unocss/core': 0.55.2
|
||||
'@unocss/inspector': 0.55.2
|
||||
|
@ -3304,6 +3317,51 @@ packages:
|
|||
- rollup
|
||||
dev: true
|
||||
|
||||
/@videojs-player/vue@1.0.0(@types/video.js@7.3.52)(video.js@7.21.5)(vue@3.3.4):
|
||||
resolution: {integrity: sha512-WonTezRfKu3fYdQLt/ta+nuKH6gMZUv8l40Jke/j4Lae7IqeO/+lLAmBnh3ni88bwR+vkFXIlZ2Ci7VKInIYJg==}
|
||||
peerDependencies:
|
||||
'@types/video.js': 7.x
|
||||
video.js: 7.x
|
||||
vue: 3.x
|
||||
dependencies:
|
||||
'@types/video.js': 7.3.52
|
||||
video.js: 7.21.5
|
||||
vue: 3.3.4
|
||||
dev: false
|
||||
|
||||
/@videojs/http-streaming@2.16.2(video.js@7.21.5):
|
||||
resolution: {integrity: sha512-etPTUdCFu7gUWc+1XcbiPr+lrhOcBu3rV5OL1M+3PDW89zskScAkkcdqYzP4pFodBPye/ydamQoTDScOnElw5A==}
|
||||
engines: {node: '>=8', npm: '>=5'}
|
||||
peerDependencies:
|
||||
video.js: ^6 || ^7
|
||||
dependencies:
|
||||
'@babel/runtime': 7.21.0
|
||||
'@videojs/vhs-utils': 3.0.5
|
||||
aes-decrypter: 3.1.3
|
||||
global: 4.4.0
|
||||
m3u8-parser: 4.8.0
|
||||
mpd-parser: 0.22.1
|
||||
mux.js: 6.0.1
|
||||
video.js: 7.21.5
|
||||
dev: false
|
||||
|
||||
/@videojs/vhs-utils@3.0.5:
|
||||
resolution: {integrity: sha512-PKVgdo8/GReqdx512F+ombhS+Bzogiofy1LgAj4tN8PfdBx3HSS7V5WfJotKTqtOWGwVfSWsrYN/t09/DSryrw==}
|
||||
engines: {node: '>=8', npm: '>=5'}
|
||||
dependencies:
|
||||
'@babel/runtime': 7.21.0
|
||||
global: 4.4.0
|
||||
url-toolkit: 2.2.5
|
||||
dev: false
|
||||
|
||||
/@videojs/xhr@2.6.0:
|
||||
resolution: {integrity: sha512-7J361GiN1tXpm+gd0xz2QWr3xNWBE+rytvo8J3KuggFaLg+U37gZQ2BuPLcnkfGffy2e+ozY70RHC8jt7zjA6Q==}
|
||||
dependencies:
|
||||
'@babel/runtime': 7.21.0
|
||||
global: 4.4.0
|
||||
is-function: 1.0.2
|
||||
dev: false
|
||||
|
||||
/@vitejs/plugin-vue-jsx@3.0.2(vite@4.4.9)(vue@3.3.4):
|
||||
resolution: {integrity: sha512-obF26P2Z4Ogy3cPp07B4VaW6rpiu0ue4OT2Y15UxT5BZZ76haUY9guOsZV3uWh/I6xc+VeiW+ZVabRE82FyzWw==}
|
||||
engines: {node: ^14.18.0 || >=16.0.0}
|
||||
|
@ -3320,8 +3378,8 @@ packages:
|
|||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@vitejs/plugin-vue@4.3.2(vite@4.4.9)(vue@3.3.4):
|
||||
resolution: {integrity: sha512-iDDhGruwhKkwNwT5qgtGaeTxF4ULs52xpQbsC27F01kf3aQBHtrDP738pmHw4oclVAUA3m+Vk8gxhDV5KbfM+A==}
|
||||
/@vitejs/plugin-vue@4.3.3(vite@4.4.9)(vue@3.3.4):
|
||||
resolution: {integrity: sha512-ssxyhIAZqB0TrpUg6R0cBpCuMk9jTIlO1GNSKKQD6S8VjnXi6JXKfUXjSsxey9IwQiaRGsO1WnW9Rkl1L6AJVw==}
|
||||
engines: {node: ^14.18.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
vite: ^4.0.0
|
||||
|
@ -3502,6 +3560,11 @@ packages:
|
|||
- vue
|
||||
dev: false
|
||||
|
||||
/@xmldom/xmldom@0.8.10:
|
||||
resolution: {integrity: sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==}
|
||||
engines: {node: '>=10.0.0'}
|
||||
dev: false
|
||||
|
||||
/@zxcvbn-ts/core@3.0.3:
|
||||
resolution: {integrity: sha512-GQo19iG/hQzs5uVxLCbNiaNTmTwGcfYZtge6L8CZiAULk0zieqZd0eThDQstljgjQWu4oO5olnPA3jnsV5sjaA==}
|
||||
dependencies:
|
||||
|
@ -3540,6 +3603,15 @@ packages:
|
|||
engines: {node: '>=0.8'}
|
||||
dev: false
|
||||
|
||||
/aes-decrypter@3.1.3:
|
||||
resolution: {integrity: sha512-VkG9g4BbhMBy+N5/XodDeV6F02chEk9IpgRTq/0bS80y4dzy79VH2Gtms02VXomf3HmyRe3yyJYkJ990ns+d6A==}
|
||||
dependencies:
|
||||
'@babel/runtime': 7.21.0
|
||||
'@videojs/vhs-utils': 3.0.5
|
||||
global: 4.4.0
|
||||
pkcs7: 1.0.4
|
||||
dev: false
|
||||
|
||||
/ajv@6.12.6:
|
||||
resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==}
|
||||
dependencies:
|
||||
|
@ -3703,6 +3775,10 @@ packages:
|
|||
engines: {node: '>=0.10.0'}
|
||||
dev: true
|
||||
|
||||
/asap@2.0.6:
|
||||
resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==}
|
||||
dev: false
|
||||
|
||||
/assign-symbols@1.0.0:
|
||||
resolution: {integrity: sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
@ -3822,6 +3898,16 @@ packages:
|
|||
resolution: {integrity: sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==}
|
||||
dev: true
|
||||
|
||||
/benz-amr-recorder@1.1.5:
|
||||
resolution: {integrity: sha512-NepctcNTsZHK8NxBb5uKO5p8S+xkbm+vD6GLSkCYdJeEsriexvgumLHpDkanX4QJBcLRMVtg16buWMs+gUPB3g==}
|
||||
dependencies:
|
||||
benz-recorderjs: 1.0.5
|
||||
dev: false
|
||||
|
||||
/benz-recorderjs@1.0.5:
|
||||
resolution: {integrity: sha512-EwedOQo9KLti7HxDi/eZY51PSRbAXnOdEZmLvJ6ro3QQSoF9Y3AXBt57MIllGvVz5vtFYMeikG+GD7qTm3+p9w==}
|
||||
dev: false
|
||||
|
||||
/big.js@5.2.2:
|
||||
resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==}
|
||||
dev: true
|
||||
|
@ -4659,6 +4745,10 @@ packages:
|
|||
entities: 4.4.0
|
||||
dev: true
|
||||
|
||||
/dom-walk@0.1.2:
|
||||
resolution: {integrity: sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==}
|
||||
dev: false
|
||||
|
||||
/domelementtype@1.3.1:
|
||||
resolution: {integrity: sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==}
|
||||
dev: true
|
||||
|
@ -4761,6 +4851,14 @@ packages:
|
|||
resolution: {integrity: sha512-mwknuemBZnoOCths4GtpU/SDuVMp3uQHKa2UNJT9/aVD6WVRjGpXOxRGX7lm6ILIenTdGXPSTCTDaWos5tEU8Q==}
|
||||
dev: true
|
||||
|
||||
/element-kit@1.0.6:
|
||||
resolution: {integrity: sha512-cH29YJ5n/cp36+a376JkYkcpvGJWIRRmrw1h8gAoRXMJwLUmmJvOZzssR6fHqGz0QSSJ7pq46XuEHdpEjoOXlQ==}
|
||||
deprecated: package has been deprecated and is no longer maintained. Please see https://github.com/mkay581/element-kit
|
||||
dependencies:
|
||||
promise: 7.3.1
|
||||
string: 3.3.3
|
||||
dev: false
|
||||
|
||||
/emoji-regex@8.0.0:
|
||||
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
|
||||
dev: true
|
||||
|
@ -5771,6 +5869,13 @@ packages:
|
|||
which: 1.3.1
|
||||
dev: true
|
||||
|
||||
/global@4.4.0:
|
||||
resolution: {integrity: sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==}
|
||||
dependencies:
|
||||
min-document: 2.19.0
|
||||
process: 0.11.10
|
||||
dev: false
|
||||
|
||||
/globals@11.12.0:
|
||||
resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==}
|
||||
engines: {node: '>=4'}
|
||||
|
@ -6051,6 +6156,10 @@ packages:
|
|||
engines: {node: '>=12'}
|
||||
dev: true
|
||||
|
||||
/individual@2.0.0:
|
||||
resolution: {integrity: sha512-pWt8hBCqJsUWI/HtcfWod7+N9SgAqyPEaF7JQjwzjn5vGrpg6aQ5qeAFQ7dx//UH4J1O+7xqew+gCeeFt6xN/g==}
|
||||
dev: false
|
||||
|
||||
/inflight@1.0.6:
|
||||
resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==}
|
||||
dependencies:
|
||||
|
@ -6252,6 +6361,10 @@ packages:
|
|||
engines: {node: '>=12'}
|
||||
dev: true
|
||||
|
||||
/is-function@1.0.2:
|
||||
resolution: {integrity: sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==}
|
||||
dev: false
|
||||
|
||||
/is-glob@4.0.3:
|
||||
resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
@ -6579,6 +6692,10 @@ packages:
|
|||
engines: {node: '>=0.10.0'}
|
||||
dev: true
|
||||
|
||||
/keycode@2.2.1:
|
||||
resolution: {integrity: sha512-Rdgz9Hl9Iv4QKi8b0OlCRQEzp4AgVxyCtz5S/+VIHezDmrDhkp2N2TqBWOLz0/gbeREXOOiI9/4b8BY9uw2vFg==}
|
||||
dev: false
|
||||
|
||||
/kind-of@3.2.2:
|
||||
resolution: {integrity: sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
@ -6832,6 +6949,14 @@ packages:
|
|||
engines: {node: '>=12'}
|
||||
dev: false
|
||||
|
||||
/m3u8-parser@4.8.0:
|
||||
resolution: {integrity: sha512-UqA2a/Pw3liR6Df3gwxrqghCP17OpPlQj6RBPLYygf/ZSQ4MoSgvdvhvt35qV+3NaaA0FSZx93Ix+2brT1U7cA==}
|
||||
dependencies:
|
||||
'@babel/runtime': 7.21.0
|
||||
'@videojs/vhs-utils': 3.0.5
|
||||
global: 4.4.0
|
||||
dev: false
|
||||
|
||||
/magic-string@0.25.9:
|
||||
resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==}
|
||||
dependencies:
|
||||
|
@ -7032,6 +7157,12 @@ packages:
|
|||
engines: {node: '>=12'}
|
||||
dev: true
|
||||
|
||||
/min-document@2.19.0:
|
||||
resolution: {integrity: sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ==}
|
||||
dependencies:
|
||||
dom-walk: 0.1.2
|
||||
dev: false
|
||||
|
||||
/min-indent@1.0.1:
|
||||
resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==}
|
||||
engines: {node: '>=4'}
|
||||
|
@ -7092,6 +7223,16 @@ packages:
|
|||
ufo: 1.2.0
|
||||
dev: true
|
||||
|
||||
/mpd-parser@0.22.1:
|
||||
resolution: {integrity: sha512-fwBebvpyPUU8bOzvhX0VQZgSohncbgYwUyJJoTSNpmy7ccD2ryiCvM7oRkn/xQH5cv73/xU7rJSNCLjdGFor0Q==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@babel/runtime': 7.21.0
|
||||
'@videojs/vhs-utils': 3.0.5
|
||||
'@xmldom/xmldom': 0.8.10
|
||||
global: 4.4.0
|
||||
dev: false
|
||||
|
||||
/mrmime@1.0.1:
|
||||
resolution: {integrity: sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==}
|
||||
engines: {node: '>=10'}
|
||||
|
@ -7118,6 +7259,15 @@ packages:
|
|||
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
|
||||
dev: true
|
||||
|
||||
/mux.js@6.0.1:
|
||||
resolution: {integrity: sha512-22CHb59rH8pWGcPGW5Og7JngJ9s+z4XuSlYvnxhLuc58cA1WqGDQPzuG8I+sPm1/p0CdgpzVTaKW408k5DNn8w==}
|
||||
engines: {node: '>=8', npm: '>=5'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@babel/runtime': 7.21.0
|
||||
global: 4.4.0
|
||||
dev: false
|
||||
|
||||
/nanoid@3.3.6:
|
||||
resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==}
|
||||
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
||||
|
@ -7550,6 +7700,13 @@ packages:
|
|||
vue-demi: 0.14.5(vue@3.3.4)
|
||||
dev: false
|
||||
|
||||
/pkcs7@1.0.4:
|
||||
resolution: {integrity: sha512-afRERtHn54AlwaF2/+LFszyAANTCggGilmcmILUzEjvs3XgFZT+xE6+QWQcAGmu4xajy+Xtj7acLOPdx5/eXWQ==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@babel/runtime': 7.21.0
|
||||
dev: false
|
||||
|
||||
/pkg-types@1.0.3:
|
||||
resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==}
|
||||
dependencies:
|
||||
|
@ -7713,11 +7870,22 @@ packages:
|
|||
resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==}
|
||||
dev: false
|
||||
|
||||
/process@0.11.10:
|
||||
resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==}
|
||||
engines: {node: '>= 0.6.0'}
|
||||
dev: false
|
||||
|
||||
/progress@2.0.3:
|
||||
resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==}
|
||||
engines: {node: '>=0.4.0'}
|
||||
dev: true
|
||||
|
||||
/promise@7.3.1:
|
||||
resolution: {integrity: sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==}
|
||||
dependencies:
|
||||
asap: 2.0.6
|
||||
dev: false
|
||||
|
||||
/proxy-from-env@1.1.0:
|
||||
resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==}
|
||||
|
||||
|
@ -8044,7 +8212,7 @@ packages:
|
|||
terser: 5.19.2
|
||||
dev: true
|
||||
|
||||
/rollup-plugin-visualizer@5.9.2(rollup@3.28.0):
|
||||
/rollup-plugin-visualizer@5.9.2(rollup@3.28.1):
|
||||
resolution: {integrity: sha512-waHktD5mlWrYFrhOLbti4YgQCn1uR24nYsNuXxg7LkPH8KdTXVWR9DNY1WU0QqokyMixVXJS4J04HNrVTMP01A==}
|
||||
engines: {node: '>=14'}
|
||||
hasBin: true
|
||||
|
@ -8056,7 +8224,7 @@ packages:
|
|||
dependencies:
|
||||
open: 8.4.2
|
||||
picomatch: 2.3.1
|
||||
rollup: 3.28.0
|
||||
rollup: 3.28.1
|
||||
source-map: 0.7.4
|
||||
yargs: 17.7.1
|
||||
dev: true
|
||||
|
@ -8069,8 +8237,8 @@ packages:
|
|||
fsevents: 2.3.2
|
||||
dev: true
|
||||
|
||||
/rollup@3.28.0:
|
||||
resolution: {integrity: sha512-d7zhvo1OUY2SXSM6pfNjgD5+d0Nz87CUp4mt8l/GgVP3oBsPwzNvSzyu1me6BSG9JIgWNTVcafIXBIyM8yQ3yw==}
|
||||
/rollup@3.28.1:
|
||||
resolution: {integrity: sha512-R9OMQmIHJm9znrU3m3cpE8uhN0fGdXiawME7aZIpQqvpS/85+Vt1Hq1/yVIcYfOmaQiHjvXkQAoJukvLpau6Yw==}
|
||||
engines: {node: '>=14.18.0', npm: '>=8.0.0'}
|
||||
hasBin: true
|
||||
optionalDependencies:
|
||||
|
@ -8088,6 +8256,12 @@ packages:
|
|||
queue-microtask: 1.2.3
|
||||
dev: true
|
||||
|
||||
/rust-result@1.0.0:
|
||||
resolution: {integrity: sha512-6cJzSBU+J/RJCF063onnQf0cDUOHs9uZI1oroSGnHOph+CQTIJ5Pp2hK5kEQq1+7yE/EEWfulSNXAQ2jikPthA==}
|
||||
dependencies:
|
||||
individual: 2.0.0
|
||||
dev: false
|
||||
|
||||
/rxjs@7.8.0:
|
||||
resolution: {integrity: sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==}
|
||||
dependencies:
|
||||
|
@ -8104,6 +8278,12 @@ packages:
|
|||
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
|
||||
dev: true
|
||||
|
||||
/safe-json-parse@4.0.0:
|
||||
resolution: {integrity: sha512-RjZPPHugjK0TOzFrLZ8inw44s9bKox99/0AZW9o/BEQVrJfhI+fIHMErnPyRa89/yRXUUr93q+tiN6zhoVV4wQ==}
|
||||
dependencies:
|
||||
rust-result: 1.0.0
|
||||
dev: false
|
||||
|
||||
/safe-regex-test@1.0.0:
|
||||
resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==}
|
||||
dependencies:
|
||||
|
@ -8453,6 +8633,10 @@ packages:
|
|||
es-abstract: 1.21.2
|
||||
dev: true
|
||||
|
||||
/string@3.3.3:
|
||||
resolution: {integrity: sha512-LbvprpPZT/39QKfNrlPX9vXtS7If80vqbPQ7clnHQb5oVOM5hz/cs3iQCCZjvQDwsAWl+HpLQX3gRgN6IC8t3g==}
|
||||
dev: false
|
||||
|
||||
/string_decoder@1.3.0:
|
||||
resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==}
|
||||
dependencies:
|
||||
|
@ -9019,6 +9203,10 @@ packages:
|
|||
mlly: 1.4.0
|
||||
dev: true
|
||||
|
||||
/underscore@1.13.6:
|
||||
resolution: {integrity: sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==}
|
||||
dev: false
|
||||
|
||||
/unicode-canonical-property-names-ecmascript@2.0.0:
|
||||
resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==}
|
||||
engines: {node: '>=4'}
|
||||
|
@ -9074,7 +9262,7 @@ packages:
|
|||
engines: {node: '>= 10.0.0'}
|
||||
dev: true
|
||||
|
||||
/unocss@0.55.2(postcss@8.4.28)(rollup@3.28.0)(vite@4.4.9):
|
||||
/unocss@0.55.2(postcss@8.4.28)(rollup@3.28.1)(vite@4.4.9):
|
||||
resolution: {integrity: sha512-+C8tFUFIEv40DpEhjA/Yv+RB5HZumkWiON2OlPyrbzapQ8x60F9TUwUS3pw7MlpxI6GfTCYwXKEE6DTGCm1SLA==}
|
||||
engines: {node: '>=14'}
|
||||
peerDependencies:
|
||||
|
@ -9086,8 +9274,8 @@ packages:
|
|||
vite:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@unocss/astro': 0.55.2(rollup@3.28.0)(vite@4.4.9)
|
||||
'@unocss/cli': 0.55.2(rollup@3.28.0)
|
||||
'@unocss/astro': 0.55.2(rollup@3.28.1)(vite@4.4.9)
|
||||
'@unocss/cli': 0.55.2(rollup@3.28.1)
|
||||
'@unocss/core': 0.55.2
|
||||
'@unocss/extractor-arbitrary-variants': 0.55.2
|
||||
'@unocss/postcss': 0.55.2(postcss@8.4.28)
|
||||
|
@ -9105,7 +9293,7 @@ packages:
|
|||
'@unocss/transformer-compile-class': 0.55.2
|
||||
'@unocss/transformer-directives': 0.55.2
|
||||
'@unocss/transformer-variant-group': 0.55.2
|
||||
'@unocss/vite': 0.55.2(rollup@3.28.0)(vite@4.4.9)
|
||||
'@unocss/vite': 0.55.2(rollup@3.28.1)(vite@4.4.9)
|
||||
vite: 4.4.9(@types/node@20.5.0)(less@4.2.0)(terser@5.19.2)
|
||||
transitivePeerDependencies:
|
||||
- postcss
|
||||
|
@ -9148,6 +9336,10 @@ packages:
|
|||
deprecated: Please see https://github.com/lydell/urix#deprecated
|
||||
dev: true
|
||||
|
||||
/url-toolkit@2.2.5:
|
||||
resolution: {integrity: sha512-mtN6xk+Nac+oyJ/PrI7tzfmomRVNFIWKUbG8jdYFt52hxbiReFAXIjYskvu64/dvuW71IcB7lV8l0HvZMac6Jg==}
|
||||
dev: false
|
||||
|
||||
/use@3.1.1:
|
||||
resolution: {integrity: sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
@ -9179,6 +9371,43 @@ packages:
|
|||
diff-match-patch: 1.0.5
|
||||
dev: false
|
||||
|
||||
/video-js@0.7.0:
|
||||
resolution: {integrity: sha512-bnVzEmW+wHV+X4jdRVCUm85xWnLnQtOjvn6lGJMt9CmZo+gb6fNeobcnX41S2ILwSdNEz2FFXfBHy/+/v0Xbfg==}
|
||||
deprecated: Your installed version of the video-js package is now under the youtube-video-js. Please use that instead
|
||||
dependencies:
|
||||
element-kit: 1.0.6
|
||||
promise: 7.3.1
|
||||
underscore: 1.13.6
|
||||
dev: false
|
||||
|
||||
/video.js@7.21.5:
|
||||
resolution: {integrity: sha512-WRq86tXZKrThA9mK+IR+v4tIQVVvnb5LhvL71fD2AX7TxVOPdaeK1X/wyuUruBqWaOG3w2sZXoMY6HF2Jlo9qA==}
|
||||
dependencies:
|
||||
'@babel/runtime': 7.21.0
|
||||
'@videojs/http-streaming': 2.16.2(video.js@7.21.5)
|
||||
'@videojs/vhs-utils': 3.0.5
|
||||
'@videojs/xhr': 2.6.0
|
||||
aes-decrypter: 3.1.3
|
||||
global: 4.4.0
|
||||
keycode: 2.2.1
|
||||
m3u8-parser: 4.8.0
|
||||
mpd-parser: 0.22.1
|
||||
mux.js: 6.0.1
|
||||
safe-json-parse: 4.0.0
|
||||
videojs-font: 3.2.0
|
||||
videojs-vtt.js: 0.15.5
|
||||
dev: false
|
||||
|
||||
/videojs-font@3.2.0:
|
||||
resolution: {integrity: sha512-g8vHMKK2/JGorSfqAZQUmYYNnXmfec4MLhwtEFS+mMs2IDY398GLysy6BH6K+aS1KMNu/xWZ8Sue/X/mdQPliA==}
|
||||
dev: false
|
||||
|
||||
/videojs-vtt.js@0.15.5:
|
||||
resolution: {integrity: sha512-yZbBxvA7QMYn15Lr/ZfhhLPrNpI/RmCSCqgIff57GC2gIrV5YfyzLfLyZMj0NnZSAz8syB4N0nHXpZg9MyrMOQ==}
|
||||
dependencies:
|
||||
global: 4.4.0
|
||||
dev: false
|
||||
|
||||
/vite-plugin-compression@0.5.1(vite@4.4.9):
|
||||
resolution: {integrity: sha512-5QJKBDc+gNYVqL/skgFAP81Yuzo9R+EAf19d+EtsMF/i8kFUpNi3J/H01QD3Oo8zBQn+NzoCIFkpPLynoOzaJg==}
|
||||
peerDependencies:
|
||||
|
@ -9271,12 +9500,12 @@ packages:
|
|||
- supports-color
|
||||
dev: true
|
||||
|
||||
/vite-vue-plugin-html@1.0.2(rollup@3.28.0)(vite@4.4.9):
|
||||
/vite-vue-plugin-html@1.0.2(rollup@3.28.1)(vite@4.4.9):
|
||||
resolution: {integrity: sha512-MADzWRhKRXQDefI2ttVukx5NMMh+Wh9S2bhmXW4Kce4F4IfTgy5dain6KYZvS5NtqMXiTj/bURPpdaAxwrQ9DA==}
|
||||
peerDependencies:
|
||||
vite: '>=4.2.0'
|
||||
dependencies:
|
||||
'@rollup/pluginutils': 5.0.2(rollup@3.28.0)
|
||||
'@rollup/pluginutils': 5.0.2(rollup@3.28.1)
|
||||
colorette: 2.0.20
|
||||
connect-history-api-fallback: 2.0.0
|
||||
consola: 3.1.0
|
||||
|
@ -9325,7 +9554,7 @@ packages:
|
|||
esbuild: 0.18.16
|
||||
less: 4.2.0
|
||||
postcss: 8.4.28
|
||||
rollup: 3.28.0
|
||||
rollup: 3.28.1
|
||||
terser: 5.19.2
|
||||
optionalDependencies:
|
||||
fsevents: 2.3.2
|
||||
|
|
|
@ -1,3 +1,58 @@
|
|||
<script lang="ts" setup>
|
||||
defineOptions({ name: 'WxMusic' })
|
||||
|
||||
const props = defineProps({
|
||||
title: {
|
||||
required: false,
|
||||
type: String,
|
||||
},
|
||||
description: {
|
||||
required: false,
|
||||
type: String,
|
||||
},
|
||||
musicUrl: {
|
||||
required: false,
|
||||
type: String,
|
||||
},
|
||||
hqMusicUrl: {
|
||||
required: false,
|
||||
type: String,
|
||||
},
|
||||
thumbMediaUrl: {
|
||||
required: true,
|
||||
type: String,
|
||||
},
|
||||
})
|
||||
|
||||
defineExpose({
|
||||
musicUrl: props.musicUrl,
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span>123</span>
|
||||
<div>
|
||||
<a-button
|
||||
type="link"
|
||||
:underline="false"
|
||||
target="_blank"
|
||||
:href="hqMusicUrl ? hqMusicUrl : musicUrl"
|
||||
>
|
||||
<div
|
||||
class="avue-card__body"
|
||||
style="padding: 10px; background-color: #fff; border-radius: 5px"
|
||||
>
|
||||
<div class="avue-card__avatar">
|
||||
<img :src="thumbMediaUrl" alt="">
|
||||
</div>
|
||||
<div class="avue-card__detail">
|
||||
<div class="avue-card__title" style="margin-bottom: unset">
|
||||
{{ title }}
|
||||
</div>
|
||||
<div class="avue-card__info" style="height: unset">
|
||||
{{ description }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-button>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -1,3 +1,65 @@
|
|||
<script lang="ts" setup>
|
||||
import 'video.js/dist/video-js.css'
|
||||
import { VideoPlayer } from '@videojs-player/vue'
|
||||
import { ref } from 'vue'
|
||||
import { Modal } from 'ant-design-vue'
|
||||
|
||||
defineOptions({ name: 'WxVideoPlayer' })
|
||||
|
||||
const props = defineProps({
|
||||
url: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
})
|
||||
|
||||
const openVideo = ref(false)
|
||||
|
||||
// const handleEvent = (log) => {
|
||||
// console.log('Basic player event', log)
|
||||
// }
|
||||
|
||||
function playVideo() {
|
||||
openVideo.value = true
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span>123</span>
|
||||
<div @click="playVideo()">
|
||||
<!-- 提示 -->
|
||||
<div>
|
||||
<Icon icon="ep:video-play" :size="32" class="mr-5px" />
|
||||
<p class="text-sm">
|
||||
点击播放视频
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- 弹窗播放 -->
|
||||
<Modal v-model:open="openVideo" title="视频播放" append-to-body>
|
||||
<VideoPlayer
|
||||
v-if="openVideo"
|
||||
class="video-player vjs-big-play-centered"
|
||||
:src="props.url"
|
||||
poster=""
|
||||
crossorigin="anonymous"
|
||||
playsinline
|
||||
controls
|
||||
:volume="0.6"
|
||||
:width="800"
|
||||
:playback-rates="[0.7, 1.0, 1.5, 2.0]"
|
||||
/>
|
||||
<!-- 事件,暫時沒用
|
||||
@mounted="handleMounted" -->
|
||||
<!-- @ready="handleEvent($event)" -->
|
||||
<!-- @play="handleEvent($event)" -->
|
||||
<!-- @pause="handleEvent($event)" -->
|
||||
<!-- @ended="handleEvent($event)" -->
|
||||
<!-- @loadeddata="handleEvent($event)" -->
|
||||
<!-- @waiting="handleEvent($event)" -->
|
||||
<!-- @playing="handleEvent($event)" -->
|
||||
<!-- @canplay="handleEvent($event)" -->
|
||||
<!-- @canplaythrough="handleEvent($event)" -->
|
||||
<!-- @timeupdate="handleEvent(player?.currentTime())" -->
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -1,3 +1,77 @@
|
|||
<script lang="ts" setup>
|
||||
import BenzAMRRecorder from 'benz-amr-recorder'
|
||||
import { ref } from 'vue'
|
||||
import { Tag } from 'ant-design-vue'
|
||||
|
||||
defineOptions({ name: 'WxVoicePlayer' })
|
||||
|
||||
const props = defineProps({
|
||||
url: {
|
||||
type: String, // 语音地址,例如说:https://www.iocoder.cn/xxx.amr
|
||||
required: true,
|
||||
},
|
||||
content: {
|
||||
type: String, // 语音文本
|
||||
required: false,
|
||||
},
|
||||
})
|
||||
|
||||
const amr = ref()
|
||||
const playing = ref(false)
|
||||
const duration = ref()
|
||||
/** 处理点击,播放或暂停 */
|
||||
function playVoice() {
|
||||
// 情况一:未初始化,则创建 BenzAMRRecorder
|
||||
if (amr.value === undefined) {
|
||||
amrInit()
|
||||
return
|
||||
}
|
||||
// 情况二:已经初始化,则根据情况播放或暂时
|
||||
if (amr.value.isPlaying())
|
||||
amrStop()
|
||||
else
|
||||
amrPlay()
|
||||
}
|
||||
|
||||
/** 音频初始化 */
|
||||
function amrInit() {
|
||||
amr.value = new BenzAMRRecorder()
|
||||
// 设置播放
|
||||
amr.value.initWithUrl(props.url).then(() => {
|
||||
amrPlay()
|
||||
duration.value = amr.value.getDuration()
|
||||
})
|
||||
// 监听暂停
|
||||
amr.value.onEnded(() => {
|
||||
playing.value = false
|
||||
})
|
||||
}
|
||||
|
||||
/** 音频播放 */
|
||||
function amrPlay() {
|
||||
playing.value = true
|
||||
amr.value.play()
|
||||
}
|
||||
|
||||
/** 音频暂停 */
|
||||
function amrStop() {
|
||||
playing.value = false
|
||||
amr.value.stop()
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span>123</span>
|
||||
<div class="wx-voice-div" @click="playVoice">
|
||||
<div>
|
||||
<Icon v-if="playing !== true" icon="ep:video-play" :size="32" />
|
||||
<Icon v-else icon="ep:video-pause" :size="32" />
|
||||
<span v-if="duration" class="amr-duration">{{ duration }} 秒</span>
|
||||
</div>
|
||||
<div v-if="content">
|
||||
<Tag type="success" size="small">
|
||||
语音识别
|
||||
</Tag>
|
||||
{{ content }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue