multi_embed_player 3.1.0 → 3.1.1

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.
Files changed (117) hide show
  1. package/dist/iframe_api/bilibili.d.ts +210 -0
  2. package/dist/iframe_api/bilibili.d.ts.map +1 -0
  3. package/dist/iframe_api/bilibili.js +1035 -0
  4. package/dist/iframe_api/bilibili.js.map +1 -0
  5. package/dist/iframe_api/niconico.d.ts +191 -0
  6. package/dist/iframe_api/niconico.d.ts.map +1 -0
  7. package/dist/iframe_api/niconico.js +325 -0
  8. package/dist/iframe_api/niconico.js.map +1 -0
  9. package/dist/iframe_api/soundcloud.d.ts +152 -0
  10. package/dist/iframe_api/soundcloud.d.ts.map +1 -0
  11. package/dist/iframe_api/soundcloud.js +360 -0
  12. package/dist/iframe_api/soundcloud.js.map +1 -0
  13. package/dist/iframe_api/youtube.d.ts +96 -0
  14. package/dist/iframe_api/youtube.d.ts.map +1 -0
  15. package/dist/iframe_api/youtube.js +269 -0
  16. package/dist/iframe_api/youtube.js.map +1 -0
  17. package/dist/multi_embed_player.d.ts +215 -0
  18. package/dist/multi_embed_player.d.ts.map +1 -0
  19. package/dist/multi_embed_player.js +921 -0
  20. package/dist/multi_embed_player.js.map +1 -0
  21. package/package.json +1 -1
  22. package/.github/workflows/build-and-deploy.yml +0 -44
  23. package/.gitmodules +0 -3
  24. package/browserExtention/chrome/background.js +0 -55
  25. package/browserExtention/chrome/extention.json +0 -1
  26. package/browserExtention/chrome/liteplayer.js +0 -26439
  27. package/browserExtention/chrome/manifest.json +0 -31
  28. package/browserExtention/chrome/player-selector.js +0 -1854
  29. package/browserExtention/firefox/background.js +0 -27
  30. package/browserExtention/firefox/extention.json +0 -1
  31. package/browserExtention/firefox/liteplayer.js +0 -26439
  32. package/browserExtention/firefox/manifest.json +0 -19
  33. package/browserExtention/firefox/player-selector.js +0 -1854
  34. package/documents/.hugo_build.lock +0 -0
  35. package/documents/archetypes/default.md +0 -5
  36. package/documents/assets/jsconfig.json +0 -11
  37. package/documents/content/docs/install.md +0 -103
  38. package/documents/content/docs/quickstart.md +0 -51
  39. package/documents/content/docs/reference/HTML.md +0 -31
  40. package/documents/content/docs/reference/_index.md +0 -10
  41. package/documents/content/docs/reference/error_code.md +0 -23
  42. package/documents/content/docs/reference/iframe_api.md +0 -737
  43. package/documents/content/docs/reference/iframe_class.md +0 -230
  44. package/documents/content/docs/reference/multi_embed_player_class.md +0 -113
  45. package/documents/content/docs/reference/reserved_words.md +0 -71
  46. package/documents/content/docs/usage/GDPR_mode.md +0 -77
  47. package/documents/content/docs/usage/_index.md +0 -10
  48. package/documents/content/docs/usage/custom_playlist.md +0 -239
  49. package/documents/content/docs/usage/embed_api.md +0 -163
  50. package/documents/content/docs/usage/embed_various_service.md +0 -81
  51. package/documents/content/docs/usage/thumbnail_click.md +0 -57
  52. package/documents/go.mod +0 -8
  53. package/documents/go.sum +0 -14
  54. package/documents/hugo.toml +0 -18
  55. package/documents/layouts/partials/docs/sidebar.html +0 -117
  56. package/documents/layouts/partials/landing/features.html +0 -47
  57. package/documents/layouts/robots.txt +0 -4
  58. package/documents/static/_headers +0 -7
  59. package/documents/static/localStorageCheck.html +0 -27
  60. package/documents/static/no_extention.json +0 -1
  61. package/example.html +0 -27
  62. package/extention.json +0 -1
  63. package/icon/video_not_found.odg +0 -0
  64. package/icon/video_not_found.svgz +0 -0
  65. package/iframe_api/bilibili.ts +0 -1095
  66. package/iframe_api/niconico.ts +0 -429
  67. package/iframe_api/soundcloud.ts +0 -450
  68. package/iframe_api/youtube.ts +0 -311
  69. package/multi_embed_player.ts +0 -989
  70. package/player_api_gate/bilibili-api-gate/cgi/cpp/bilibili-api-gate-cgi.cpp +0 -281
  71. package/player_api_gate/bilibili-api-gate/cgi/go/src.go +0 -46
  72. package/player_api_gate/bilibili-api-gate/cloudflare_workers/package-lock.json +0 -1356
  73. package/player_api_gate/bilibili-api-gate/cloudflare_workers/package.json +0 -12
  74. package/player_api_gate/bilibili-api-gate/cloudflare_workers/src/index.js +0 -50
  75. package/player_api_gate/bilibili-api-gate/cloudflare_workers/wrangler.toml +0 -3
  76. package/player_api_gate/iframe-api-ts/.editorconfig +0 -12
  77. package/player_api_gate/iframe-api-ts/.prettierrc +0 -6
  78. package/player_api_gate/iframe-api-ts/package-lock.json +0 -3054
  79. package/player_api_gate/iframe-api-ts/package.json +0 -18
  80. package/player_api_gate/iframe-api-ts/src/bilibili.ts +0 -49
  81. package/player_api_gate/iframe-api-ts/src/index.ts +0 -35
  82. package/player_api_gate/iframe-api-ts/src/niconico.ts +0 -95
  83. package/player_api_gate/iframe-api-ts/src/soundcloud.ts +0 -38
  84. package/player_api_gate/iframe-api-ts/src/types.ts +0 -115
  85. package/player_api_gate/iframe-api-ts/src/url-proxy.ts +0 -29
  86. package/player_api_gate/iframe-api-ts/src/utils.ts +0 -82
  87. package/player_api_gate/iframe-api-ts/src/youtube.ts +0 -41
  88. package/player_api_gate/iframe-api-ts/test/bilibili.spec.ts +0 -47
  89. package/player_api_gate/iframe-api-ts/test/env.d.ts +0 -3
  90. package/player_api_gate/iframe-api-ts/test/index.spec.ts +0 -59
  91. package/player_api_gate/iframe-api-ts/test/niconico.spec.ts +0 -55
  92. package/player_api_gate/iframe-api-ts/test/soundcloud.spec.ts +0 -55
  93. package/player_api_gate/iframe-api-ts/test/tsconfig.json +0 -8
  94. package/player_api_gate/iframe-api-ts/test/url-proxy.spec.ts +0 -46
  95. package/player_api_gate/iframe-api-ts/test/youtube.spec.ts +0 -45
  96. package/player_api_gate/iframe-api-ts/tsconfig.json +0 -45
  97. package/player_api_gate/iframe-api-ts/vitest.config.mts +0 -11
  98. package/player_api_gate/iframe-api-ts/worker-configuration.d.ts +0 -5768
  99. package/player_api_gate/iframe-api-ts/wrangler.jsonc +0 -47
  100. package/player_api_gate/iframe_api/.editorconfig +0 -13
  101. package/player_api_gate/iframe_api/.prettierrc +0 -6
  102. package/player_api_gate/iframe_api/package-lock.json +0 -1307
  103. package/player_api_gate/iframe_api/package.json +0 -12
  104. package/player_api_gate/iframe_api/src/bilibili_api.js +0 -60
  105. package/player_api_gate/iframe_api/src/index.js +0 -47
  106. package/player_api_gate/iframe_api/src/niconico_api.js +0 -112
  107. package/player_api_gate/iframe_api/src/soundcloud_api.js +0 -57
  108. package/player_api_gate/iframe_api/src/url_proxy.js +0 -28
  109. package/player_api_gate/iframe_api/src/youtube_api.js +0 -44
  110. package/player_api_gate/iframe_api/wrangler.toml +0 -51
  111. package/player_api_gate/niconico-imager/cgi/go/src.go +0 -74
  112. package/player_api_gate/niconico-imager/cloudflare_workers/package-lock.json +0 -2175
  113. package/player_api_gate/niconico-imager/cloudflare_workers/package.json +0 -12
  114. package/player_api_gate/niconico-imager/cloudflare_workers/src/index.js +0 -78
  115. package/player_api_gate/niconico-imager/cloudflare_workers/wrangler.toml +0 -3
  116. package/test_script.html +0 -172
  117. package/tsconfig.json +0 -36
@@ -1,737 +0,0 @@
1
- ---
2
- weight: 9000
3
- title: "Iframe_api"
4
- description: ""
5
- icon: "article"
6
- date: "2023-11-03T19:34:04+09:00"
7
- lastmod: "2023-11-03T19:34:04+09:00"
8
- draft: false
9
- toc: true
10
- ---
11
-
12
- ## url_proxy
13
-
14
- ### API endpoint
15
-
16
- ```URL
17
- GET ?route=url_proxy&url=${Fetch URL}
18
- ```
19
-
20
- Fetch URL should encode
21
-
22
- In javascript, you should use encodeURIComponent to encode Fetch URL.
23
-
24
- ### Example request
25
-
26
- ```url
27
- GET ?route=url_proxy&url=https%3A%2F%2Fpokeapi.co%2Fapi%2Fv2%2Fpokemon%2F1
28
- ```
29
-
30
- Example of fetch resorce using url_proxy,fetch [pokemon API](https://pokeapi.co/)
31
-
32
- ## Youtube API
33
-
34
- ### API endpoint
35
-
36
- ```URL
37
- GET ?route=youtube&videoid=${video id(11 characters)}
38
- ```
39
-
40
- {{< alert context="info" text="This api depend on youtube oembed api" />}}
41
-
42
- ### Query parameter
43
-
44
- {{< table "table-responsive" >}}
45
-
46
- | Parameter Name | Required | Type | Description |
47
- | -------------- | -------- | ------ | ---------------------------------------------------------------------------- |
48
- | route | Yes | String | The route to the specific API endpoint. Must be **youtube** |
49
- | videoid | Yes | String | The ID of the video to retrieve details for. |
50
- | image_base64 | No | Number | If set to 1, the response will include a base64 encoded image. Default is 0. |
51
-
52
- {{< /table >}}
53
-
54
- ### Success response
55
-
56
- {{< tabs tabTotal="2">}} {{% tab tabName="JSON" %}}
57
-
58
- ```URL
59
- GET ?route=youtube&videoid=_NC_pqMt5rY&image_base64=1
60
- ```
61
-
62
- ```JSON
63
- {
64
- "title": "アンドロイドガール - DECO*27 / Covered 風真いろは×AZKi",
65
- "author_name": "Iroha ch. 風真いろは - holoX -",
66
- "author_url": "https://www.youtube.com/@kazamairoha",
67
- "type": "video",
68
- "height": 113,
69
- "width": 200,
70
- "version": "1.0",
71
- "provider_name": "YouTube",
72
- "provider_url": "https://www.youtube.com/",
73
- "thumbnail_height": 360,
74
- "thumbnail_width": 480,
75
- "thumbnail_url": "https://i.ytimg.com/vi/_NC_pqMt5rY/hqdefault.jpg",
76
- "html": "<iframe width=\"200\" height=\"113\" src=\"https://www.youtube.com/embed/_NC_pqMt5rY?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen title=\"アンドロイドガール - DECO*27 / Covered 風真いろは×AZKi\"></iframe>",
77
- "image_base64": "<BASE64 ENCODED JPEG IMAGE DATA>"
78
- }
79
- ```
80
-
81
- {{% /tab %}} {{% tab tabName="JSDOC" %}}
82
-
83
- ```JS
84
- /**
85
- * @typedef {Object} youtube_iframe_api
86
- * @property {string} title - The title of the YouTube video.
87
- * @property {string} author_name - The name of the author of the video.
88
- * @property {string} author_url - The URL of the author's YouTube channel.
89
- * @property {string} type - The type of the response like Video.
90
- * @property {number} height - The height in pixels required to display the HTML.
91
- * @property {number} width - The width in pixels required to display the HTML.
92
- * @property {string} version - The version of the oEmbed protocol (must 1.0).
93
- * @property {string} provider_name - The name of the oEmbed provider.
94
- * @property {string} provider_url - The URL of the oEmbed provider.
95
- * @property {number} thumbnail_height - The height of the video thumbnail.
96
- * @property {number} thumbnail_width - The width of the video thumbnail.
97
- * @property {string} thumbnail_url - The URL of the video thumbnail.
98
- * @property {string} html - The HTML required to embed a video.
99
- * @property {string} image_base64 - The base64 image (only show image_base64 parameter to 1).
100
- */
101
- ```
102
-
103
- {{% /tab %}} {{< /tabs >}}
104
-
105
- ### Failed response
106
-
107
- ```JSON
108
- {
109
- "title": "",
110
- "status": "failed notfound?"
111
- }
112
- ```
113
-
114
- ## Niconico API
115
-
116
- ### API Endpoint
117
-
118
- ```URL
119
- GET ?route=niconico&videoid=${video id}
120
- ```
121
-
122
- This API response depend on niconico return ones, so sometimes change from this or send error.(23/11/3)
123
-
124
- ### Query parameter
125
-
126
- {{< table "table-responsive" >}}
127
-
128
- | Parameter Name | Required | Type | Description |
129
- | -------------- | -------- | ------ | ---------------------------------------------------------------------------- |
130
- | route | Yes | String | The route to the specific API endpoint. Must be **niconico** |
131
- | videoid | Yes | String | The ID of the video to retrieve details for. |
132
- | image_base64 | No | Number | If set to 1, the response will include a base64 encoded image. Default is 0. |
133
-
134
- {{< /table >}}
135
-
136
- ### Success response
137
-
138
- {{< tabs tabTotal="2">}} {{% tab tabName="JSON" %}}
139
-
140
- ```URL
141
- GET ?route=niconico&videoid=sm9&image_base64=1
142
- ```
143
-
144
- ```JSON
145
- {
146
- "thumbnail_url": "https://nicovideo.cdn.nimg.jp/thumbnails/9/9",
147
- "image_base64": "<BASE64 ENCODED JPEG IMAGE DATA>",
148
- "status": "success",
149
- "videoid": "sm9",
150
- "title": "新・豪血寺一族 -煩悩解放 - レッツゴー!陰陽師",
151
- "description": "レッツゴー!陰陽師(フルコーラスバージョン)",
152
- "length": "5:20",
153
- "view_count": "21782451",
154
- "comment_count": "5422770",
155
- "mylist_count": "180815",
156
- "publish_time": "2007-03-06T00:33:00+09:00",
157
- "embedable": "1",
158
- "genre": "未設定"
159
- }
160
- ```
161
-
162
- {{< table "table-responsive" >}}
163
-
164
- | Parameter Name | Parameter Description |
165
- | -------------- | ------------------------------------------------------------------------- |
166
- | thumbnail_url | The URL of the NicoNico video thumbnail |
167
- | image_base64 | The base64 encoded image data (only shown if image_base64 parameter is 1) |
168
- | status | The status of the request (success or failed) |
169
- | videoid | The ID of the NicoNico video |
170
- | title | The title of the NicoNico video |
171
- | description | The description of the NicoNico video |
172
- | length | The length of the NicoNico video |
173
- | view_count | The view count of the NicoNico video |
174
- | comment_count | The comment count of the NicoNico video |
175
- | mylist_count | The mylist count of the NicoNico video |
176
- | publish_time | The publish time of the NicoNico video(ISO 8601 String) |
177
- | embedable | Whether the NicoNico video is embeddable or not |
178
- | genre | The genre of the NicoNico video |
179
-
180
- {{< /table >}}
181
-
182
- {{% /tab %}} {{% tab tabName="JSDOC" %}}
183
-
184
- ```JS
185
- /**
186
- * @typedef {Object} NicoNicoData
187
- * @property {string} thumbnail_url - The URL of the NicoNico video thumbnail.
188
- * @property {string} image_base64 - The base64 image (only show image_base64 parameter to 1).
189
- * @property {string} status - The status of the video.
190
- * @property {string} videoid - The ID of the video.
191
- * @property {string} title - The title of the video.
192
- * @property {string} description - The description of the video.
193
- * @property {string} length - The length of the video.
194
- * @property {string} view_count - The view count of the video.
195
- * @property {string} comment_count - The comment count of the video.
196
- * @property {string} mylist_count - The mylist count of the video.
197
- * @property {string} publish_time - The publish time of the video.
198
- * @property {string} embedable - Whether the video is embeddable or not.
199
- * @property {string} genre - The genre of the video.
200
- */
201
- ```
202
-
203
- {{% /tab %}} {{< /tabs >}}
204
-
205
- ### Failed request
206
-
207
- ```JSON
208
- {
209
- "status": "invalid videoid",
210
- "thumbnail_url": ""
211
- }
212
- ```
213
-
214
- ## Bilibili API
215
-
216
- ### API endpoint
217
-
218
- ```URL
219
- GET ?route=bilibili&videoid=${BVID}
220
- ```
221
-
222
- ### Query parameter
223
-
224
- {{< table "table-responsive" >}}
225
-
226
- | Parameter Name | Required | Type | Description |
227
- | -------------- | -------- | ------ | ---------------------------------------------------------------------------- |
228
- | route | Yes | String | The route to the specific API endpoint. Must be **bilibili** |
229
- | videoid | Yes | String | The ID of the video to retrieve details for. Must be **BVID** not use AVID |
230
- | image_base64 | No | Number | If set to 1, the response will include a base64 encoded image. Default is 0. |
231
-
232
- {{< /table >}}
233
-
234
- ### Sucess Response
235
-
236
- {{< tabs tabTotal="2">}} {{% tab tabName="JSON" %}}
237
-
238
- ```URL
239
- ?route=bilibili&videoid=BV18B4y1o7iA&image_base64=1
240
- ```
241
-
242
- ```JSON
243
- {
244
- "code": 0,
245
- "message": "0",
246
- "ttl": 1,
247
- "data": {
248
- "bvid": "BV18B4y1o7iA",
249
- "aid": 577398422,
250
- "videos": 1,
251
- "tid": 25,
252
- "tname": "MMD·3D",
253
- "copyright": 1,
254
- "pic": "http://i2.hdslb.com/bfs/archive/6a14b7e43765d6114e03712a6bf08c61b7a66c5e.jpg",
255
- "title": "【MMD/白粥nina】帝国少女",
256
- "pubdate": 1697793913,
257
- "ctime": 1697793913,
258
- "desc": "[ CREDITS ]\n\n[ MODEL ]\n模型所属:白粥nina\n模型制作:萧容与\n物理绑定:FixEll\n\n[ MOTION \\ CAMERA ]\nじゅんこだ\nhttp://www.nicovideo.jp/watch/sm33682991\n予沉7\nhttps://www.bilibili.com/video/av32301048\n\n[ STAGE ]\nゆづき-(万年寝不足-別館)\n\n[ EFFECTS ]\nRui\\そぼろ\\ikeno\\おたもん\\ビームマンP\\めめ\\化身バレッタ\\下っ腹P\\角砂糖\\Winglayer\\ましまし\\桜庭リョウ\\のりたまP\\かき\\みりあす\\もこたろ\n\n[ SONG ]\nR Sound Design - 帝国少女 ft.初音ミク\nhttp://www.nicovideo.jp/watch/sm30788596\nCover by Sawako碎花",
259
- "desc_v2": [
260
- {
261
- "raw_text": "[ CREDITS ]\n\n[ MODEL ]\n模型所属:白粥nina\n模型制作:萧容与\n物理绑定:FixEll\n\n[ MOTION \\ CAMERA ]\nじゅんこだ\nhttp://www.nicovideo.jp/watch/sm33682991\n予沉7\nhttps://www.bilibili.com/video/av32301048\n\n[ STAGE ]\nゆづき-(万年寝不足-別館)\n\n[ EFFECTS ]\nRui\\そぼろ\\ikeno\\おたもん\\ビームマンP\\めめ\\化身バレッタ\\下っ腹P\\角砂糖\\Winglayer\\ましまし\\桜庭リョウ\\のりたまP\\かき\\みりあす\\もこたろ\n\n[ SONG ]\nR Sound Design - 帝国少女 ft.初音ミク\nhttp://www.nicovideo.jp/watch/sm30788596\nCover by Sawako碎花",
262
- "type": 1,
263
- "biz_id": 0
264
- }
265
- ],
266
- "state": 0,
267
- "duration": 256,
268
- "rights": {
269
- "bp": 0,
270
- "elec": 0,
271
- "download": 1,
272
- "movie": 0,
273
- "pay": 0,
274
- "hd5": 1,
275
- "no_reprint": 1,
276
- "autoplay": 1,
277
- "ugc_pay": 0,
278
- "is_cooperation": 0,
279
- "ugc_pay_preview": 0,
280
- "no_background": 0,
281
- "clean_mode": 0,
282
- "is_stein_gate": 0,
283
- "is_360": 0,
284
- "no_share": 0,
285
- "arc_pay": 0,
286
- "free_watch": 0
287
- },
288
- "owner": {
289
- "mid": 3493284211067530,
290
- "name": "白粥nina",
291
- "face": "https://i1.hdslb.com/bfs/face/d867d7985e7db7c2446c5a627abf2e55299ee407.jpg"
292
- },
293
- "stat": {
294
- "aid": 577398422,
295
- "view": 53344,
296
- "danmaku": 31,
297
- "reply": 217,
298
- "favorite": 2054,
299
- "coin": 951,
300
- "share": 115,
301
- "now_rank": 0,
302
- "his_rank": 0,
303
- "like": 8600,
304
- "dislike": 0,
305
- "evaluation": "",
306
- "argue_msg": "",
307
- "vt": 0
308
- },
309
- "dynamic": "答应妈咪们的帝国少女来啦!",
310
- "cid": 1305451191,
311
- "dimension": {
312
- "width": 1920,
313
- "height": 1080,
314
- "rotate": 0
315
- },
316
- "premiere": null,
317
- "teenage_mode": 0,
318
- "is_chargeable_season": false,
319
- "is_story": false,
320
- "is_upower_exclusive": false,
321
- "is_upower_play": false,
322
- "enable_vt": 0,
323
- "vt_display": "",
324
- "no_cache": false,
325
- "pages": [
326
- {
327
- "cid": 1305451191,
328
- "page": 1,
329
- "from": "vupload",
330
- "part": "【MMD/白粥nina】帝国少女",
331
- "duration": 256,
332
- "vid": "",
333
- "weblink": "",
334
- "dimension": {
335
- "width": 1920,
336
- "height": 1080,
337
- "rotate": 0
338
- },
339
- "first_frame": "http://i1.hdslb.com/bfs/storyff/n231020sahwhfp3eq52kd2tokzchlwnx_firsti.jpg"
340
- }
341
- ],
342
- "subtitle": {
343
- "allow_submit": false,
344
- "list": []
345
- },
346
- "is_season_display": false,
347
- "user_garb": {
348
- "url_image_ani_cut": ""
349
- },
350
- "honor_reply": {},
351
- "like_icon": "",
352
- "need_jump_bv": false,
353
- "disable_show_up_info": false
354
- },
355
- "image_base64": "<BASE64 ENCODED JPEG IMAGE DATA>"
356
- }
357
- ```
358
-
359
- {{< table "table-responsive" >}}
360
-
361
- | Parameter Name | Type | Description |
362
- | -------------- | ------ | --------------------------------------------------------------------------- |
363
- | code | Number | The status code of the response. 0 indicates success. |
364
- | message | String | A message associated with the response code. |
365
- | ttl | Number | Time to live. It's a method to determine the lifespan or lifetime of data. |
366
- | data | Object | Contains the actual data of the response. |
367
- | image_base64|String|Base 64 Image of video thumbnail|
368
-
369
- {{< /table >}}
370
-
371
- data Object
372
-
373
- {{< table "table-responsive" >}}
374
-
375
- | Parameter Name | Type | Description |
376
- | -------------- | ------ | --------------------------------------------------------------------------- |
377
- | bvid | String | The ID of the video. |
378
- | aid | Number | The alternative ID of the video. |
379
- | videos | Number | The number of videos. |
380
- | tid | Number | The ID of the category the video belongs to. |
381
- | tname | String | The name of the category the video belongs to. |
382
- | copyright | Number | The copyright status of the video. |
383
- | pic | String | The URL of the video thumbnail. |
384
- | title | String | The title of the video. |
385
- | pubdate | Number | The publication date of the video in Unix timestamp. |
386
- | ctime | Number | The creation time of the video in Unix timestamp. |
387
- | desc | String | The description of the video. |
388
- | desc_v2 | Array | An array of objects containing the raw text of the description and its type.|
389
- | state | Number | The state of the video. |
390
- | attribute | Number | The attribute of the video. |
391
- | duration | Number | The duration of the video in seconds. |
392
- | rights | Object | An object containing information about the rights of the video. |
393
- | owner | Object | An object containing information about the owner of the video. |
394
- | stat | Object | An object containing statistical information about the video. |
395
- | dynamic | String | The dynamic of the video. |
396
- | dimension | Object | An object containing information about the video's dimensions. |
397
- | subtitle | Object | An object containing information about the video's subtitles. |
398
- | pages | Array | An array of objects containing information about each page of the video. |
399
- | staff | Array | An array of objects containing information about the staff involved. |
400
-
401
- {{< /table >}}
402
-
403
- desc_v2 array type
404
-
405
- {{< table "table-responsive" >}}
406
-
407
- | Parameter Name | Type | Description |
408
- | -------------- | ------ | --------------------------------------------------------------------------- |
409
- | raw_text | String | The raw text of the description. |
410
- | type | Number | The type of the description. |
411
- | biz_id | Number | The business ID associated with the description. |
412
-
413
- {{< /table >}}
414
-
415
- rights object
416
-
417
- {{< table "table-responsive" >}}
418
-
419
- | Parameter Name | Type | Description |
420
- | -------------- | ------ | --------------------------------------------------------------------------- |
421
- | bp | Number | Whether the video has bullet points. |
422
- | elec | Number | Whether the video has electronic points. |
423
- | download | Number | Whether the video can be downloaded. |
424
-
425
- {{< /table >}}
426
-
427
- owner object
428
-
429
- {{< table "table-responsive" >}}
430
-
431
- | Parameter Name | Type | Description |
432
- | -------------- | ------ | --------------------------------------------------------------------------- |
433
- | mid | Number | The ID of the owner. |
434
- | name | String | The name of the owner. |
435
- | face | String | The URL of the owner's profile picture URL. |
436
-
437
- {{< /table >}}
438
-
439
- stat object
440
-
441
- {{< table "table-responsive" >}}
442
-
443
- | Parameter Name | Type | Description |
444
- | -------------- | ------ | --------------------------------------------------------------------------- |
445
- | view | Number | The number of views the video has. |
446
- | danmaku | Number | The number of danmaku (comments) the video has. |
447
- | reply | Number | The number of replies the video has. |
448
- | favorite | Number | The number of times the video has been favorited. |
449
- | coin | Number | The number of coins given to the video. |
450
- | share | Number | The number of times the video has been shared. |
451
- | now_rank | Number | The current rank of the video. |
452
- | his_rank | Number | The historical highest rank of the video. |
453
- | like | Number | The number of likes the video has. |
454
- | dislike | Number | The number of dislikes the video has. |
455
-
456
- {{< /table >}}
457
-
458
- subtitle object
459
-
460
- {{< table "table-responsive" >}}
461
-
462
- | Parameter Name | Type | Description |
463
- | -------------- | ------ | --------------------------------------------------------------------------- |
464
- | allow_submit | Boolean| Whether submission of subtitles is allowed. |
465
- | list | Array | An array of objects containing information about each subtitle. |
466
-
467
- {{< /table >}}
468
-
469
- list on subtitle object
470
-
471
- {{< table "table-responsive" >}}
472
-
473
- | Parameter Name | Type | Description |
474
- | -------------- | ------ | --------------------------------------------------------------------------- |
475
- | id | Number | The ID of the subtitle. |
476
- | lan | String | The language of the subtitle. |
477
- | subtitle_url | String | The URL of the subtitle. |
478
-
479
- {{< /table >}}
480
-
481
- pages object
482
-
483
- {{< table "table-responsive" >}}
484
-
485
- | Parameter Name | Type | Description |
486
- | -------------- | ------ | --------------------------------------------------------------------------- |
487
- | cid | Number | The ID of the page. |
488
- | page | Number | The number of the page. |
489
- | from | String | The source of the page. |
490
- | part | String | The title of the page. |
491
- | duration | Number | The duration of the page in seconds. |
492
- | vid | String | The video ID of the page. |
493
- | weblink | String | The web link of the page. |
494
-
495
- {{< /table >}}
496
-
497
- staff object
498
-
499
- {{< table "table-responsive" >}}
500
-
501
- | Parameter Name | Type | Description |
502
- | -------------- | ------ | --------------------------------------------------------------------------- |
503
- | mid | Number | The ID of the staff member. |
504
- | title | String | The title of the staff member. |
505
- | name | String | The name of the staff member. |
506
- | face | String | The URL of the staff member's profile picture. |
507
- | official_verify| Object | An object containing information about the staff member's official status. |
508
-
509
- {{< /table >}}
510
-
511
- official_verify object
512
-
513
- {{< table "table-responsive" >}}
514
-
515
- | Parameter Name | Type | Description |
516
- | -------------- | ------ | --------------------------------------------------------------------------- |
517
- | type | Number | The type of the official verification. |
518
- | desc | String | The description of the official verification. |
519
-
520
- {{< /table >}}
521
-
522
- {{% /tab %}} {{% tab tabName="JSDOC" %}}
523
-
524
- ```JS
525
- /** @typedef {object} json
526
- * @property {number} code
527
- * @property {string} message
528
- * @property {number} ttl
529
- * @property {object} data
530
- * @property {string} data.bvid
531
- * @property {number} data.aid
532
- * @property {number} data.videos
533
- * @property {number} data.tid
534
- * @property {string} data.tname
535
- * @property {number} data.copyright
536
- * @property {string} data.pic
537
- * @property {string} data.title
538
- * @property {number} data.pubdate
539
- * @property {number} data.ctime
540
- * @property {string} data.desc
541
- * @property {object[]} data.desc_v2
542
- * @property {string} data.desc_v2.raw_text
543
- * @property {number} data.desc_v2.type
544
- * @property {number} data.desc_v2.biz_id
545
- * @property {number} data.state
546
- * @property {number} data.duration
547
- * @property {object} data.rights
548
- * @property {number} data.rights.bp
549
- * @property {number} data.rights.elec
550
- * @property {number} data.rights.download
551
- * @property {number} data.rights.movie
552
- * @property {number} data.rights.pay
553
- * @property {number} data.rights.hd5
554
- * @property {number} data.rights.no_reprint
555
- * @property {number} data.rights.autoplay
556
- * @property {number} data.rights.ugc_pay
557
- * @property {number} data.rights.is_cooperation
558
- * @property {number} data.rights.ugc_pay_preview
559
- * @property {number} data.rights.no_background
560
- * @property {number} data.rights.clean_mode
561
- * @property {number} data.rights.is_stein_gate
562
- * @property {number} data.rights.is_360
563
- * @property {number} data.rights.no_share
564
- * @property {number} data.rights.arc_pay
565
- * @property {number} data.rights.free_watch
566
- * @property {object} data.owner
567
- * @property {number} data.owner.mid
568
- * @property {string} data.owner.name
569
- * @property {string} data.owner.face
570
- * @property {object} data.stat
571
- * @property {number} data.stat.aid
572
- * @property {number} data.stat.view
573
- * @property {number} data.stat.danmaku
574
- * @property {number} data.stat.reply
575
- * @property {number} data.stat.favorite
576
- * @property {number} data.stat.coin
577
- * @property {number} data.stat.share
578
- * @property {number} data.stat.now_rank
579
- * @property {number} data.stat.his_rank
580
- * @property {number} data.stat.like
581
- * @property {number} data.stat.dislike
582
- * @property {string} data.stat.evaluation
583
- * @property {string} data.stat.argue_msg
584
- * @property {number} data.stat.vt
585
- * @property {string} data.dynamic
586
- * @property {number} data.cid
587
- * @property {object} data.dimension
588
- * @property {number} data.dimension.width
589
- * @property {number} data.dimension.height
590
- * @property {number} data.dimension.rotate
591
- * @property {null} data.premiere
592
- * @property {number} data.teenage_mode
593
- * @property {boolean} data.is_chargeable_season
594
- * @property {boolean} data.is_story
595
- * @property {boolean} data.is_upower_exclusive
596
- * @property {boolean} data.is_upower_play
597
- * @property {number} data.enable_vt
598
- * @property {string} data.vt_display
599
- * @property {boolean} data.no_cache
600
- * @property {object[]} data.pages
601
- * @property {number} data.pages.cid
602
- * @property {number} data.pages.page
603
- * @property {string} data.pages.from
604
- * @property {string} data.pages.part
605
- * @property {number} data.pages.duration
606
- * @property {string} data.pages.vid
607
- * @property {string} data.pages.weblink
608
- * @property {object} data.pages.dimension
609
- * @property {number} data.pages.dimension.width
610
- * @property {number} data.pages.dimension.height
611
- * @property {number} data.pages.dimension.rotate
612
- * @property {string} data.pages.first_frame
613
- * @property {object} data.subtitle
614
- * @property {boolean} data.subtitle.allow_submit
615
- * @property {} data.subtitle.list
616
- * @property {boolean} data.is_season_display
617
- * @property {object} data.user_garb
618
- * @property {string} data.user_garb.url_image_ani_cut
619
- * @property {string} data.like_icon
620
- * @property {boolean} data.need_jump_bv
621
- * @property {boolean} data.disable_show_up_info
622
- * @property {string} image_base64
623
- */
624
- ```
625
-
626
- {{% /tab %}} {{< /tabs >}}
627
-
628
- ### Failed request
629
-
630
- ```JSON
631
- {
632
- "code": -400,
633
- "message": "请求错误",
634
- "ttl": 1
635
- }
636
- ```
637
-
638
- ## Soundcloud API
639
-
640
- ### API endpoint
641
-
642
- ```URL
643
- GET ?route=soundcloud&videoid=${video id}
644
- ```
645
-
646
- ### Query parameter
647
-
648
- {{< table "table-responsive" >}}
649
-
650
- | Parameter Name | Required | Type | Description |
651
- | -------------- | -------- | ------ | ---------------------------------------------------------------------------- |
652
- | route | Yes | String | The route to the specific API endpoint. Must be **soundcloud** |
653
- | videoid | Yes | String | The ID of the video to retrieve details for. |
654
- | image_base64 | No | Number | If set to 1, the response will include a base64 encoded image. Default is 0. |
655
-
656
- {{< /table >}}
657
-
658
- <br>
659
-
660
- {{< alert context="info" text="This api depend on [soundcloud oembed api](https://developers.soundcloud.com/docs/oembed)" />}}
661
-
662
- ### Sucess Response
663
-
664
- {{< tabs tabTotal="2">}} {{% tab tabName="JSON" %}}
665
-
666
- ```URL
667
- GET ?route=soundcloud&videoid=tkrism/reflection-feat-nicamoq&image_base64=1
668
- ```
669
-
670
- ```JSON
671
- {
672
- "version": 1,
673
- "type": "rich",
674
- "provider_name": "SoundCloud",
675
- "provider_url": "https://soundcloud.com",
676
- "height": 400,
677
- "width": "100%",
678
- "title": "Reflection (feat. nicamoq) by Yunomi",
679
- "description": "",
680
- "thumbnail_url": "https://i1.sndcdn.com/artworks-ZUi7PGOqJ8zRLaP4-zxfjcA-t500x500.jpg",
681
- "html": "<iframe width=\"100%\" height=\"400\" scrolling=\"no\" frameborder=\"no\" src=\"https://w.soundcloud.com/player/?visual=true&url=https%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F1078906900&show_artwork=true\"></iframe>",
682
- "author_name": "Yunomi",
683
- "author_url": "https://soundcloud.com/tkrism",
684
- "image_base64": "<BASE64 ENCODED JPEG IMAGE DATA>",
685
- }
686
- ```
687
-
688
- {{< table "table-responsive" >}}
689
-
690
- | Parameter Name | Parameter Description |
691
- | -------------- | ------------------------------------------------------------------------- |
692
- | version | The version of the oEmbed protocol (must 1.0). |
693
- | type | The type of the response like rich. |
694
- | provider_name | The name of the oEmbed provider. |
695
- | provider_url | The URL of the oEmbed provider. |
696
- | height | The height in pixels required to display the HTML. |
697
- | width | The width in pixels required to display the HTML. |
698
- | title | The title of the SoundCloud track. |
699
- | description | The description of the SoundCloud track. |
700
- | thumbnail_url | The URL of the SoundCloud track thumbnail. |
701
- | html | The HTML required to embed a SoundCloud track. |
702
- | author_name | The name of the author of the SoundCloud track. |
703
- | author_url | The URL of the author's SoundCloud profile. |
704
- | image_base64 | The base64 image (only show image_base64 parameter to 1). |
705
-
706
- {{< /table >}}
707
-
708
- {{% /tab %}} {{% tab tabName="JSDOC" %}}
709
-
710
- ```JS
711
- /**
712
- * @typedef {Object} soundcloud_iframe_api
713
- * @property {number} version - The version of the oEmbed protocol (must 1.0).
714
- * @property {string} type - The type of the response like rich.
715
- * @property {string} provider_name - The name of the oEmbed provider.
716
- * @property {string} provider_url - The URL of the oEmbed provider.
717
- * @property {number} height - The height in pixels required to display the HTML.
718
- * @property {number} width - The width in pixels required to display the HTML.
719
- * @property {string} title - The title of the SoundCloud track.
720
- * @property {string} description - The description of the SoundCloud track.
721
- * @property {string} thumbnail_url - The URL of the SoundCloud track thumbnail.
722
- * @property {string} html - The HTML required to embed a SoundCloud track.
723
- * @property {string} author_name - The name of the author of the SoundCloud track.
724
- * @property {string} author_url - The URL of the author's SoundCloud profile.
725
- * @property {string} image_base64 - The base64 image (only show image_base64 parameter to 1).
726
- */
727
- ```
728
-
729
- {{% /tab %}} {{< /tabs >}}
730
-
731
- ### Failed response
732
-
733
- ```JSON
734
- {
735
- "status": "error not found?"
736
- }
737
- ```