New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.5.2 to 0.6.0

3

lite-youtube.js

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

this.videoPlay = this.getAttribute('videoplay') || 'Play';
this.videoStartAt = this.getAttribute('start') || 0;
this.autoLoad = this.getAttribute('autoload') === '' ? true : false;

@@ -193,3 +194,3 @@

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

@@ -196,0 +197,0 @@ this.__domRefFrame.insertAdjacentHTML('beforeend', iframeHTML);

@@ -10,3 +10,3 @@ {

"license": "MIT",
"version": "0.5.2",
"version": "0.6.0",
"main": "lite-youtube.js",

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

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

- It's locale ready; you can set the `videoplay` to have a properly locale based label
- Set the `start` attribute to start at a particular place in a video
- You can set `autoload` to use Intersection Observer to load the iframe when scrolled into view.

@@ -43,3 +44,3 @@ - Loads placeholder image as WebP with a Jpeg fallback

```html
<script type="module" src="https://cdn.jsdelivr.net/npm/@justinribeiro/lite-youtube@0.5.2/lite-youtube.js">
<script type="module" src="https://cdn.jsdelivr.net/npm/@justinribeiro/lite-youtube@0.6.0/lite-youtube.js">
```

@@ -89,2 +90,9 @@

## Set a video start time
```html
<!-- Start at 5 seconds -->
<lite-youtube videoid="guJLfqTFfIw" start="5"></lite-youtube>
```
## AutoLoad with IntersectionObserver

@@ -109,1 +117,2 @@

| `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` |

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