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.
- 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 +215 -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 +1 -1
- 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
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
declare var SC: any;
|
|
2
|
+
/**
|
|
3
|
+
* @typedef {Object} mep_soundcloud_load_object
|
|
4
|
+
* @property {string} videoId - The ID of the video.
|
|
5
|
+
* @property {number} [startSeconds] - The start time of the video.
|
|
6
|
+
* @property {number} [endSeconds] - The end time of the video.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @typedef {Object} mep_soundcloud_playerVars
|
|
10
|
+
* @property {number} [autoplay] - Whether to autoplay the initial video.
|
|
11
|
+
* @property {number} [hide_related] - Hide related videos after the video ends.
|
|
12
|
+
* @property {number} [show_comments] - Show comments.
|
|
13
|
+
* @property {number} [show_user] - Show the user's name and profile picture.
|
|
14
|
+
* @property {number} [show_reposts] - Show reposts.
|
|
15
|
+
* @property {number} [visual] - Show the video title and other visual metadata.
|
|
16
|
+
* @property {number} [startSeconds] - The start time of the video.
|
|
17
|
+
* @property {number} [endSeconds] - The end time of the video.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* @typedef {Object} mep_soundcloud_content
|
|
21
|
+
* @property {string} videoId - The ID of the video.
|
|
22
|
+
* @property {mep_soundcloud_playerVars} [playerVars] - Player parameters.
|
|
23
|
+
* @property {number} width - The width of the video player.
|
|
24
|
+
* @property {number} height - The height of the video player.
|
|
25
|
+
*/
|
|
26
|
+
interface mep_soundcloud_load_object {
|
|
27
|
+
videoId: string;
|
|
28
|
+
startSeconds?: number;
|
|
29
|
+
endSeconds?: number;
|
|
30
|
+
}
|
|
31
|
+
interface mep_soundcloud_playerVars {
|
|
32
|
+
autoplay?: number | string;
|
|
33
|
+
hide_related?: number | string;
|
|
34
|
+
show_comments?: number | string;
|
|
35
|
+
show_user?: number | string;
|
|
36
|
+
show_reposts?: number | string;
|
|
37
|
+
visual?: number | string;
|
|
38
|
+
startSeconds?: number;
|
|
39
|
+
endSeconds?: number;
|
|
40
|
+
[key: string]: number | string | undefined;
|
|
41
|
+
}
|
|
42
|
+
interface mep_soundcloud_content {
|
|
43
|
+
videoId: string;
|
|
44
|
+
playerVars?: mep_soundcloud_playerVars;
|
|
45
|
+
width: number;
|
|
46
|
+
height: number;
|
|
47
|
+
}
|
|
48
|
+
interface TrackData {
|
|
49
|
+
currentPosition: number;
|
|
50
|
+
}
|
|
51
|
+
interface SoundMetadata {
|
|
52
|
+
title: string;
|
|
53
|
+
duration: number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Class representing a SoundCloud player.
|
|
57
|
+
*/
|
|
58
|
+
declare class mep_soundcloud {
|
|
59
|
+
#private;
|
|
60
|
+
player: HTMLIFrameElement;
|
|
61
|
+
playerVars: mep_soundcloud_playerVars | undefined;
|
|
62
|
+
player_statusdata: any;
|
|
63
|
+
autoplay: boolean;
|
|
64
|
+
player_widget: any;
|
|
65
|
+
player_metadata: any;
|
|
66
|
+
before_mute_volume: number;
|
|
67
|
+
forse_pause: boolean;
|
|
68
|
+
first_seek_time: number;
|
|
69
|
+
endSeconds: number;
|
|
70
|
+
pause_sended: boolean;
|
|
71
|
+
interval: number;
|
|
72
|
+
previous_player_status: number;
|
|
73
|
+
retry_count: number;
|
|
74
|
+
static soundcloud_api_loaded: boolean | null;
|
|
75
|
+
static soundcloud_api_promise: (() => void)[];
|
|
76
|
+
static numericRegex: RegExp;
|
|
77
|
+
constructor(replacing_element: string | HTMLElement, content: mep_soundcloud_content, player_set_event_function?: (player: HTMLIFrameElement) => void);
|
|
78
|
+
/**
|
|
79
|
+
* This function plays the video.
|
|
80
|
+
*/
|
|
81
|
+
playVideo(): void;
|
|
82
|
+
/**
|
|
83
|
+
* This function pauses the video.
|
|
84
|
+
*/
|
|
85
|
+
pauseVideo(): void;
|
|
86
|
+
/**
|
|
87
|
+
* This function return the current time of the video.
|
|
88
|
+
* @returns {number} current time of the video
|
|
89
|
+
*/
|
|
90
|
+
getCurrentTime(): number;
|
|
91
|
+
/**
|
|
92
|
+
* This function return the duration of the video.
|
|
93
|
+
* @returns {number} duration of the video
|
|
94
|
+
*/
|
|
95
|
+
getDuration(): number;
|
|
96
|
+
/**
|
|
97
|
+
* This function seeks to a specified time in the video.
|
|
98
|
+
* @param {number} skipSecounds - The time to which the player should advance.
|
|
99
|
+
*/
|
|
100
|
+
seekTo(skipSecounds: number): void;
|
|
101
|
+
/**
|
|
102
|
+
* This function sets the volume of the video player.
|
|
103
|
+
* @param {number} volume
|
|
104
|
+
*/
|
|
105
|
+
setVolume(volume: number): void;
|
|
106
|
+
/**
|
|
107
|
+
* This function mutes the video player.
|
|
108
|
+
*/
|
|
109
|
+
mute(): void;
|
|
110
|
+
/**
|
|
111
|
+
* This function unmutes the video player.
|
|
112
|
+
*/
|
|
113
|
+
unMute(): void;
|
|
114
|
+
/**
|
|
115
|
+
* This function checks whether the video player is muted.
|
|
116
|
+
* @returns {boolean} true if the video player is muted, and false if not.
|
|
117
|
+
*/
|
|
118
|
+
isMuted(): boolean;
|
|
119
|
+
/**
|
|
120
|
+
* This function returns the volume of the video player.
|
|
121
|
+
* @returns {number} volume of the video player
|
|
122
|
+
*/
|
|
123
|
+
getVolume(): any;
|
|
124
|
+
/**
|
|
125
|
+
* This function returns the status of the video player.
|
|
126
|
+
* @returns {number} status code
|
|
127
|
+
*/
|
|
128
|
+
getPlayerState(): any;
|
|
129
|
+
/**
|
|
130
|
+
* This function returns the title of the video.
|
|
131
|
+
* @returns {string} title of the video
|
|
132
|
+
*/
|
|
133
|
+
getTitle(): any;
|
|
134
|
+
/**
|
|
135
|
+
* return duration between start and end seconds
|
|
136
|
+
* @returns {number} dulation of between start and end
|
|
137
|
+
*/
|
|
138
|
+
getRealDulation(): number;
|
|
139
|
+
/**
|
|
140
|
+
* Load a new video into the player.With autoplay
|
|
141
|
+
* @param {mep_soundcloud_load_object} content
|
|
142
|
+
* @param {number} startSeconds
|
|
143
|
+
*/
|
|
144
|
+
loadVideoById(content: mep_soundcloud_load_object | string, startSeconds: number): void;
|
|
145
|
+
/**
|
|
146
|
+
* Load a new video into the player.Without autoplay
|
|
147
|
+
* @param {mep_soundcloud_load_object} content
|
|
148
|
+
* @param {number} startSeconds
|
|
149
|
+
*/
|
|
150
|
+
cueVideoById(content: mep_soundcloud_load_object | string, startSeconds: number): void;
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=soundcloud.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"soundcloud.d.ts","sourceRoot":"","sources":["../../iframe_api/soundcloud.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,IAAI,EAAE,EAAE,GAAG,CAAC;AAMpB;;;;;GAKG;AAEH;;;;;;;;;;GAUG;AAEH;;;;;;GAMG;AAGH,UAAU,0BAA0B;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,yBAAyB;IAC/B,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,CAAC,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W;IAGX;;;OAGG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM;IAQ3B;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM;IAIxB;;OAEG;IACH,IAAI;IAIJ;;OAEG;IACH,MAAM;IAGN;;;OAGG;IACH,OAAO;IAGP;;;OAGG;IACH,SAAS;IAGT;;;OAGG;IACH,cAAc;IAGd;;;OAGG;IACH,QAAQ;IAGR;;;OAGG;IACH,eAAe;IAiGf;;;;OAIG;IACH,aAAa,CAAC,OAAO,EAAE,0BAA0B,GAAG,MAAM,EAAE,YAAY,EAAE,MAAM;IAGhF;;;;OAIG;IACH,YAAY,CAAC,OAAO,EAAE,0BAA0B,GAAG,MAAM,EAAE,YAAY,EAAE,MAAM;CAGlF"}
|
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
+
};
|
|
7
|
+
var _mep_soundcloud_instances, _mep_soundcloud_load_soundcloud_api, _mep_soundcloud_load, _mep_soundcloud_ready_function, _mep_soundcloud_tracker, _mep_soundcloud_tracking_function, _mep_soundcloud_startTracking, _mep_soundcloud_stopTracking, _mep_soundcloud_musicLoader;
|
|
8
|
+
/**
|
|
9
|
+
* Class representing a SoundCloud player.
|
|
10
|
+
*/
|
|
11
|
+
class mep_soundcloud {
|
|
12
|
+
constructor(replacing_element, content, player_set_event_function) {
|
|
13
|
+
_mep_soundcloud_instances.add(this);
|
|
14
|
+
this.player = document.createElement("iframe");
|
|
15
|
+
this.autoplay = false;
|
|
16
|
+
this.before_mute_volume = 100;
|
|
17
|
+
this.forse_pause = false;
|
|
18
|
+
this.first_seek_time = -1;
|
|
19
|
+
this.endSeconds = -1;
|
|
20
|
+
this.pause_sended = false;
|
|
21
|
+
this.interval = 0;
|
|
22
|
+
this.previous_player_status = -1;
|
|
23
|
+
this.retry_count = 0;
|
|
24
|
+
__classPrivateFieldGet(this, _mep_soundcloud_instances, "m", _mep_soundcloud_load).call(this, replacing_element, content, player_set_event_function);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* This function plays the video.
|
|
28
|
+
*/
|
|
29
|
+
playVideo() {
|
|
30
|
+
__classPrivateFieldGet(this, _mep_soundcloud_instances, "m", _mep_soundcloud_startTracking).call(this);
|
|
31
|
+
if (this.first_seek_time !== -1) {
|
|
32
|
+
this.seekTo(this.first_seek_time);
|
|
33
|
+
this.first_seek_time = -1;
|
|
34
|
+
}
|
|
35
|
+
this.player_widget.play();
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* This function pauses the video.
|
|
39
|
+
*/
|
|
40
|
+
pauseVideo() {
|
|
41
|
+
__classPrivateFieldGet(this, _mep_soundcloud_instances, "m", _mep_soundcloud_stopTracking).call(this);
|
|
42
|
+
this.player_widget.pause();
|
|
43
|
+
this.forse_pause = true;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* This function return the current time of the video.
|
|
47
|
+
* @returns {number} current time of the video
|
|
48
|
+
*/
|
|
49
|
+
getCurrentTime() {
|
|
50
|
+
return this.player_statusdata.currentPosition / 1000;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* This function return the duration of the video.
|
|
54
|
+
* @returns {number} duration of the video
|
|
55
|
+
*/
|
|
56
|
+
getDuration() {
|
|
57
|
+
return this.player_metadata.duration / 1000;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* This function seeks to a specified time in the video.
|
|
61
|
+
* @param {number} skipSecounds - The time to which the player should advance.
|
|
62
|
+
*/
|
|
63
|
+
seekTo(skipSecounds) {
|
|
64
|
+
if (typeof skipSecounds === "number") {
|
|
65
|
+
this.player_widget.seekTo(skipSecounds * 1000);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
console.error("seekTo argument must be number");
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* This function sets the volume of the video player.
|
|
73
|
+
* @param {number} volume
|
|
74
|
+
*/
|
|
75
|
+
setVolume(volume) {
|
|
76
|
+
this.player_widget.setVolume(volume);
|
|
77
|
+
this.player_statusdata.volume = volume;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* This function mutes the video player.
|
|
81
|
+
*/
|
|
82
|
+
mute() {
|
|
83
|
+
this.before_mute_volume = this.player_statusdata.volume;
|
|
84
|
+
this.setVolume(0);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* This function unmutes the video player.
|
|
88
|
+
*/
|
|
89
|
+
unMute() {
|
|
90
|
+
this.setVolume(this.before_mute_volume);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* This function checks whether the video player is muted.
|
|
94
|
+
* @returns {boolean} true if the video player is muted, and false if not.
|
|
95
|
+
*/
|
|
96
|
+
isMuted() {
|
|
97
|
+
return this.player_statusdata.volume === 0;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* This function returns the volume of the video player.
|
|
101
|
+
* @returns {number} volume of the video player
|
|
102
|
+
*/
|
|
103
|
+
getVolume() {
|
|
104
|
+
return this.player_statusdata.volume;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* This function returns the status of the video player.
|
|
108
|
+
* @returns {number} status code
|
|
109
|
+
*/
|
|
110
|
+
getPlayerState() {
|
|
111
|
+
return this.player_statusdata.playing_status;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* This function returns the title of the video.
|
|
115
|
+
* @returns {string} title of the video
|
|
116
|
+
*/
|
|
117
|
+
getTitle() {
|
|
118
|
+
return this.player_metadata.title;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* return duration between start and end seconds
|
|
122
|
+
* @returns {number} dulation of between start and end
|
|
123
|
+
*/
|
|
124
|
+
getRealDulation() {
|
|
125
|
+
if (this.endSeconds == -1) {
|
|
126
|
+
return this.getDuration() - this.first_seek_time;
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
return this.endSeconds - this.first_seek_time;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Load a new video into the player.With autoplay
|
|
134
|
+
* @param {mep_soundcloud_load_object} content
|
|
135
|
+
* @param {number} startSeconds
|
|
136
|
+
*/
|
|
137
|
+
loadVideoById(content, startSeconds) {
|
|
138
|
+
__classPrivateFieldGet(this, _mep_soundcloud_instances, "m", _mep_soundcloud_musicLoader).call(this, content, startSeconds, true);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Load a new video into the player.Without autoplay
|
|
142
|
+
* @param {mep_soundcloud_load_object} content
|
|
143
|
+
* @param {number} startSeconds
|
|
144
|
+
*/
|
|
145
|
+
cueVideoById(content, startSeconds) {
|
|
146
|
+
__classPrivateFieldGet(this, _mep_soundcloud_instances, "m", _mep_soundcloud_musicLoader).call(this, content, startSeconds, false);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
_mep_soundcloud_instances = new WeakSet(), _mep_soundcloud_load_soundcloud_api = async function _mep_soundcloud_load_soundcloud_api() {
|
|
150
|
+
if (window.mep_soundcloud.soundcloud_api_loaded === null) {
|
|
151
|
+
if (typeof SC !== "object") {
|
|
152
|
+
window.mep_soundcloud.soundcloud_api_loaded = false;
|
|
153
|
+
const script_document = document.createElement("script");
|
|
154
|
+
script_document.src = "https://w.soundcloud.com/player/api.js";
|
|
155
|
+
script_document.addEventListener("load", () => { window.mep_soundcloud.soundcloud_api_loaded = true; window.mep_soundcloud.soundcloud_api_promise.forEach((func) => func()); });
|
|
156
|
+
script_document.addEventListener("error", () => { this.player.dispatchEvent(new CustomEvent("onError", { detail: { code: 1001 } })); });
|
|
157
|
+
document.body.appendChild(script_document);
|
|
158
|
+
await new Promise((resolve, reject) => window.mep_soundcloud.soundcloud_api_promise.push(resolve));
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
window.mep_soundcloud.soundcloud_api_loaded = true;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
else if (window.mep_soundcloud.soundcloud_api_loaded === false) {
|
|
165
|
+
await new Promise((resolve, reject) => window.mep_soundcloud.soundcloud_api_promise.push(resolve));
|
|
166
|
+
}
|
|
167
|
+
}, _mep_soundcloud_load = async function _mep_soundcloud_load(replacing_element, content, player_set_event_function) {
|
|
168
|
+
this.player.style.border = "none";
|
|
169
|
+
this.player.allow = "autoplay";
|
|
170
|
+
if (typeof player_set_event_function === "function") {
|
|
171
|
+
player_set_event_function(this.player);
|
|
172
|
+
}
|
|
173
|
+
await __classPrivateFieldGet(this, _mep_soundcloud_instances, "m", _mep_soundcloud_load_soundcloud_api).call(this);
|
|
174
|
+
let iframe_replace_node = null;
|
|
175
|
+
if (typeof replacing_element === "string") {
|
|
176
|
+
iframe_replace_node = document.getElementById(replacing_element);
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
iframe_replace_node = replacing_element;
|
|
180
|
+
}
|
|
181
|
+
let url_params = new URLSearchParams();
|
|
182
|
+
let tflist = ["autoplay", "hide_related", "show_comments", "show_user", "show_user", "show_reposts", "visual"];
|
|
183
|
+
this.playerVars = content.playerVars;
|
|
184
|
+
this.player_statusdata = { playing_status: 1, currentPosition: 0, volume: 100 };
|
|
185
|
+
if (typeof content.playerVars === "object" && content.playerVars !== null) {
|
|
186
|
+
tflist.forEach(option => {
|
|
187
|
+
if (content.playerVars && typeof content.playerVars[option] === "number") {
|
|
188
|
+
content.playerVars[option] = content.playerVars[option].toString();
|
|
189
|
+
}
|
|
190
|
+
if (!content.playerVars || typeof content.playerVars[option] === "undefined") {
|
|
191
|
+
url_params.set(option, "true");
|
|
192
|
+
}
|
|
193
|
+
else if (content.playerVars[option] === "1" || content.playerVars[option] === "true") {
|
|
194
|
+
url_params.set(option, "true");
|
|
195
|
+
}
|
|
196
|
+
else if (content.playerVars[option] === "0" || content.playerVars[option] === "false") {
|
|
197
|
+
url_params.set(option, "false");
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
url_params.set(option, content.playerVars[option]);
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
if (content.playerVars && (content.playerVars.autoplay == "true" || content.playerVars.autoplay == 1)) {
|
|
204
|
+
this.autoplay = true;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
tflist.forEach(option => { url_params.set(option, "false"); });
|
|
209
|
+
}
|
|
210
|
+
if (window.mep_soundcloud.numericRegex.test(content.videoId)) {
|
|
211
|
+
this.player.src = `https://w.soundcloud.com/player/?url=https://api.soundcloud.com/tracks/${content.videoId}&${url_params.toString()}`;
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
this.player.src = `https://w.soundcloud.com/player/?url=https://soundcloud.com/${content.videoId}&${url_params.toString()}`;
|
|
215
|
+
}
|
|
216
|
+
if (iframe_replace_node) {
|
|
217
|
+
iframe_replace_node.replaceWith(this.player);
|
|
218
|
+
}
|
|
219
|
+
this.player_widget = SC.Widget(this.player);
|
|
220
|
+
this.player_metadata = {}; //renew when load new ones
|
|
221
|
+
this.forse_pause = !this.autoplay;
|
|
222
|
+
this.player_widget.bind(SC.Widget.Events.READY, () => { __classPrivateFieldGet(this, _mep_soundcloud_instances, "m", _mep_soundcloud_ready_function).call(this); });
|
|
223
|
+
this.player_widget.bind(SC.Widget.Events.PLAY_PROGRESS, (data) => { __classPrivateFieldGet(this, _mep_soundcloud_instances, "m", _mep_soundcloud_tracker).call(this, data); __classPrivateFieldGet(this, _mep_soundcloud_instances, "m", _mep_soundcloud_tracking_function).call(this); });
|
|
224
|
+
this.player_widget.bind(SC.Widget.Events.PLAY, () => { if (this.first_seek_time !== -1) {
|
|
225
|
+
this.seekTo(this.first_seek_time);
|
|
226
|
+
this.first_seek_time = -1;
|
|
227
|
+
} ; this.player_statusdata.playing_status = 2; });
|
|
228
|
+
this.player_widget.bind(SC.Widget.Events.PAUSE, () => { this.player_statusdata.playing_status = 3; this.pause_sended = false; this.forse_pause = true; });
|
|
229
|
+
//this.player_widget.bind(SC.Widget.Events.SEEK,()=>this.player_statusdata.playing_status = 3);
|
|
230
|
+
this.player_widget.bind(SC.Widget.Events.FINISH, () => { this.player.dispatchEvent(new Event("onEndVideo")); this.player_statusdata.playing_status = 4; });
|
|
231
|
+
this.player_widget.bind(SC.Widget.Events.ERROR, () => this.player.dispatchEvent(new Event("onError")));
|
|
232
|
+
if (this.autoplay) {
|
|
233
|
+
__classPrivateFieldGet(this, _mep_soundcloud_instances, "m", _mep_soundcloud_startTracking).call(this);
|
|
234
|
+
}
|
|
235
|
+
this.first_seek_time = (content.playerVars && typeof content.playerVars.startSeconds === "number") ? content.playerVars.startSeconds : -1;
|
|
236
|
+
this.endSeconds = (content.playerVars && typeof content.playerVars.endSeconds === "number") ? content.playerVars.endSeconds : -1;
|
|
237
|
+
}, _mep_soundcloud_ready_function = function _mep_soundcloud_ready_function(retry = false) {
|
|
238
|
+
this.player.dispatchEvent(new Event("onReady"));
|
|
239
|
+
this.player_widget.getCurrentSound((data) => { if (data === null) {
|
|
240
|
+
this.player.dispatchEvent(new Event("onError"));
|
|
241
|
+
} ; this.player_metadata = data; });
|
|
242
|
+
if (this.autoplay && !this.forse_pause) {
|
|
243
|
+
this.playVideo();
|
|
244
|
+
if (retry && this.retry_count < 7) {
|
|
245
|
+
this.retry_count++;
|
|
246
|
+
setTimeout(() => { __classPrivateFieldGet(this, _mep_soundcloud_instances, "m", _mep_soundcloud_ready_function).call(this, true); }, 1000);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}, _mep_soundcloud_tracker = function _mep_soundcloud_tracker(trackData) {
|
|
250
|
+
this.player_statusdata.currentPosition = trackData.currentPosition;
|
|
251
|
+
}, _mep_soundcloud_tracking_function = function _mep_soundcloud_tracking_function() {
|
|
252
|
+
//this.player_widget.getVolume((volume)=>{this.player_statusdata.volume = volume});
|
|
253
|
+
//this.player_widget.isPaused((pause_status)=>{pause_status?this.player_statusdata.playing_status = 3:this.player_statusdata.playing_status = 2});
|
|
254
|
+
if (this.previous_player_status !== this.player_statusdata.playing_status) {
|
|
255
|
+
this.previous_player_status = this.player_statusdata.playing_status;
|
|
256
|
+
this.player.dispatchEvent(new CustomEvent("onStateChange", { detail: this.getPlayerState() }));
|
|
257
|
+
}
|
|
258
|
+
if (this.endSeconds != -1 && this.endSeconds <= this.getCurrentTime()) {
|
|
259
|
+
if (!this.pause_sended) {
|
|
260
|
+
this.pause_sended = true;
|
|
261
|
+
this.pauseVideo();
|
|
262
|
+
this.player.dispatchEvent(new Event("onEndVideo"));
|
|
263
|
+
this.player_statusdata.playing_status = 4;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}, _mep_soundcloud_startTracking = function _mep_soundcloud_startTracking() {
|
|
267
|
+
if (this.interval === 0) {
|
|
268
|
+
//this.interval = setInterval(()=>{this.tracking_function()},1000);
|
|
269
|
+
}
|
|
270
|
+
}, _mep_soundcloud_stopTracking = function _mep_soundcloud_stopTracking() {
|
|
271
|
+
clearInterval(this.interval);
|
|
272
|
+
this.interval = 0;
|
|
273
|
+
__classPrivateFieldGet(this, _mep_soundcloud_instances, "m", _mep_soundcloud_tracking_function).call(this);
|
|
274
|
+
}, _mep_soundcloud_musicLoader = function _mep_soundcloud_musicLoader(content, startSeconds, autoplay) {
|
|
275
|
+
/*
|
|
276
|
+
let options = {playerVars:this.playerVars};
|
|
277
|
+
if(options.playerVars === undefined){
|
|
278
|
+
options.playerVars = {};
|
|
279
|
+
}
|
|
280
|
+
options.playerVars["autoplay"] = autoplay;
|
|
281
|
+
if(typeof content === "string"){
|
|
282
|
+
options["videoId"] = content;
|
|
283
|
+
}
|
|
284
|
+
else if (typeof content === "object"){
|
|
285
|
+
options["videoId"] = content["videoId"];
|
|
286
|
+
if(typeof startSeconds === "number"){
|
|
287
|
+
options["start"] = startSeconds;
|
|
288
|
+
}
|
|
289
|
+
else if(typeof content["startSeconds"] === "number"){
|
|
290
|
+
options["start"] = content["startSeconds"];
|
|
291
|
+
}
|
|
292
|
+
if(typeof content["endSeconds"] === "number"){
|
|
293
|
+
options["end"] = content["endSeconds"];
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
const tmp_replace_element = document.createElement("div");
|
|
297
|
+
tmp_replace_element.replaceWith(this.player);
|
|
298
|
+
this.load(tmp_replace_element,options);
|
|
299
|
+
*/
|
|
300
|
+
let url_params = { set(op, val) { this[op] = val; } };
|
|
301
|
+
let tflist = ["hide_related", "show_comments", "show_user", "show_user", "show_reposts", "visual"];
|
|
302
|
+
if (this.playerVars && typeof this.playerVars === "object") {
|
|
303
|
+
tflist.forEach(option => {
|
|
304
|
+
if (this.playerVars && typeof this.playerVars[option] === "string" && this.playerVars[option] === "true") {
|
|
305
|
+
url_params.set(option, "true");
|
|
306
|
+
}
|
|
307
|
+
else {
|
|
308
|
+
url_params.set(option, "false");
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
tflist.forEach(option => { url_params.set(option, "false"); });
|
|
314
|
+
}
|
|
315
|
+
url_params.set("autoplay", autoplay ? "true" : "false");
|
|
316
|
+
this.autoplay = autoplay;
|
|
317
|
+
let musicId = "";
|
|
318
|
+
if (typeof content === "object") {
|
|
319
|
+
musicId = content.videoId;
|
|
320
|
+
if (typeof content.startSeconds == "number" && !Number.isNaN(content.startSeconds)) {
|
|
321
|
+
this.first_seek_time = content.startSeconds;
|
|
322
|
+
}
|
|
323
|
+
else {
|
|
324
|
+
this.first_seek_time = -1;
|
|
325
|
+
}
|
|
326
|
+
if (typeof content.endSeconds == "number" && !Number.isNaN(content.endSeconds)) {
|
|
327
|
+
this.endSeconds = content.endSeconds;
|
|
328
|
+
}
|
|
329
|
+
else {
|
|
330
|
+
this.endSeconds = -1;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
else if (typeof content === "string") {
|
|
334
|
+
musicId = content;
|
|
335
|
+
if (typeof startSeconds === "number" && !Number.isNaN(startSeconds)) {
|
|
336
|
+
this.first_seek_time = startSeconds;
|
|
337
|
+
}
|
|
338
|
+
else {
|
|
339
|
+
this.first_seek_time = -1;
|
|
340
|
+
}
|
|
341
|
+
this.endSeconds = -1;
|
|
342
|
+
}
|
|
343
|
+
else {
|
|
344
|
+
this.player.dispatchEvent(new CustomEvent("onError", { detail: { code: 401 } }));
|
|
345
|
+
}
|
|
346
|
+
if (window.mep_soundcloud.numericRegex.test(musicId)) {
|
|
347
|
+
this.player_widget.load(`https://api.soundcloud.com/tracks/${String(musicId)}`, url_params, __classPrivateFieldGet(this, _mep_soundcloud_instances, "m", _mep_soundcloud_ready_function));
|
|
348
|
+
}
|
|
349
|
+
else {
|
|
350
|
+
this.player_widget.load(`https://soundcloud.com/${String(musicId)}`, url_params, __classPrivateFieldGet(this, _mep_soundcloud_instances, "m", _mep_soundcloud_ready_function));
|
|
351
|
+
}
|
|
352
|
+
this.retry_count = 0;
|
|
353
|
+
this.forse_pause = false;
|
|
354
|
+
__classPrivateFieldGet(this, _mep_soundcloud_instances, "m", _mep_soundcloud_ready_function).call(this, true);
|
|
355
|
+
};
|
|
356
|
+
mep_soundcloud.soundcloud_api_loaded = null;
|
|
357
|
+
mep_soundcloud.soundcloud_api_promise = [];
|
|
358
|
+
mep_soundcloud.numericRegex = /^[0-9]+$/;
|
|
359
|
+
window.mep_soundcloud = mep_soundcloud;
|
|
360
|
+
//# sourceMappingURL=soundcloud.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"soundcloud.js","sourceRoot":"","sources":["../../iframe_api/soundcloud.ts"],"names":[],"mappings":";;;;;;;AAoEA;;GAEG;AACH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CAAC,IAAI,CAAC,qCAAqC,MAAM,CAAC,OAAO,CAAC,EAAE,EAAC,UAAU,EAAC,uBAAA,IAAI,iEAAgB,CAAC,CAAC;IACpH,CAAC;SACG,CAAC;QACD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,0BAA0B,MAAM,CAAC,OAAO,CAAC,EAAE,EAAC,UAAU,EAAC,uBAAA,IAAI,iEAAgB,CAAC,CAAC;IACzG,CAAC;IACD,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;IACrB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IACzB,uBAAA,IAAI,iEAAgB,MAApB,IAAI,EAAiB,IAAI,CAAC,CAAC;AAC/B,CAAC;AAxVM,oCAAqB,GAAmB,IAAI,AAAvB,CAAwB;AAC7C,qCAAsB,GAAmB,EAAE,AAArB,CAAsB;AAC5C,2BAAY,GAAG,UAAU,AAAb,CAAc;AAwWpC,MAAc,CAAC,cAAc,GAAG,cAAc,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
declare var YT: any;
|
|
2
|
+
interface MepYoutubeLoadObject {
|
|
3
|
+
videoId: string;
|
|
4
|
+
startSeconds?: number;
|
|
5
|
+
endSeconds?: number;
|
|
6
|
+
}
|
|
7
|
+
interface MepYoutubePlayerVars {
|
|
8
|
+
autoplay?: number;
|
|
9
|
+
startSeconds?: number;
|
|
10
|
+
endSeconds?: number;
|
|
11
|
+
}
|
|
12
|
+
interface MepYoutubeContent {
|
|
13
|
+
videoId: string;
|
|
14
|
+
playerVars?: MepYoutubePlayerVars;
|
|
15
|
+
width?: number;
|
|
16
|
+
height?: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Class representing a YouTube player.
|
|
20
|
+
*/
|
|
21
|
+
declare class mep_youtube {
|
|
22
|
+
#private;
|
|
23
|
+
static youtube_api_loaded: number;
|
|
24
|
+
static youtube_api_promise: (() => void)[];
|
|
25
|
+
player: HTMLElement;
|
|
26
|
+
autoplay: number;
|
|
27
|
+
startSeconds: number;
|
|
28
|
+
endSeconds: number;
|
|
29
|
+
el: HTMLElement;
|
|
30
|
+
YT_player: any;
|
|
31
|
+
/**
|
|
32
|
+
* Create a new YouTube player instance.
|
|
33
|
+
*/
|
|
34
|
+
constructor(replacing_element: string | HTMLElement, content: MepYoutubeContent, player_set_event_function?: (player: HTMLElement) => void);
|
|
35
|
+
/**
|
|
36
|
+
* Play the video.
|
|
37
|
+
*/
|
|
38
|
+
playVideo(): void;
|
|
39
|
+
/**
|
|
40
|
+
* Pause the video.
|
|
41
|
+
*/
|
|
42
|
+
pauseVideo(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Get the current time of the video.
|
|
45
|
+
*/
|
|
46
|
+
getCurrentTime(): number;
|
|
47
|
+
/**
|
|
48
|
+
* Get the duration of the video.
|
|
49
|
+
*/
|
|
50
|
+
getDuration(): number;
|
|
51
|
+
/**
|
|
52
|
+
* Get the actual duration between the start and end times.
|
|
53
|
+
*/
|
|
54
|
+
getRealDulation(): number;
|
|
55
|
+
/**
|
|
56
|
+
* Seek to a specific time in the video.
|
|
57
|
+
*/
|
|
58
|
+
seekTo(time: number): void;
|
|
59
|
+
/**
|
|
60
|
+
* Set the volume of the player.
|
|
61
|
+
*/
|
|
62
|
+
setVolume(volume: number): void;
|
|
63
|
+
/**
|
|
64
|
+
* Mute the player.
|
|
65
|
+
*/
|
|
66
|
+
mute(): void;
|
|
67
|
+
/**
|
|
68
|
+
* Unmute the player.
|
|
69
|
+
*/
|
|
70
|
+
unMute(): void;
|
|
71
|
+
/**
|
|
72
|
+
* Check if the player is muted.
|
|
73
|
+
*/
|
|
74
|
+
isMuted(): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Get the current volume of the player.
|
|
77
|
+
*/
|
|
78
|
+
getVolume(): number;
|
|
79
|
+
/**
|
|
80
|
+
* Get the current state of the player.
|
|
81
|
+
*/
|
|
82
|
+
getPlayerState(): number;
|
|
83
|
+
/**
|
|
84
|
+
* Get the title of the currently loaded video.
|
|
85
|
+
*/
|
|
86
|
+
getTitle(): string;
|
|
87
|
+
/**
|
|
88
|
+
* Load a new video by ID.
|
|
89
|
+
*/
|
|
90
|
+
loadVideoById(content: MepYoutubeLoadObject | string, startSeconds?: number): void;
|
|
91
|
+
/**
|
|
92
|
+
* Cue a new video by ID.
|
|
93
|
+
*/
|
|
94
|
+
cueVideoById(content: MepYoutubeLoadObject | string, startSeconds?: number): void;
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=youtube.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"youtube.d.ts","sourceRoot":"","sources":["../../iframe_api/youtube.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,IAAI,EAAE,EAAE,GAAG,CAAC;AAMpB,UAAU,oBAAoB;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,oBAAoB;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,iBAAiB;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,cAAM,WAAW;;IACb,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAK;IACtC,MAAM,CAAC,mBAAmB,EAAE,CAAC,MAAM,IAAI,CAAC,EAAE,CAAM;IAEhD,MAAM,EAAE,WAAW,CAAiC;IACpD,QAAQ,EAAE,MAAM,CAAK;IACrB,YAAY,EAAE,MAAM,CAAK;IACzB,UAAU,EAAE,MAAM,CAAM;IACxB,EAAE,EAAE,WAAW,CAAiC;IAChD,SAAS,EAAE,GA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