Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mediakitapp/cordova-plugin-mediacontrol
Cordova Plugin Media Control
https://github.com/mediakitapp/cordova-plugin-mediacontrol
android cordova cordova-plugin ionic ios javascript nodejs
Last synced: 29 days ago
JSON representation
Cordova Plugin Media Control
- Host: GitHub
- URL: https://github.com/mediakitapp/cordova-plugin-mediacontrol
- Owner: MediaKitApp
- License: apache-2.0
- Created: 2022-12-15T13:30:13.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-03-21T14:51:35.000Z (almost 2 years ago)
- Last Synced: 2024-11-22T13:05:53.278Z (about 1 month ago)
- Topics: android, cordova, cordova-plugin, ionic, ios, javascript, nodejs
- Language: Java
- Homepage: https://www.inteapps.com/
- Size: 18.6 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cordova Plugin Media Controls
Enable speaker mode and correctly display the multimedia volume when lowering or raising.
Although the object is attached to the global scoped `window`, it is not available until after the `deviceready` event.
* Cordova
```js
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
console.log(MediaControls);
}
```
* Ionic
```js
/* Create interface for working */
window.MediaControls.setModeAudio(...)
```
## Install Ionic / Cordova* Cordova
```bash
npm i cordova-plugin-media-control
cordova plugin add cordova-plugin-media-control
```
* Ionic
```bash
npm i cordova-plugin-media-control
npx cap sync
```# Permissions Android
```xml```
## API
* [`MediaControls.setModeAudio(...)`](#setmodeaudio)
### setModeAudio(...)
```typescript
setModeAudio(mode: string) => Promise<{ state: boolean; }>
```| Param | Type | Description |
| ------------- | ------------------------------ | -------------------------------- |
| **`mode`** |string
| Valuespeaker
for active Speaker ornormal
for disabled**Returns:**
Promise<{ state: boolean; }>
--------------------