cobalt web
the cobalt frontend is a static web app built with sveltekit + vite.
configuring
- to run the dev environment, run
pnpm run dev
. - to make the release build of the frontend, run
pnpm run build
.
environment variables
the frontend has several build-time environment variables for configuring various features. to use them, you must specify them when building the frontend (or running a vite server for development).
WEB_DEFAULT_API
is required to run cobalt frontend.
name | example | description |
---|---|---|
WEB_HOST |
cobalt.tools |
domain on which the frontend will be running. used for meta tags and configuring plausible. |
WEB_PLAUSIBLE_HOST |
plausible.io * |
enables plausible analytics with provided hostname as receiver backend. |
WEB_DEFAULT_API |
https://api.cobalt.tools/ |
changes url which is used for api requests by frontend clients. |
* don't use plausible.io as receiver backend unless you paid for their cloud service. use your own domain when hosting community edition of plausible. refer to their docs when needed.
link prefill
to prefill the link into the input box & start the download automatically, you can pass the URL in the #
parameter, like this:
https://cobalt.tools/#https://www.youtube.com/watch?v=dQw4w9WgXcQ
the link can also be URI-encoded, like this:
https://cobalt.tools/#https%3A//www.youtube.com/watch%3Fv=dQw4w9WgXcQ
license
cobalt web code is licensed under CC-BY-NC-SA-4.0.
this license allows you to:
- copy and redistribute the code in any medium or format, and
- remix, transform, use and build upon the code
as long as you:
- give appropriate credit to the original repo,
- provide a link to the license and indicate if changes to the code were made,
- release the code under the same license, and
- don't use the code for any commercial purposes.
cobalt branding, mascots, and other related assets included in the repo are copyrighted and not covered by the license. you cannot use them under same terms.
you are allowed to host an unmodified instance of cobalt with branding for non-commercial purposes, but this does not give you permission to use the branding anywhere else, or make derivatives of it in any way.
when making an alternative version of the project, please replace or remove all branding (including the name).
open source acknowledgments
svelte + sveltekit
the cobalt frontend is built using svelte and sveltekit, a really efficient and badass framework, we love it a lot.
libav.js
our remux and encode workers rely on libav.js, which is an optimized build of ffmpeg for the browser. the ffmpeg builds are made up of many components, whose licenses can be found here: encode, remux.
you can support ffmpeg here!
fonts, icons and assets
the cobalt frontend uses several different fonts and icon sets.
- Tabler Icons, released under the MIT license.
- Fluent Emoji by Microsoft, released under the MIT license.
- Noto Sans Mono used for the download button, is licensed under the OFL license.
- IBM Plex Mono used for all other text, is licensed under the OFL license.
- and the Redaction font, which is licensed under the OFL license (as well as LGPL-2.1).
- many update banners were taken from tenor.com.
other packages
- mdsvex to convert the changelogs into svelte components.
- compare-versions for sorting the changelogs.
- svelte-sitemap for generating a sitemap for the frontend.
- sveltekit-i18n for displaying cobalt in many different languages.
- vite for building the frontend.
...and many other packages that these packages rely on.