-
Notifications
You must be signed in to change notification settings - Fork 22.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Web Share] Add list of usually shareable file types #11023
Conversation
Questions about this keep coming up.
Preview URLsFlawsNone! 🎉 External URLsURL: No new external URLs (this comment was updated 2021-12-07 13:51:03.417087) |
This seems very useful but linking to a google doc makes me cringe a bit. Should we include a table with this information in the docs directly (in which we invite other browsers to talk about their accepted file types, too)? |
I like this idea! Here's the Markdown for such a table. Please advise where this would go. | Category | Extension - `MIME type |
| ----------- | ------------------------------------------------ |
| Application | |
| | `.pdf` - `application/pdf` (from Chromium 93) |
| Audio | |
| | `.flac` - `audio/flac` |
| | `.m4a` - `audio/x-m4a` |
| | `.mp3` - `audio/mpeg` (also accepts `audio/mp3`) |
| | `.oga` - `audio/ogg` |
| | `.ogg` - `audio/ogg` |
| | `.opus` - `audio/ogg` |
| | `.wav` - `audio/wav` |
| | `.weba` - `audio/webm` |
| Image | |
| | `.bmp` - `image/bmp` |
| | `.gif` - `image/gif` |
| | `.ico` - `image/x-icon` |
| | `.jfif` - `image/jpeg` |
| | `.jpeg` - `image/jpeg` |
| | `.jpg` - `image/jpeg` |
| | `.pjp` - `image/jpeg` |
| | `.pjpeg` - `image/jpeg` |
| | `.png` - `image/png` |
| | `.svg` - `image/svg+xml` |
| | `.svgz` - `image/svg+xml` |
| | `.tif` - `image/tiff` |
| | `.tiff` - `image/tiff` |
| | `.webp` - `image/webp` |
| | `.xbm` - `image/x-xbitmap` |
| Text | |
| | `.css` - `text/css` |
| | `.csv` - `text/csv` |
| | `.ehtml` - `text/html` |
| | `.htm` - `text/html` |
| | `.html` - `text/html` |
| | `.shtm` - `text/html` |
| | `.shtml` - `text/html` |
| | `.text` - `text/plain` |
| | `.txt` - `text/plain` |
| Video | |
| | `.m4v` - `video/mp4` |
| | `.mp4` - `video/mp4` |
| | `.mpeg` - `video/mpeg` |
| | `.mpg` - `video/mpeg` |
| | `.ogm` - `video/ogg` |
| | `.ogv` - `video/ogg` |
| | `.webm` - `video/webm` |
|
It seems important enough that I'd create a new h2 before the "Examples" section like so:
And instead of your note with the google doc link, something like this:
|
Co-authored-by: Florian Scholz <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Danke! 👍
Woohoo, thanks for the review and making this even better! Viele Grüße aus Hamburg! |
The following is a list of usually shareable file types. However, you should always test with {{domxref("navigator.canShare()")}} if sharing would succeed. | ||
|
||
- Application | ||
- `.pdf` - `application/pdf` (from Chromium 93) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Elchi3 FWIW Little concerned that the list might end up being "Chromium" specific, and yet one more list of things that has to be kept updated outside of BCD. Maybe remove the "(from Chromium 93)."
I wonder if this list is just "all the media types you can play/use on the platform". I wonder what the things you can't send are? If so, we might be better off saying "Generally most media and text files that can be played on the platform can also be shared".
The following is a list of usually shareable file types. However, you should always test with {{domxref("navigator.canShare()")}} if sharing would succeed. | ||
|
||
- Application | ||
- `.pdf` - `application/pdf` (from Chromium 93) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `.pdf` - `application/pdf` (from Chromium 93) | |
- `.pdf` - `application/pdf` |
Summary
Add note about Chromium's list of accepted file types for
navigator.share()
.Motivation
Questions about this keep coming up.
Supporting details
https://docs.google.com/document/d/1tKPkHA5nnJtmh2TgqWmGSREUzXgMUFDL6yMdVZHqUsg/edit
Metadata