Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@justinribeiro/lite-youtube

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@justinribeiro/lite-youtube - npm Package Compare versions

Comparing version 0.8.0 to 0.9.0

1

lite-youtube.d.ts

@@ -36,2 +36,3 @@ /**

set autoLoad(value: boolean);
get params(): string;
/**

@@ -38,0 +39,0 @@ * Define our shadowDOM for the component

9

lite-youtube.js

@@ -51,6 +51,6 @@ /**

get videoStartAt() {
return Number(this.getAttribute('videoPlay') || '0');
return Number(this.getAttribute('videoStartAt') || '0');
}
set videoStartAt(time) {
this.setAttribute('videoPlay', String(time));
this.setAttribute('videoStartAt', String(time));
}

@@ -68,2 +68,5 @@ get autoLoad() {

}
get params() {
return `start=${this.videoStartAt}&${this.getAttribute('params')}`;
}
/**

@@ -211,3 +214,3 @@ * Define our shadowDOM for the component

allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen
src="https://www.youtube.com/embed/${this.videoId}?autoplay=1&start=${this.videoStartAt}"
src="https://www.youtube.com/embed/${this.videoId}?autoplay=1&${this.params}"
></iframe>`;

@@ -214,0 +217,0 @@ this.domRefFrame.insertAdjacentHTML('beforeend', iframeHTML);

@@ -22,3 +22,3 @@ {

"license": "MIT",
"version": "0.8.0",
"version": "0.9.0",
"main": "lite-youtube.js",

@@ -25,0 +25,0 @@ "module": "lite-youtube.js",

@@ -92,3 +92,3 @@ [![npm version](https://badge.fury.io/js/%40justinribeiro%2Flite-youtube.svg)](https://badge.fury.io/js/%40justinribeiro%2Flite-youtube)

<!-- Start at 5 seconds -->
<lite-youtube videoid="guJLfqTFfIw" start="5"></lite-youtube>
<lite-youtube videoid="guJLfqTFfIw" videoStartAt="5"></lite-youtube>
```

@@ -104,2 +104,11 @@

## YouTube QueryParams
Use any [YouTube Embedded Players and Player Parameters](https://developers.google.com/youtube/player_parameters) you like
```html
<lite-youtube videoid="guJLfqTFfIw" params="controls=0&enablejsapi=1">
</lite-youtube>
```
## Attributes

@@ -110,8 +119,9 @@

| Name | Description | Default |
| ------------ | ---------------------------------------------------------------- | ------- |
| `videoid` | The YouTube videoid | `` |
| `videotitle` | The title of the video | `Video` |
| `videoplay` | The title of the play button (for translation) | `Play` |
| `autoload` | Use Intersection Observer to load iframe when scrolled into view | `false` |
| `start` | Set the point at which the video should start, in seconds | `0` |
| Name | Description | Default |
| -------------- | ---------------------------------------------------------------- | ------- |
| `videoid` | The YouTube videoid | `` |
| `videotitle` | The title of the video | `Video` |
| `videoplay` | The title of the play button (for translation) | `Play` |
| `videoStartAt` | Set the point at which the video should start, in seconds | `0` |
| `autoload` | Use Intersection Observer to load iframe when scrolled into view | `false` |
| `params` | Set YouTube query parameters | `` |

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc