cloudcmd
                                
                                 cloudcmd copied to clipboard
                                
                                    cloudcmd copied to clipboard
                            
                            
                            
                        Feature REquest : copy dl link in clipboard / .mkv video support in video player
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 😀
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 :)!
Could you please tell me why don't you use Download menu item?
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.
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
@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 :)
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)
},
@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 Wow it looks great, thank you