├── .npmignore
├── .github
├── dependabot.yml
└── workflows
│ └── ci.yml
├── LICENSE
├── package.json
├── README.md
└── index.js
/.npmignore:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: npm
4 | directory: /
5 | schedule:
6 | interval: daily
7 | labels:
8 | - dependency
9 | versioning-strategy: increase-if-necessary
10 | - package-ecosystem: github-actions
11 | directory: /
12 | schedule:
13 | interval: daily
14 | labels:
15 | - dependency
16 |
--------------------------------------------------------------------------------
/.github/workflows/ci.yml:
--------------------------------------------------------------------------------
1 | name: ci
2 | 'on':
3 | - push
4 | - pull_request
5 | jobs:
6 | test:
7 | name: Node ${{ matrix.node }} / ${{ matrix.os }}
8 | runs-on: ${{ matrix.os }}
9 | strategy:
10 | fail-fast: false
11 | matrix:
12 | os:
13 | - ubuntu-latest
14 | node:
15 | - '14'
16 | steps:
17 | - uses: actions/checkout@v2
18 | - uses: actions/setup-node@v2
19 | with:
20 | node-version: ${{ matrix.node }}
21 | - run: npm install
22 | - run: npm run build --if-present
23 | - run: npm test
24 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) Feross Aboukhadijeh
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "yt-player",
3 | "description": "Simple, robust YouTube Iframe Player API",
4 | "version": "3.6.1",
5 | "author": {
6 | "name": "Feross Aboukhadijeh",
7 | "email": "feross@feross.org",
8 | "url": "https://feross.org"
9 | },
10 | "bugs": {
11 | "url": "https://github.com/feross/yt-player/issues"
12 | },
13 | "dependencies": {
14 | "load-script2": "^2.0.1"
15 | },
16 | "devDependencies": {
17 | "standard": "*"
18 | },
19 | "homepage": "https://github.com/feross/yt-player",
20 | "keywords": [
21 | "youtube",
22 | "youtube player",
23 | "player",
24 | "iframe",
25 | "api",
26 | "youtube api",
27 | "youtube iframe api",
28 | "iframe api",
29 | "yt player",
30 | "yt-player",
31 | "youtube embed"
32 | ],
33 | "license": "MIT",
34 | "main": "index.js",
35 | "repository": {
36 | "type": "git",
37 | "url": "git://github.com/feross/yt-player.git"
38 | },
39 | "scripts": {
40 | "test": "standard"
41 | },
42 | "funding": [
43 | {
44 | "type": "github",
45 | "url": "https://github.com/sponsors/feross"
46 | },
47 | {
48 | "type": "patreon",
49 | "url": "https://www.patreon.com/feross"
50 | },
51 | {
52 | "type": "consulting",
53 | "url": "https://feross.org/support"
54 | }
55 | ]
56 | }
57 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # yt-player [![ci][ci-image]][ci-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
2 |
3 | [ci-image]: https://img.shields.io/github/workflow/status/feross/yt-player/ci/master
4 | [ci-url]: https://github.com/feross/yt-player/actions
5 | [npm-image]: https://img.shields.io/npm/v/yt-player.svg
6 | [npm-url]: https://npmjs.org/package/yt-player
7 | [downloads-image]: https://img.shields.io/npm/dm/yt-player.svg
8 | [downloads-url]: https://npmjs.org/package/yt-player
9 | [standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
10 | [standard-url]: https://standardjs.com
11 |
12 | ### Simple, robust, blazing-fast YouTube Player API
13 |
14 | This package is used on [Play.cash](https://play.cash).
15 |
16 | ## Install
17 |
18 | ```
19 | npm install yt-player
20 | ```
21 |
22 | If you do not use a bundler, you can use the [standalone script](https://bundle.run/yt-player) directly in a `` to your page
41 | - Automatically detects the presence of the API `