![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
cordova-plugin-audiocontroller
Advanced tools
This plugin is partly inspired by https://github.com/homerours/cordova-music-controls-plugin repository. It is not updated on NPM anymore so I took the liberty to rewrite objective C code and push it with a different name.
Music controls for Cordova applications. Display a 'media' notification with play/pause, previous, next buttons, allowing the user to control the play. Handle also headset event (plug, unplug, headset button).
cordova plugin add https://github.com/bhvr-business-solutions/cordova-plugin-audiocontroller
AudioController.setControls({
track : 'Time is Running Out', // optional, default : ''
artist : 'Muse', // optional, default : ''
cover : 'albums/absolution.jpg', // optional, default : nothing
// cover can be a local path (use fullpath 'file:///storage/emulated/...', or only 'my_image.jpg' if my_image.jpg is in the www folder of your app)
// or a remote url ('http://...', 'https://...', 'ftp://...')
isPlaying : true, // optional, default : true
// hide previous/next/close buttons:
hasPrev : true, // show previous button, optional, default: true
hasNext : true, // show next button, optional, default: true
album : 'Absolution', // optional, default: ''
// iOS only, optional
album : 'Absolution', // optional, default: ''
duration : 60, // optional, default: 0
elapsed : 10, // optional, default: 0
hasSkipForward : true, //optional, default: false. true value overrides hasNext.
hasSkipBackward : true, //optional, default: false. true value overrides hasPrev.
skipForwardInterval : 15, //optional. default: 0.
skipBackwardInterval : 15, //optional. default: 0.
hasScrubbing : false, //optional. default to false. Enable scrubbing from control center progress bar
// Android only, optional
// text displayed in the status bar when the notification (and the ticker) are updated
ticker : 'Now playing "Time is Running Out"',
//All icons default to their built-in android equivalents
//The supplied drawable name, e.g. 'media_play', is the name of a drawable found under android/res/drawable* folders
playIcon: 'media_play',
pauseIcon: 'media_pause',
prevIcon: 'media_prev',
nextIcon: 'media_next',
closeIcon: 'media_close',
notificationIcon: 'notification'
});
// Register callback
AudioController.subscribe(function(eventName) {
});
'play', 'pause',
'previous', 'next', 'pause', 'play',
'skip-backward', 'skip-forward'
'interruption-started', 'interruption-ended', 'seek' (2nd argument available)
'fast-forward', 'rewind',
'play-pause', 'stop',
'step-backward', 'step-forward',
'meta-left', 'meta-right', 'music',
'volume-up', 'volume-down', 'volume-mute',
'headset-hook'
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Thanks !
FAQs
Music controls for Cordova apps
The npm package cordova-plugin-audiocontroller receives a total of 2 weekly downloads. As such, cordova-plugin-audiocontroller popularity was classified as not popular.
We found that cordova-plugin-audiocontroller demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.