youtube-iframe-ctrl
Advanced tools
Comparing version
@@ -1,2 +0,2 @@ | ||
import YouTubeIFrameCtrl from "./YouTubeIFrameCtrl"; | ||
import YouTubeIFrameCtrl from "./YouTubeIFrameCtrl.js"; | ||
export default YouTubeIFrameCtrl; |
@@ -90,3 +90,3 @@ export default class YouTubeIFrameCtrl { | ||
func: command, | ||
args: args?.join(',') || '' | ||
args: args || [] | ||
}), '*'); | ||
@@ -93,0 +93,0 @@ } |
{ | ||
"name": "youtube-iframe-ctrl", | ||
"version": "1.0.0-beta.0", | ||
"version": "1.0.0", | ||
"description": "Simple YouTube iFrame controller with no additional dependencies and no YouTube iFrame API script.", | ||
@@ -11,3 +11,8 @@ "author": "mihauco <github@mihau.co> (https://mihau.co)", | ||
}, | ||
"keywords": [ "youtube", "iframe", "controller", "api" ], | ||
"keywords": [ | ||
"youtube", | ||
"iframe", | ||
"controller", | ||
"api" | ||
], | ||
"license": "MIT", | ||
@@ -20,5 +25,6 @@ "main": "dist/index.js", | ||
"watch": "npm run clean && tsc -w", | ||
"build": "npm run clean && tsc", | ||
"build": "npm run clean && tsc && node fixExtension.js", | ||
"build-demo": "npm run build && cp dist/YouTubeIFrameCtrl.js demo/YouTubeIFrameCtrl.js", | ||
"serve-demo": "npm run build-demo && http-server demo", | ||
"deploy-demo": "npm run build-demo && gh-pages -d demo", | ||
"test": "jest" | ||
@@ -28,2 +34,3 @@ }, | ||
"@types/jest": "^29.5.12", | ||
"gh-pages": "^6.1.1", | ||
"http-server": "14.1.1", | ||
@@ -30,0 +37,0 @@ "jest": "^29.7.0", |
@@ -5,6 +5,8 @@ # YouTube iFrame Controller | ||
Demo with examples: [youtube-iframe-ctrl.mihau.co](https://youtube-iframe-ctrl.mihau.co) | ||
--- | ||
**BETA WARNING** | ||
**Toss a Coin to Your Developer** | ||
This package is still in BETA. It should work properly and will hopefully become stable soon, but anyway - you have been warned. | ||
If you this package helped you and you would like to spare me some change - you can do it via buymeacoffee.com or buycoffee.to. | ||
@@ -22,2 +24,3 @@ --- | ||
- Events | ||
- Quick note about autoplay | ||
@@ -32,2 +35,4 @@ ## Installation | ||
## Usage | ||
@@ -80,3 +85,3 @@ | ||
Plays the video. Under the hood it uses `command()` method. | ||
Plays the video. Under the hood it uses `command()` method. __IMPORTANT!__ If you would like autoplay a video it must be muted first! More info at the end of readme. | ||
@@ -174,1 +179,5 @@ Example: | ||
``` | ||
# Quick note about autoplay | ||
YouTube does not allow unmuted videos to autoplay without user interaction (likely using [UserActivation](https://developer.mozilla.org/en-US/docs/Web/API/UserActivation) to check if user interacted with the page, though I haven't confirmed it). If you want to play a YouTube video on page load, it must be muted first. |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
11892
6.31%1
-50%179
5.29%9
12.5%