multi_embed_player 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/add_exports.js +42 -0
- package/dist/iframe_api/bilibili.d.ts +210 -0
- package/dist/iframe_api/bilibili.d.ts.map +1 -0
- package/dist/iframe_api/bilibili.js +1035 -0
- package/dist/iframe_api/bilibili.js.map +1 -0
- package/dist/iframe_api/niconico.d.ts +191 -0
- package/dist/iframe_api/niconico.d.ts.map +1 -0
- package/dist/iframe_api/niconico.js +325 -0
- package/dist/iframe_api/niconico.js.map +1 -0
- package/dist/iframe_api/soundcloud.d.ts +152 -0
- package/dist/iframe_api/soundcloud.d.ts.map +1 -0
- package/dist/iframe_api/soundcloud.js +360 -0
- package/dist/iframe_api/soundcloud.js.map +1 -0
- package/dist/iframe_api/youtube.d.ts +96 -0
- package/dist/iframe_api/youtube.d.ts.map +1 -0
- package/dist/iframe_api/youtube.js +269 -0
- package/dist/iframe_api/youtube.js.map +1 -0
- package/dist/multi_embed_player.d.ts +231 -0
- package/dist/multi_embed_player.d.ts.map +1 -0
- package/dist/multi_embed_player.js +921 -0
- package/dist/multi_embed_player.js.map +1 -0
- package/package.json +9 -2
- package/.github/workflows/build-and-deploy.yml +0 -44
- package/.gitmodules +0 -3
- package/browserExtention/chrome/background.js +0 -55
- package/browserExtention/chrome/extention.json +0 -1
- package/browserExtention/chrome/liteplayer.js +0 -26439
- package/browserExtention/chrome/manifest.json +0 -31
- package/browserExtention/chrome/player-selector.js +0 -1854
- package/browserExtention/firefox/background.js +0 -27
- package/browserExtention/firefox/extention.json +0 -1
- package/browserExtention/firefox/liteplayer.js +0 -26439
- package/browserExtention/firefox/manifest.json +0 -19
- package/browserExtention/firefox/player-selector.js +0 -1854
- package/documents/.hugo_build.lock +0 -0
- package/documents/archetypes/default.md +0 -5
- package/documents/assets/jsconfig.json +0 -11
- package/documents/content/docs/install.md +0 -103
- package/documents/content/docs/quickstart.md +0 -51
- package/documents/content/docs/reference/HTML.md +0 -31
- package/documents/content/docs/reference/_index.md +0 -10
- package/documents/content/docs/reference/error_code.md +0 -23
- package/documents/content/docs/reference/iframe_api.md +0 -737
- package/documents/content/docs/reference/iframe_class.md +0 -230
- package/documents/content/docs/reference/multi_embed_player_class.md +0 -113
- package/documents/content/docs/reference/reserved_words.md +0 -71
- package/documents/content/docs/usage/GDPR_mode.md +0 -77
- package/documents/content/docs/usage/_index.md +0 -10
- package/documents/content/docs/usage/custom_playlist.md +0 -239
- package/documents/content/docs/usage/embed_api.md +0 -163
- package/documents/content/docs/usage/embed_various_service.md +0 -81
- package/documents/content/docs/usage/thumbnail_click.md +0 -57
- package/documents/go.mod +0 -8
- package/documents/go.sum +0 -14
- package/documents/hugo.toml +0 -18
- package/documents/layouts/partials/docs/sidebar.html +0 -117
- package/documents/layouts/partials/landing/features.html +0 -47
- package/documents/layouts/robots.txt +0 -4
- package/documents/static/_headers +0 -7
- package/documents/static/localStorageCheck.html +0 -27
- package/documents/static/no_extention.json +0 -1
- package/example.html +0 -27
- package/extention.json +0 -1
- package/icon/video_not_found.odg +0 -0
- package/icon/video_not_found.svgz +0 -0
- package/iframe_api/bilibili.ts +0 -1095
- package/iframe_api/niconico.ts +0 -429
- package/iframe_api/soundcloud.ts +0 -450
- package/iframe_api/youtube.ts +0 -311
- package/multi_embed_player.ts +0 -989
- package/player_api_gate/bilibili-api-gate/cgi/cpp/bilibili-api-gate-cgi.cpp +0 -281
- package/player_api_gate/bilibili-api-gate/cgi/go/src.go +0 -46
- package/player_api_gate/bilibili-api-gate/cloudflare_workers/package-lock.json +0 -1356
- package/player_api_gate/bilibili-api-gate/cloudflare_workers/package.json +0 -12
- package/player_api_gate/bilibili-api-gate/cloudflare_workers/src/index.js +0 -50
- package/player_api_gate/bilibili-api-gate/cloudflare_workers/wrangler.toml +0 -3
- package/player_api_gate/iframe-api-ts/.editorconfig +0 -12
- package/player_api_gate/iframe-api-ts/.prettierrc +0 -6
- package/player_api_gate/iframe-api-ts/package-lock.json +0 -3054
- package/player_api_gate/iframe-api-ts/package.json +0 -18
- package/player_api_gate/iframe-api-ts/src/bilibili.ts +0 -49
- package/player_api_gate/iframe-api-ts/src/index.ts +0 -35
- package/player_api_gate/iframe-api-ts/src/niconico.ts +0 -95
- package/player_api_gate/iframe-api-ts/src/soundcloud.ts +0 -38
- package/player_api_gate/iframe-api-ts/src/types.ts +0 -115
- package/player_api_gate/iframe-api-ts/src/url-proxy.ts +0 -29
- package/player_api_gate/iframe-api-ts/src/utils.ts +0 -82
- package/player_api_gate/iframe-api-ts/src/youtube.ts +0 -41
- package/player_api_gate/iframe-api-ts/test/bilibili.spec.ts +0 -47
- package/player_api_gate/iframe-api-ts/test/env.d.ts +0 -3
- package/player_api_gate/iframe-api-ts/test/index.spec.ts +0 -59
- package/player_api_gate/iframe-api-ts/test/niconico.spec.ts +0 -55
- package/player_api_gate/iframe-api-ts/test/soundcloud.spec.ts +0 -55
- package/player_api_gate/iframe-api-ts/test/tsconfig.json +0 -8
- package/player_api_gate/iframe-api-ts/test/url-proxy.spec.ts +0 -46
- package/player_api_gate/iframe-api-ts/test/youtube.spec.ts +0 -45
- package/player_api_gate/iframe-api-ts/tsconfig.json +0 -45
- package/player_api_gate/iframe-api-ts/vitest.config.mts +0 -11
- package/player_api_gate/iframe-api-ts/worker-configuration.d.ts +0 -5768
- package/player_api_gate/iframe-api-ts/wrangler.jsonc +0 -47
- package/player_api_gate/iframe_api/.editorconfig +0 -13
- package/player_api_gate/iframe_api/.prettierrc +0 -6
- package/player_api_gate/iframe_api/package-lock.json +0 -1307
- package/player_api_gate/iframe_api/package.json +0 -12
- package/player_api_gate/iframe_api/src/bilibili_api.js +0 -60
- package/player_api_gate/iframe_api/src/index.js +0 -47
- package/player_api_gate/iframe_api/src/niconico_api.js +0 -112
- package/player_api_gate/iframe_api/src/soundcloud_api.js +0 -57
- package/player_api_gate/iframe_api/src/url_proxy.js +0 -28
- package/player_api_gate/iframe_api/src/youtube_api.js +0 -44
- package/player_api_gate/iframe_api/wrangler.toml +0 -51
- package/player_api_gate/niconico-imager/cgi/go/src.go +0 -74
- package/player_api_gate/niconico-imager/cloudflare_workers/package-lock.json +0 -2175
- package/player_api_gate/niconico-imager/cloudflare_workers/package.json +0 -12
- package/player_api_gate/niconico-imager/cloudflare_workers/src/index.js +0 -78
- package/player_api_gate/niconico-imager/cloudflare_workers/wrangler.toml +0 -3
- package/test_script.html +0 -172
- package/tsconfig.json +0 -36
|
File without changes
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"baseUrl": ".",
|
|
4
|
-
"paths": {
|
|
5
|
-
"*": [
|
|
6
|
-
"..\\..\\..\\..\\..\\AppData\\Local\\hugo_cache\\modules\\filecache\\modules\\pkg\\mod\\github.com\\gohugoio\\hugo-mod-jslibs-dist\\popperjs\\v2@v2.21100.20000\\package\\dist\\cjs\\popper.js\\*",
|
|
7
|
-
"..\\..\\..\\..\\..\\AppData\\Local\\hugo_cache\\modules\\filecache\\modules\\pkg\\mod\\github.com\\twbs\\bootstrap@v5.3.2+incompatible\\js\\*"
|
|
8
|
-
]
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
weight: 200
|
|
3
|
-
title: "Install"
|
|
4
|
-
description: ""
|
|
5
|
-
icon: "article"
|
|
6
|
-
date: "2023-11-04T12:12:58+09:00"
|
|
7
|
-
lastmod: "2023-11-04T12:12:58+09:00"
|
|
8
|
-
draft: false
|
|
9
|
-
toc: true
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Iframe API
|
|
13
|
-
|
|
14
|
-
If you want to use
|
|
15
|
-
|
|
16
|
-
- GDPR mode
|
|
17
|
-
- below service player,
|
|
18
|
-
|
|
19
|
-
you need to install multi_embed_player iframe_api to [Cloudflare workers](https://workers.cloudflare.com/)
|
|
20
|
-
or using cors proxy like [cors-anywhere](https://github.com/Rob--W/cors-anywhere).
|
|
21
|
-
|
|
22
|
-
Need install service list
|
|
23
|
-
|
|
24
|
-
- bilibili
|
|
25
|
-
- nicovideo
|
|
26
|
-
|
|
27
|
-
### Use iframe api
|
|
28
|
-
|
|
29
|
-
#### Install iframe_api to cloudflare workers
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
git clone https://github.com/bonjinnorenka/multi_embed_player.git
|
|
33
|
-
cd multi_embed_player/player_api_gate/iframe_api
|
|
34
|
-
npm install
|
|
35
|
-
npm run deploy
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
#### Set option in cloudflare workers
|
|
39
|
-
|
|
40
|
-
you may be need to add some options to iframe api.
|
|
41
|
-
|
|
42
|
-
If you use nicovideo, you need to set NON_PROFIT environment variable to TRUE in cloudflare workers because [nicovideo official search api](https://site.nicovideo.jp/search-api-docs/snapshot) is only available for non-profit use
|
|
43
|
-
|
|
44
|
-
If you use bilibili, you may need to use http proxy because some request seems to be blocked by bilibili.
|
|
45
|
-
|
|
46
|
-
#### Set option in html
|
|
47
|
-
|
|
48
|
-
```html
|
|
49
|
-
<!--before multi_embed_player.js script tag-->
|
|
50
|
-
<script type="text/javascript">
|
|
51
|
-
const multi_embed_player_set_variable = (classname)=>{
|
|
52
|
-
classname.iframe_api_endpoint = "YOUR IFRAME API ENDPOINT LIKE https://iframe_api.ryokuryu.workers.dev";
|
|
53
|
-
}
|
|
54
|
-
</script>
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### Use cors proxy
|
|
58
|
-
|
|
59
|
-
Cors proxie requirement
|
|
60
|
-
|
|
61
|
-
- send get request
|
|
62
|
-
- return response with cors header if your cors proxy is other domain
|
|
63
|
-
- If you use bilibili, you may need to set cors proxy **NOT HOSTED ON CLOUDFLARE** because some request seems to be blocked by bilibili.
|
|
64
|
-
|
|
65
|
-
#### set cors proxy url
|
|
66
|
-
|
|
67
|
-
```html
|
|
68
|
-
<!--before multi_embed_player.js script tag-->
|
|
69
|
-
<script type="text/javascript">
|
|
70
|
-
const multi_embed_player_set_variable = (classname)=>{
|
|
71
|
-
classname.cors_proxy_url = "YOUR CORS PROXY URL LIKE https://cors-anywhere.herokuapp.com";
|
|
72
|
-
}
|
|
73
|
-
</script>
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## Documents
|
|
77
|
-
|
|
78
|
-
Documents provided with this page.
|
|
79
|
-
|
|
80
|
-
But if you want to install locally, please follow the steps below.
|
|
81
|
-
|
|
82
|
-
### Deploy to local
|
|
83
|
-
|
|
84
|
-
**You need to install hugo 0.120.3 or later And extended version.**
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
git clone https://https://github.com/bonjinnorenka/multi_embed_player.git
|
|
88
|
-
cd multi_embed_player/documents
|
|
89
|
-
hugo
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### Deploy to cloudflare pages or netlify
|
|
93
|
-
|
|
94
|
-
you need to some settings.
|
|
95
|
-
|
|
96
|
-
- set root directory to `documents`
|
|
97
|
-
- hugo version set to 0.120.3 or later using environment variable `HUGO_VERSION`
|
|
98
|
-
- you need to set `HUGO_BASEURL` to your domain if you want to use robots.txt and set sitemap.xml correctly.
|
|
99
|
-
|
|
100
|
-
Netlify only (maybe)
|
|
101
|
-
|
|
102
|
-
- output directory set to `documents/public`
|
|
103
|
-
- Need to set GO version to 1.21.3 or later using environment variable `GO_VERSION`
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
weight: 100
|
|
3
|
-
title: "Quickstart"
|
|
4
|
-
description: ""
|
|
5
|
-
icon: ""
|
|
6
|
-
date: "2023-10-30T23:42:10+09:00"
|
|
7
|
-
lastmod: "2023-10-30T23:42:10+09:00"
|
|
8
|
-
draft: false
|
|
9
|
-
toc: true
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Add JS and CSS to your HTML
|
|
13
|
-
|
|
14
|
-
add js file url and CSS to your html
|
|
15
|
-
|
|
16
|
-
```html
|
|
17
|
-
<style>
|
|
18
|
-
multi-embed-player{
|
|
19
|
-
width: 480px;
|
|
20
|
-
height: 270px;
|
|
21
|
-
max-width: 100%;
|
|
22
|
-
}
|
|
23
|
-
</style>
|
|
24
|
-
<script src="https://cdn.jsdelivr.net/npm/multi_embed_player@3/dist/multi_embed_player.js"></script>
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
<style>
|
|
28
|
-
multi-embed-player{
|
|
29
|
-
width: 480px;
|
|
30
|
-
height: 270px;
|
|
31
|
-
max-width: 100%;
|
|
32
|
-
}
|
|
33
|
-
</style>
|
|
34
|
-
<script src="https://cdn.jsdelivr.net/npm/multi_embed_player@3/dist/multi_embed_player.js"></script>
|
|
35
|
-
|
|
36
|
-
## Add embed html content
|
|
37
|
-
|
|
38
|
-
This is normal youtube embed.
|
|
39
|
-
|
|
40
|
-
videoid is normal youtube video id.
|
|
41
|
-
|
|
42
|
-
service is need to detect to use correct service.
|
|
43
|
-
|
|
44
|
-
type embed is optional.
|
|
45
|
-
|
|
46
|
-
```html
|
|
47
|
-
<multi-embed-player videoid="_NC_pqMt5rY" service="youtube"></multi-embed-player>
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
<multi-embed-player videoid="_NC_pqMt5rY" service="youtube"></multi-embed-player>
|
|
51
|
-
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
weight: 5000
|
|
3
|
-
title: "HTML"
|
|
4
|
-
description: ""
|
|
5
|
-
icon: "article"
|
|
6
|
-
date: "2023-11-04T15:53:41+09:00"
|
|
7
|
-
lastmod: "2023-11-04T15:53:41+09:00"
|
|
8
|
-
draft: false
|
|
9
|
-
toc: true
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## multi-embed-player attribute list
|
|
13
|
-
|
|
14
|
-
This is only listed original or unique value.
|
|
15
|
-
|
|
16
|
-
{{< table "table-responsive" >}}
|
|
17
|
-
|
|
18
|
-
| attribute name | type | required | default value | description |
|
|
19
|
-
| -------------- | ------ | -------- | ------------- | --------------- |
|
|
20
|
-
| videoid | string | true | null | video id |
|
|
21
|
-
| service | string | true | null | service name |
|
|
22
|
-
| subVideoid | string | false | null | sub video id if use need subService |
|
|
23
|
-
| subService | string | false | null | sub service name|
|
|
24
|
-
| type | string | false | embed | embed or player or thumbnail-click |
|
|
25
|
-
| follow_GDPR | boolen | false | false | follow GDPR or not |
|
|
26
|
-
| img_url | string | false | null | image url it use instead of video id thumbnail |
|
|
27
|
-
| picture_tag | string of HTML | false | null | picture tag inner content it use instead of video id thumbnail |
|
|
28
|
-
| for | string | false | null | player id to play valid only thumbnail-click |
|
|
29
|
-
| play_control_wrap | boolen | false | true | wrap play control or not only valid on bilibili |
|
|
30
|
-
|
|
31
|
-
{{< /table >}}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
weight: 999
|
|
3
|
-
title: "Error_code"
|
|
4
|
-
description: ""
|
|
5
|
-
icon: "article"
|
|
6
|
-
date: "2024-06-21T20:59:55+09:00"
|
|
7
|
-
lastmod: "2024-06-21T20:59:55+09:00"
|
|
8
|
-
draft: false
|
|
9
|
-
toc: true
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Error_code
|
|
13
|
-
|
|
14
|
-
| Error Code | Description |
|
|
15
|
-
|------------|-------------|
|
|
16
|
-
| 401 | Invalid input |
|
|
17
|
-
| 403 | Embedding is not allowed |
|
|
18
|
-
| 404 | Content not found |
|
|
19
|
-
| 500 | Internal error (Native API) |
|
|
20
|
-
| 1000 | MEP script API loading error |
|
|
21
|
-
| 1001 | Third-party script API loading error |
|
|
22
|
-
| 1100 | iframe API error |
|
|
23
|
-
| 1200 | Local storage access error |
|