multi_embed_player 3.0.1 → 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/CLAUDE.md +92 -0
- package/README.md +0 -24
- package/add_types.sh +61 -0
- package/dist/iframe_api/bilibili.d.ts +180 -61
- package/dist/iframe_api/bilibili.d.ts.map +1 -1
- package/dist/iframe_api/bilibili.js +938 -354
- package/dist/iframe_api/bilibili.js.map +1 -1
- package/dist/iframe_api/niconico.d.ts +177 -28
- package/dist/iframe_api/niconico.d.ts.map +1 -1
- package/dist/iframe_api/niconico.js +290 -146
- package/dist/iframe_api/niconico.js.map +1 -1
- package/dist/iframe_api/soundcloud.d.ts +132 -60
- package/dist/iframe_api/soundcloud.d.ts.map +1 -1
- package/dist/iframe_api/soundcloud.js +318 -146
- package/dist/iframe_api/soundcloud.js.map +1 -1
- package/dist/iframe_api/youtube.d.ts +32 -69
- package/dist/iframe_api/youtube.d.ts.map +1 -1
- package/dist/iframe_api/youtube.js +130 -139
- package/dist/iframe_api/youtube.js.map +1 -1
- package/dist/multi_embed_player.d.ts +193 -26
- package/dist/multi_embed_player.d.ts.map +1 -1
- package/dist/multi_embed_player.js +726 -123
- package/dist/multi_embed_player.js.map +1 -1
- package/package.json +10 -41
- package/dist/iframe_api/index.d.ts +0 -6
- package/dist/iframe_api/index.d.ts.map +0 -1
- package/dist/iframe_api/index.js +0 -8
- package/dist/iframe_api/index.js.map +0 -1
- package/dist/types.d.ts +0 -126
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -22
- package/dist/types.js.map +0 -1
|
@@ -1,80 +1,152 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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;
|
|
21
41
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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;
|
|
30
54
|
}
|
|
31
55
|
/**
|
|
32
56
|
* Class representing a SoundCloud player.
|
|
33
57
|
*/
|
|
34
|
-
|
|
35
|
-
private
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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);
|
|
48
78
|
/**
|
|
49
|
-
*
|
|
79
|
+
* This function plays the video.
|
|
50
80
|
*/
|
|
51
|
-
private load_soundcloud_api;
|
|
52
|
-
constructor(replacing_element: string | HTMLElement, content: SoundCloudContent, player_set_event_function?: EventHandler);
|
|
53
|
-
private load;
|
|
54
|
-
private setup_event_listeners;
|
|
55
81
|
playVideo(): void;
|
|
82
|
+
/**
|
|
83
|
+
* This function pauses the video.
|
|
84
|
+
*/
|
|
56
85
|
pauseVideo(): void;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
+
*/
|
|
60
105
|
setVolume(volume: number): void;
|
|
61
|
-
|
|
106
|
+
/**
|
|
107
|
+
* This function mutes the video player.
|
|
108
|
+
*/
|
|
62
109
|
mute(): void;
|
|
110
|
+
/**
|
|
111
|
+
* This function unmutes the video player.
|
|
112
|
+
*/
|
|
63
113
|
unMute(): void;
|
|
64
|
-
isMuted(): Promise<boolean>;
|
|
65
|
-
getPlayerState(): Promise<PlayerState>;
|
|
66
114
|
/**
|
|
67
|
-
*
|
|
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
|
|
68
137
|
*/
|
|
69
|
-
getRealDulation():
|
|
138
|
+
getRealDulation(): number;
|
|
70
139
|
/**
|
|
71
|
-
* Load
|
|
140
|
+
* Load a new video into the player.With autoplay
|
|
141
|
+
* @param {mep_soundcloud_load_object} content
|
|
142
|
+
* @param {number} startSeconds
|
|
72
143
|
*/
|
|
73
|
-
loadVideoById(content:
|
|
144
|
+
loadVideoById(content: mep_soundcloud_load_object | string, startSeconds: number): void;
|
|
74
145
|
/**
|
|
75
|
-
*
|
|
146
|
+
* Load a new video into the player.Without autoplay
|
|
147
|
+
* @param {mep_soundcloud_load_object} content
|
|
148
|
+
* @param {number} startSeconds
|
|
76
149
|
*/
|
|
77
|
-
cueVideoById(content:
|
|
150
|
+
cueVideoById(content: mep_soundcloud_load_object | string, startSeconds: number): void;
|
|
78
151
|
}
|
|
79
|
-
export {};
|
|
80
152
|
//# sourceMappingURL=soundcloud.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"soundcloud.d.ts","sourceRoot":"","sources":["../../iframe_api/soundcloud.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
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,CA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