Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@iomariani/vue-player
Advanced tools
Simple, lightweight, vue.js HTML5 audio/video player
Available at codesandbox.io (sandbox)
npm install @iomariani/vue-player
If you want the component to be available globally:
import Vue from 'vue'
import VuePlayer from '@iomariani/vue-player'
Vue.component('vue-player', VuePlayer)
If you want the component to be available locally:
import VuePlayer from '@iomariani/vue-player'
new Vue({
components: {
VuePlayer
}
})
The component css is available seperately. You can just import it by:
import '@iomariani/vue-player/dist/vue-player.css'
<vue-player audio />
<vue-player video />
Param | Type | Description | Default |
---|---|---|---|
exclusive | Boolean | Allow only one player playing at a time | true |
autoplay | Boolean | Audio/video autoplay property | false |
loop | Boolean | Audio/video loop property | false |
color | String | Color to use at the active trackbar | #2f96fd |
theater | Boolean or String ("fullscreen") | Wrap the player with an overlay div, if param is fullscreen will show overlay only when in fullscreen | false |
overlayBlur | Boolean | Add a blur filter effect to the overlay | false |
overlayColor | String | Color to use on the overlay div | #000000e6 |
Audio Props | |||
audio | Boolean | Set player type as audio | false |
sources | Object | Declaration example below | |
Video Props | |||
video | Boolean | Set player type as video | false |
videoWidth | String | Video width | 100% |
videoHeight | String | Video height | auto |
poster | String | URL of the poster image | |
fullscreen | String | Type of fullscreen to use. See types below | both |
autoFullscreen | Boolean | Active fullscreen mode on play | false |
sources | Object | Declaration example below | |
viewport | Function | Element to scale to | window |
Fullscreen Types | |||
native | Browser native requestFullscreen method | ||
scale | Scale the player to the viewport | ||
both | Enable both native and scale methods |
Sources must be declared as an object as type
:source
. Example:
const audioSources = {
"audio/mp3": "//localhost/music.mp3",
...
};
const videoSources = {
"video/mp4": "//localhost/video.mp4",
"video/webm": "//localhost/video.webm",
...
};
If you want to style the player you can do so by importing the scss file:
<style lang="scss">
@import '@iomariani/vue-player/src/scss/vue-player.scss';
</style>
$var | default |
---|---|
$player-background | #f0f0f0 |
$player-border-radius | 20px |
$player-buffer-background | #ffffff33 |
$player-fullscreen-z-index | 100000 |
scale
fullscreenscale
FAQs
Vue.js HTML5 Audio/Video Player
The npm package @iomariani/vue-player receives a total of 42 weekly downloads. As such, @iomariani/vue-player popularity was classified as not popular.
We found that @iomariani/vue-player 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.