mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
feature: user-menu: add support of mov
This commit is contained in:
parent
2bfd32a1bd
commit
cf41d7d1dd
2 changed files with 21 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
const RENAME_FILE = 'Rename file';
|
||||
const CDN = 'https://cdn.jsdelivr.net/gh/cloudcmd/user-menu@1.1.1';
|
||||
const CDN = 'https://cdn.jsdelivr.net/gh/cloudcmd/user-menu@1.2.4';
|
||||
|
||||
module.exports = {
|
||||
'__settings': {
|
||||
|
|
@ -31,11 +31,16 @@ module.exports = {
|
|||
const {convertFlacToMp3} = await import(`${CDN}/menu/ffmpeg.js`);
|
||||
await convertFlacToMp3({CloudCmd, DOM});
|
||||
},
|
||||
'M - Convert mpeg to mp3 [ffmpeg]': async ({CloudCmd, DOM}) => {
|
||||
'M - Convert mp4 to mp3 [ffmpeg]': async ({CloudCmd, DOM}) => {
|
||||
const {convertMp4ToMp3} = await import(`${CDN}/menu/ffmpeg.js`);
|
||||
await convertMp4ToMp3({CloudCmd, DOM});
|
||||
},
|
||||
|
||||
'O - Convert mov to mp3 [ffmpeg]': async ({CloudCmd, DOM}) => {
|
||||
const {convertMovToMp3} = await import(`${CDN}/menu/ffmpeg.js`);
|
||||
await convertMovToMp3({CloudCmd, DOM});
|
||||
},
|
||||
|
||||
'C - Create User Menu File': async ({DOM, CloudCmd}) => {
|
||||
const {
|
||||
Dialog,
|
||||
|
|
|
|||
|
|
@ -85,7 +85,20 @@ test('cloudcmd: static: user menu: F', async (t) => {
|
|||
});
|
||||
|
||||
test('cloudcmd: static: user menu: M', async (t) => {
|
||||
const name = 'M - Convert mpeg to mp3 [ffmpeg]';
|
||||
const name = 'M - Convert mp4 to mp3 [ffmpeg]';
|
||||
const DOM = {};
|
||||
|
||||
const fn = defaultMenu[name];
|
||||
const [error] = await tryToCatch(fn, {
|
||||
DOM,
|
||||
});
|
||||
|
||||
t.equal(error.code, 'ERR_UNSUPPORTED_ESM_URL_SCHEME');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('cloudcmd: static: user menu: O', async (t) => {
|
||||
const name = 'O - Convert mov to mp3 [ffmpeg]';
|
||||
const DOM = {};
|
||||
|
||||
const fn = defaultMenu[name];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue