Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@techassi/vue-youtube-iframe
Advanced tools
This plugin makes it easy to integrate the YouTube Iframe API into your Vue app. This plugin is Vue V3 compatible.
This plugin makes it easy to integrate the YouTube Iframe API into your Vue app. This plugin is Vue V3 compatible.
⚠️ The new version 1.0.6
(rewritten in Typescript) introduces the following breaking change:
The events @ended
, @playing
, @paused
, @buffering
and @cued
will no longer be emitted. Instead you should now
use @state-change
to catch the events when the player state changes. This better represents the behaviour of the
YouTube Iframe API described here.
YT
from @types/youtube
(See
here and
here).npm install @techassi/vue-youtube-iframe --save
or
yarn add @techassi/vue-youtube-iframe
main.js
/ main.ts
import { createApp } from 'vue';
import App from './App.vue';
import YoutubeIframe from '@techassi/vue-youtube-iframe';
createApp(App).use(YoutubeIframe).mount('#app');
YourComponent.vue
<template>
<youtube-iframe :video-id="YT_VIDEO_ID"></youtube-iframe>
</template>
YourComponent.vue
<template>
<youtube-iframe
:video-id="YT_VIDEO_ID"
:player-width="WIDTH"
:player-height="HEIGHT"
:no-cookie="TRUE / FALSE"
:player-parameters="YT_PLAYER_PARAMS"
@EVENT="CALLBACK"
></youtube-iframe>
</template>
Vue currently doesn't support typings when using a component in a SFC and accessing it via ref
/ this.$refs
. There
is a way to bring in typings when using ref
. Please note: This isn't the most elegant solution.
<template>
<youtube-iframe :video-id="YT_VIDEO_ID" ref="yt"></youtube-iframe>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { Player } from '@techassi/vue-youtube-iframe';
export default defineComponent({
name: 'App',
mounted() {
const player = this.$refs.yt as typeof Player;
// Variable player now has typings
},
});
</script>
:videoId / :video-id
: Specify the YT video id (e.g. dQw4w9WgXcQ
):playerWidth / :player-width
: Specify the player's width in pixels:playerHeight / :player-height
: Specify the player's height in pixels:noCookie / :no-cookie
: If set to true
the host will be set to https://www.youtube-nocookie.com
:playerParameters / :player-parameters
: Set player parameters, see hereFor the available player parameters see here
@ready, @error, @state-change
For detailed event information check here
Contributions and pull request are welcome!
cd vue-youtube-iframe
yarn install / npm install
yarn run build / npm run build
FAQs
This plugin makes it easy to integrate the YouTube Iframe API into your Vue app. This plugin is Vue V3 compatible.
The npm package @techassi/vue-youtube-iframe receives a total of 68 weekly downloads. As such, @techassi/vue-youtube-iframe popularity was classified as not popular.
We found that @techassi/vue-youtube-iframe 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.