
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@cycjimmy/h5-audio-controls
Advanced tools
$ npm install @cycjimmy/h5-audio-controls --save
# or
$ yarn add @cycjimmy/h5-audio-controls
import h5AudioControls from '@cycjimmy/h5-audio-controls';
# OR
const h5AudioControls = require('@cycjimmy/h5-audio-controls');
h5AudioControls(audioSrc [, options])
audioSrc
: [Require][string] a url to an audio file
The options
supports:
context
: [Option][string|element] the context of audio controller. Default document.body
.position
: [Option][string] the position of audio controller.
'left-top'
'top-right'
(Default)'right-bottom'
'left-bottom'
positionType
: [Option][string] Set position type of audio controller.
'fixed'
(Default)'absolute'
'relative'
'sticky'
'static'
buttonSize
: [Option][string|number] Set button wrapper size.iconSize
: [Option][string|number] Set button icon size.playIcon
: [Option][string] Set play icon.pauseIcon
: [Option][string] Set pause icon.autoPlay
: [Option][boolean] Whether to play immediately after loading. Default true
.h5AudioControls
instance supports the following methods:
load()
: Init controller.play()
: Play the audio.pause()
: Pause the audio.stop()
: Stop the audio.isPlaying()
: Return whether the audio is playing.changeAudioSrc(src)
: Dynamically modify the value of audioSrc
.changePosition(position)
: Dynamically modify the value of position
.changeButtonSize(size)
: Dynamically modify the value of buttonSize
.changeIconSize(size)
: Dynamically modify the value of iconSize
.change(key, val)
: Dynamically change the value of configuration properties.
'audioSrc'
: Change the value of audioSrc
. change('audioSrc', 'yourSrc')
is the same as changeAudioSrc('yourSrc')
'position'
: Change the value of position
. change('position', 'left-top')
is the same as changePosition('left-top')
'buttonSize'
: Change the value of buttonSize
. change('buttonSize', '16vw')
is the same as changeButtonSize('16vw')
'iconSize'
: Change the value of iconSize
. change('iconSize', '10vw')
is the same as changeIconSize('10vw')
'playIcon'
: Change the value of playIcon
.'pauseIcon'
: Change the value of pauseIcon
.'autoPlay'
: Change the value of autoPlay
.<script src="h5-audio-controls.umd.min.js"></script>
<script>
var audioSrc = '../media/test_audio.mp3';
h5AudioControls(audioSrc).load();
</script>
To use via a CDN include this in your html:
<script src="https://cdn.jsdelivr.net/npm/@cycjimmy/h5-audio-controls@5/dist/h5-audio-controls.umd.min.js"></script>
FAQs
Simple h5 music controller
The npm package @cycjimmy/h5-audio-controls receives a total of 47 weekly downloads. As such, @cycjimmy/h5-audio-controls popularity was classified as not popular.
We found that @cycjimmy/h5-audio-controls demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.