![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@capacitor-community/media
Advanced tools
Enable some media features for Capacitor such as create albums, save videos, gifs and more.
@capacitor-community/media
Capacitor community plugin for enabling extra media capabilities
Maintainer | GitHub | Social |
---|---|---|
Stewan Silva | stewwan | @StewanSilva |
We're starting fresh under an official org. If you were using the previous npm package capacitor-media
, please update your package.json to @capacitor-community/media
. Check out changelog for more info.
Using npm:
npm install @capacitor-community/media
Using yarn:
yarn add @capacitor-community/media
Sync native files:
npx cap sync
only ios for now
import { Media } from "capacitor-media";
const media = new Media();
//
// Save video to a specfic album
media
.saveVideo({ path: "/path/to/the/file", album: "My Album" })
.then(console.log)
.catch(console.log);
//
// Get a list of user albums
media
.getAlbums()
.then(console.log) // -> { albums: [{name:'My Album', identifier:'A1-B2-C3-D4'}, {name:'My Another Album', identifier:'E5-F6-G7-H8'}]}
.catch(console.log);
Make sure you pass the correct album parameter according to the platform
album: this.platform.is("ios") ? album.identifier : album.name;
ionic start my-cap-app --capacitor
cd my-cap-app
npm install —-save capacitor-media
mkdir www && touch www/index.html
npx cap add ios
npx cap open ios
Tip: every time you change a native code you may need to clean up the cache (Product > Clean build folder) and then run the app again.
ionic start my-cap-app --capacitor
cd my-cap-app
npm install —-save capacitor-media
mkdir www && touch www/index.html
npx cap add android
npx cap open android
[extra step]
in android case we need to tell Capacitor to initialise the plugin:on your
MainActivity.java
file addimport io.stewan.capacitor.media.MediaPlugin;
and then inside the init callbackadd(MediaPlugin.class);
Now you should be set to go. Try to run your client using ionic cap run android --livereload
.
Tip: every time you change a native code you may need to clean up the cache (Build > Clean Project | Build > Rebuild Project) and then run the app again.
MIT
Thanks goes to these wonderful people (emoji key):
Stew 💻 📖 | Zachary Keeton 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
FAQs
Capacitor plugin for saving and retrieving photos and videos, and managing photo albums.
The npm package @capacitor-community/media receives a total of 0 weekly downloads. As such, @capacitor-community/media popularity was classified as not popular.
We found that @capacitor-community/media demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.