
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@mellkam/vue-plyr
Advanced tools
Integration of the Plyr player with Vue framework.
It uses Plyr by sampotts for the players.
This package has two required peer dependencies.
"peerDependencies": {
"plyr": ">=3.6.3",
"vue": ">=3.2.0"
},
Supported versions are listed above.
It is assumed that vue is already used in your project.
npm i @mellkam/vue-plyr plyr
yarn add @mellkam/vue-plyr plyr
pnpm add @mellkam/vue-plyr plyr
Basic usage with component
<template>
<Player>
<div data-plyr-provider="youtube" data-plyr-embed-id="bTqVqk7FSmY"></div>
</Player>
</template>
<script lang="ts" setup>
import "plyr/dist/plyr.css";
import { Player } from "@mellkam/vue-plyr";
</script>
You can access the plyr instance through the "plyr" link. But it will only be available when the component will mount.
<template>
<Player ref="player">
<video />
</Player>
</template>
<script lang="ts" setup>
import "plyr/dist/plyr.css";
import { Player, PlayerInstance, usePlyr } from "@mellkam/vue-plyr";
import { ref, onMounted } from "vue";
const player = ref<PlayerInstance | null>(null);
const { plyr } = usePlyr(player);
onMounted(() => {
console.log(plyr.value);
});
</script>
But for ease of use you can call the onPlyrInit
event hook. You can pass a callback and get an instance of plyr.
const player = ref<PlayerInstance | null>(null);
const { onPlyrInit } = usePlyr(player);
onPlyrInit((plyr) => {
console.log(plyr);
})
The Plugin is just a function that gets PlyrData (the same data that usePlyr
returns).
const { addPlugin } = usePlyr(player);
const plugin: Plugin<void> = (data) => {
data.onPlyrInit((plyr) => {
plyr.once("canplay", () => {
console.log("Player can play!!!");
});
});
}
addPlugin(plugin);
You can return the value from the plugin and use it in your components.
const { addPlugin } = usePlyr(player);
const { isPause } = addPlugin((data) => {
const isPause = ref(true);
data.onPlyrInit((plyr) => {
plyr.once("pause", () => {
isPause.value = true;
});
plyr.once("play", () => {
isPause.value = false;
});
});
return { isPause };
});
FAQs
Integration of the Plyr player with Vue framework
The npm package @mellkam/vue-plyr receives a total of 0 weekly downloads. As such, @mellkam/vue-plyr popularity was classified as not popular.
We found that @mellkam/vue-plyr 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.