cloudcmd icon indicating copy to clipboard operation
cloudcmd copied to clipboard

Feature REquest : copy dl link in clipboard / .mkv video support in video player

Open kirtapix opened this issue 5 years ago • 8 comments

Hi coderaiser,

Is it possible to add a "copy download link to clipboard" in the Menu ? I'm not able to preview mkv file, do you is it possible to add it in the video player ? For now cloudcmd see it like a binary file.

Thanks in advance.

Kirtapix

By the way : Happy new year 😀

kirtapix avatar Jan 17 '20 09:01 kirtapix

Hi Kirtapix,

Copying download link - it's a very good idea for a Pull Request :). About mkv, it doesn't supported by browsers, so it's not possible for now.

Happy New year :)!

coderaiser avatar Jan 17 '20 10:01 coderaiser

Could you please tell me why don't you use Download menu item?

coderaiser avatar Jan 17 '20 10:01 coderaiser

I use download Menu item, but if I want to share a link with a friend, I have to start download with Download menu item, and copy the url from the address bar to give it to him.

kirtapix avatar Jan 17 '20 12:01 kirtapix

About mkv, it doesn't supported by browsers, so it's not possible for now.

@coderaiser It's actually just Firefox that can't play MKV files. Chromium and Edge native both support playing MKV files by declaring a "video/webm" MIME type.

  • Sample: https://codepen.io/dona33/pen/PowvBpa
  • Thread on bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1422891

piratetub avatar Jan 29 '20 19:01 piratetub

@coderaiser It's actually just Firefox that can't play MKV files. Chromium and Edge native both support playing MKV files by declaring a "video/webm" MIME type.

In this case mkv video should just work in Chrome and Edge :)

coderaiser avatar Jan 29 '20 20:01 coderaiser

copy the download link to the clipboard. This menu item is also useful for video player that support streaming. https://github.com/sudodoki/copy-to-clipboard

'Copy File Path': () => {
    const filePath = `${window.location.href}${window.encodeURI(document.querySelector('.current-file > [data-name=js-name] > a').text)}`
    console.log(filePath)
},

I-Want-ToBelieve avatar Nov 21 '20 23:11 I-Want-ToBelieve

@doublethinkio you can also use:

export default {
    'F6 - Copy URL to Current File': async ({DOM}) => {
        const {path} = DOM.CurrentInfo;
        const url = `${window.location.href}${path}`;
        const {default: clipboard}  = await import('https://cdn.skypack.dev/@cloudcmd/clipboard');
        
        await clipboard.writeText(url); 
    }
}

Just added to wiki.

coderaiser avatar Nov 22 '20 14:11 coderaiser

@coderaiser Wow it looks great, thank you

I-Want-ToBelieve avatar Dec 02 '20 11:12 I-Want-ToBelieve