webamp 0.0.0-next-9b03dcd → 0.0.0-next-e82db4c
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/package.json +3 -2
- package/built/dist/demo-site/declarations/demo/js/DemoDesktop.d.ts +0 -8
- package/built/dist/demo-site/declarations/demo/js/DesktopIcon.d.ts +0 -8
- package/built/dist/demo-site/declarations/demo/js/DesktopLinkIcon.d.ts +0 -7
- package/built/dist/demo-site/declarations/demo/js/IconImage.d.ts +0 -5
- package/built/dist/demo-site/declarations/demo/js/MilkIcon.d.ts +0 -10
- package/built/dist/demo-site/declarations/demo/js/Mp3Icon.d.ts +0 -8
- package/built/dist/demo-site/declarations/demo/js/SkinIcon.d.ts +0 -10
- package/built/dist/demo-site/declarations/demo/js/SoundCloud.d.ts +0 -26
- package/built/dist/demo-site/declarations/demo/js/SuspenseImage.d.ts +0 -2
- package/built/dist/demo-site/declarations/demo/js/WebampIcon.d.ts +0 -6
- package/built/dist/demo-site/declarations/demo/js/availableSkins.d.ts +0 -5
- package/built/dist/demo-site/declarations/demo/js/butterchurnOptions.d.ts +0 -2
- package/built/dist/demo-site/declarations/demo/js/choreography.d.ts +0 -2
- package/built/dist/demo-site/declarations/demo/js/config.d.ts +0 -7
- package/built/dist/demo-site/declarations/demo/js/dropboxFilePicker.d.ts +0 -3
- package/built/dist/demo-site/declarations/demo/js/eventLogger.d.ts +0 -2
- package/built/dist/demo-site/declarations/demo/js/index.d.ts +0 -6
- package/built/dist/demo-site/declarations/demo/js/logger.d.ts +0 -7
- package/built/dist/demo-site/declarations/demo/js/screenshotInitialState.d.ts +0 -3
- package/built/dist/demo-site/declarations/demo/js/webampConfig.d.ts +0 -4
- package/built/dist/demo-site/declarations/js/Disposable.d.ts +0 -11
- package/built/dist/demo-site/declarations/js/actionCreators/equalizer.d.ts +0 -8
- package/built/dist/demo-site/declarations/js/actionCreators/files.d.ts +0 -23
- package/built/dist/demo-site/declarations/js/actionCreators/index.d.ts +0 -22
- package/built/dist/demo-site/declarations/js/actionCreators/media.d.ts +0 -19
- package/built/dist/demo-site/declarations/js/actionCreators/milkdrop.d.ts +0 -12
- package/built/dist/demo-site/declarations/js/actionCreators/playlist.d.ts +0 -16
- package/built/dist/demo-site/declarations/js/actionCreators/windows.d.ts +0 -29
- package/built/dist/demo-site/declarations/js/components/App.d.ts +0 -13
- package/built/dist/demo-site/declarations/js/components/Balance.d.ts +0 -8
- package/built/dist/demo-site/declarations/js/components/Character.d.ts +0 -8
- package/built/dist/demo-site/declarations/js/components/CharacterString.d.ts +0 -5
- package/built/dist/demo-site/declarations/js/components/ClickedDiv.d.ts +0 -6
- package/built/dist/demo-site/declarations/js/components/ClipPaths.d.ts +0 -7
- package/built/dist/demo-site/declarations/js/components/ContextMenu.d.ts +0 -30
- package/built/dist/demo-site/declarations/js/components/ContextMenuTarget.d.ts +0 -7
- package/built/dist/demo-site/declarations/js/components/ContextMenuWrapper.d.ts +0 -7
- package/built/dist/demo-site/declarations/js/components/Css.d.ts +0 -6
- package/built/dist/demo-site/declarations/js/components/DropTarget.d.ts +0 -12
- package/built/dist/demo-site/declarations/js/components/EqualizerWindow/Band.d.ts +0 -14
- package/built/dist/demo-site/declarations/js/components/EqualizerWindow/EqAuto.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/EqualizerWindow/EqGraph.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/EqualizerWindow/EqOn.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/EqualizerWindow/EqTitleButtons.d.ts +0 -1
- package/built/dist/demo-site/declarations/js/components/EqualizerWindow/EqualizerShade.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/EqualizerWindow/PresetsContextMenu.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/EqualizerWindow/index.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/EqualizerWindow/spline.d.ts +0 -1
- package/built/dist/demo-site/declarations/js/components/FFTNullsoft.d.ts +0 -16
- package/built/dist/demo-site/declarations/js/components/FocusTarget.d.ts +0 -8
- package/built/dist/demo-site/declarations/js/components/Fullscreen.d.ts +0 -8
- package/built/dist/demo-site/declarations/js/components/GenWindow/index.d.ts +0 -14
- package/built/dist/demo-site/declarations/js/components/MainWindow/ActionButtons.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/MainWindow/Close.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/MainWindow/ClutterBar.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/MainWindow/Eject.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/MainWindow/EqToggleButton.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/MainWindow/Kbps.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/MainWindow/Khz.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/MainWindow/MainBalance.d.ts +0 -3
- package/built/dist/demo-site/declarations/js/components/MainWindow/MainContextMenu.d.ts +0 -6
- package/built/dist/demo-site/declarations/js/components/MainWindow/MainVolume.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/MainWindow/Marquee.d.ts +0 -7
- package/built/dist/demo-site/declarations/js/components/MainWindow/Minimize.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/MainWindow/MonoStereo.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/MainWindow/PlaylistToggleButton.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/MainWindow/Position.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/MainWindow/Repeat.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/MainWindow/Shade.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/MainWindow/Shuffle.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/MainWindow/Time.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/MainWindow/index.d.ts +0 -8
- package/built/dist/demo-site/declarations/js/components/MilkdropWindow/Background.d.ts +0 -7
- package/built/dist/demo-site/declarations/js/components/MilkdropWindow/Desktop.d.ts +0 -7
- package/built/dist/demo-site/declarations/js/components/MilkdropWindow/MilkdropContextMenu.d.ts +0 -6
- package/built/dist/demo-site/declarations/js/components/MilkdropWindow/PresetOverlay.d.ts +0 -7
- package/built/dist/demo-site/declarations/js/components/MilkdropWindow/Visualizer.d.ts +0 -7
- package/built/dist/demo-site/declarations/js/components/MilkdropWindow/index.d.ts +0 -5
- package/built/dist/demo-site/declarations/js/components/MiniTime.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/OptionsContextMenu.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/PlaybackContextMenu.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/PlaylistWindow/AddMenu.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/PlaylistWindow/ListMenu.d.ts +0 -1
- package/built/dist/demo-site/declarations/js/components/PlaylistWindow/MiscMenu.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/PlaylistWindow/MiscOptionsContextMenu.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/PlaylistWindow/PlaylistActionArea.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/PlaylistWindow/PlaylistMenu.d.ts +0 -8
- package/built/dist/demo-site/declarations/js/components/PlaylistWindow/PlaylistMenuEntry.d.ts +0 -7
- package/built/dist/demo-site/declarations/js/components/PlaylistWindow/PlaylistResizeTarget.d.ts +0 -5
- package/built/dist/demo-site/declarations/js/components/PlaylistWindow/PlaylistScrollBar.d.ts +0 -1
- package/built/dist/demo-site/declarations/js/components/PlaylistWindow/PlaylistShade.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/PlaylistWindow/RemoveMenu.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/PlaylistWindow/RunningTimeDisplay.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/PlaylistWindow/SelectionMenu.d.ts +0 -1
- package/built/dist/demo-site/declarations/js/components/PlaylistWindow/SortContextMenu.d.ts +0 -1
- package/built/dist/demo-site/declarations/js/components/PlaylistWindow/TrackCell.d.ts +0 -9
- package/built/dist/demo-site/declarations/js/components/PlaylistWindow/TrackList.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/PlaylistWindow/TrackTitle.d.ts +0 -6
- package/built/dist/demo-site/declarations/js/components/PlaylistWindow/index.d.ts +0 -5
- package/built/dist/demo-site/declarations/js/components/ResizeTarget.d.ts +0 -10
- package/built/dist/demo-site/declarations/js/components/Skin.d.ts +0 -1
- package/built/dist/demo-site/declarations/js/components/SkinsContextMenu.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/components/VerticalSlider.d.ts +0 -15
- package/built/dist/demo-site/declarations/js/components/Vis.d.ts +0 -5
- package/built/dist/demo-site/declarations/js/components/VisPainter.d.ts +0 -147
- package/built/dist/demo-site/declarations/js/components/Volume.d.ts +0 -8
- package/built/dist/demo-site/declarations/js/components/WinampButton.d.ts +0 -22
- package/built/dist/demo-site/declarations/js/components/WindowManager.d.ts +0 -8
- package/built/dist/demo-site/declarations/js/constants.d.ts +0 -39
- package/built/dist/demo-site/declarations/js/emitter.d.ts +0 -9
- package/built/dist/demo-site/declarations/js/fileUtils.d.ts +0 -15
- package/built/dist/demo-site/declarations/js/hooks.d.ts +0 -20
- package/built/dist/demo-site/declarations/js/hotkeys.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/loadQueue.d.ts +0 -9
- package/built/dist/demo-site/declarations/js/marqueeUtils.d.ts +0 -6
- package/built/dist/demo-site/declarations/js/marqueeUtils.test.d.ts +0 -1
- package/built/dist/demo-site/declarations/js/media/StereoBalanceNode.d.ts +0 -3
- package/built/dist/demo-site/declarations/js/media/elementSource.d.ts +0 -28
- package/built/dist/demo-site/declarations/js/media/index.d.ts +0 -117
- package/built/dist/demo-site/declarations/js/mediaMiddleware.d.ts +0 -4
- package/built/dist/demo-site/declarations/js/mediaSession.d.ts +0 -2
- package/built/dist/demo-site/declarations/js/playlistHtml.d.ts +0 -10
- package/built/dist/demo-site/declarations/js/reducers/display.d.ts +0 -26
- package/built/dist/demo-site/declarations/js/reducers/equalizer.d.ts +0 -10
- package/built/dist/demo-site/declarations/js/reducers/index.d.ts +0 -4
- package/built/dist/demo-site/declarations/js/reducers/media.d.ts +0 -14
- package/built/dist/demo-site/declarations/js/reducers/milkdrop.d.ts +0 -15
- package/built/dist/demo-site/declarations/js/reducers/network.d.ts +0 -6
- package/built/dist/demo-site/declarations/js/reducers/playlist.d.ts +0 -9
- package/built/dist/demo-site/declarations/js/reducers/settings.d.ts +0 -6
- package/built/dist/demo-site/declarations/js/reducers/tracks.d.ts +0 -7
- package/built/dist/demo-site/declarations/js/reducers/tracks.test.d.ts +0 -1
- package/built/dist/demo-site/declarations/js/reducers/userInput.d.ts +0 -9
- package/built/dist/demo-site/declarations/js/reducers/windows.d.ts +0 -35
- package/built/dist/demo-site/declarations/js/regionParser.d.ts +0 -6
- package/built/dist/demo-site/declarations/js/resizeUtils.d.ts +0 -23
- package/built/dist/demo-site/declarations/js/resizeUtils.test.d.ts +0 -1
- package/built/dist/demo-site/declarations/js/selectors.d.ts +0 -210
- package/built/dist/demo-site/declarations/js/selectors.test.d.ts +0 -1
- package/built/dist/demo-site/declarations/js/serialization.test.d.ts +0 -1
- package/built/dist/demo-site/declarations/js/serializedStates/v1Types.d.ts +0 -64
- package/built/dist/demo-site/declarations/js/setImmediate.d.ts +0 -1
- package/built/dist/demo-site/declarations/js/skinParser.d.ts +0 -12
- package/built/dist/demo-site/declarations/js/skinParserUtils.d.ts +0 -19
- package/built/dist/demo-site/declarations/js/skinSelectors.d.ts +0 -6
- package/built/dist/demo-site/declarations/js/skinSprites.d.ts +0 -17
- package/built/dist/demo-site/declarations/js/snapUtils.d.ts +0 -32
- package/built/dist/demo-site/declarations/js/snapUtils.test.d.ts +0 -1
- package/built/dist/demo-site/declarations/js/spinParserUtils.test.d.ts +0 -1
- package/built/dist/demo-site/declarations/js/store.d.ts +0 -4
- package/built/dist/demo-site/declarations/js/trackUtils.d.ts +0 -3
- package/built/dist/demo-site/declarations/js/types.d.ts +0 -765
- package/built/dist/demo-site/declarations/js/utils.d.ts +0 -70
- package/built/dist/demo-site/declarations/js/utils.test.d.ts +0 -1
- package/built/dist/demo-site/declarations/js/webamp.d.ts +0 -6
- package/built/dist/demo-site/declarations/js/webampLazy.d.ts +0 -203
- package/built/dist/demo-site/declarations/js/webampWithButterchurn.d.ts +0 -6
- package/built/dist/demo-site/declarations/scripts/compileSkin.d.ts +0 -1
- package/built/dist/demo-site/declarations/scripts/postcss-optimize-data-uri-pngs.d.mts +0 -8
- package/built/dist/demo-site/declarations/scripts/rollupPlugins.d.mts +0 -8
- package/built/dist/demo-site/declarations/vite.config.d.mts +0 -2
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { WindowInfo } from "./types";
|
|
2
|
-
interface Time {
|
|
3
|
-
minutesFirstDigit: string;
|
|
4
|
-
minutesSecondDigit: string;
|
|
5
|
-
secondsFirstDigit: string;
|
|
6
|
-
secondsSecondDigit: string;
|
|
7
|
-
}
|
|
8
|
-
interface IniData {
|
|
9
|
-
[section: string]: {
|
|
10
|
-
[key: string]: string;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
export declare function imgFromUrl(url: string): Promise<HTMLImageElement>;
|
|
14
|
-
export declare const getTimeObj: (time: number | null) => Time;
|
|
15
|
-
export declare const getTimeStr: (time: number | null, truncate?: boolean) => string;
|
|
16
|
-
export declare const parseViscolors: (text: string) => string[];
|
|
17
|
-
export declare const parseIni: (text: string) => IniData;
|
|
18
|
-
export declare const clamp: (value: number, min: number, max: number) => number;
|
|
19
|
-
export declare const sum: (values: number[]) => number;
|
|
20
|
-
export declare function base64FromDataArray(dataArray: Uint8Array): string;
|
|
21
|
-
export declare const base64FromArrayBuffer: (arrayBuffer: ArrayBuffer) => string;
|
|
22
|
-
export declare function downloadURI(uri: string, name: string): void;
|
|
23
|
-
export declare const toPercent: (min: number, max: number, value: number) => number;
|
|
24
|
-
export declare const percentToRange: (percent: number, min: number, max: number) => number;
|
|
25
|
-
export declare const percentToIndex: (percent: number, length: number) => number;
|
|
26
|
-
export declare const normalizeEqBand: (oldValue: number) => number;
|
|
27
|
-
export declare const denormalizeEqBand: (oldValue: number) => number;
|
|
28
|
-
export declare function merge<T extends object, S extends object>(target: T, source: S): T & S;
|
|
29
|
-
export declare function segment<V>(min: number, max: number, value: number, newValues: V[]): V;
|
|
30
|
-
export declare function shuffle<T>(array: T[]): T[];
|
|
31
|
-
export declare function sort<T>(array: T[], iteratee: (value: T) => number | string): T[];
|
|
32
|
-
export declare function moveSelected<V>(arr: V[], isSelected: (index: number) => boolean, offset: number): V[];
|
|
33
|
-
export declare function spliceIn<T>(original: T[], start: number, newValues: T[]): T[];
|
|
34
|
-
export declare function replaceAtIndex<T>(arr: T[], index: number, newValue: T): T[];
|
|
35
|
-
export declare function debounce(func: Function, delay: number): Function;
|
|
36
|
-
export declare function throttle(func: Function, delay: number): Function;
|
|
37
|
-
export declare function uniqueId(): number;
|
|
38
|
-
export declare function objectForEach<V>(obj: {
|
|
39
|
-
[key: string]: V;
|
|
40
|
-
}, cb: (value: V, key: string) => void): void;
|
|
41
|
-
export declare function objectMap<V, N>(obj: {
|
|
42
|
-
[key: string]: V;
|
|
43
|
-
}, cb: (value: V, key: string) => N): {
|
|
44
|
-
[key: string]: N;
|
|
45
|
-
};
|
|
46
|
-
export declare function objectFilter<V>(obj: {
|
|
47
|
-
[key: string]: V;
|
|
48
|
-
}, predicate: (value: V, key: string) => boolean): {
|
|
49
|
-
[key: string]: V;
|
|
50
|
-
};
|
|
51
|
-
export declare const calculateBoundingBox: (windows: WindowInfo[]) => {
|
|
52
|
-
left: number;
|
|
53
|
-
top: number;
|
|
54
|
-
bottom: number;
|
|
55
|
-
right: number;
|
|
56
|
-
} | null;
|
|
57
|
-
export declare function findLastIndex<T>(arr: T[], cb: (val: T) => boolean): number;
|
|
58
|
-
export declare function getWindowSize(): {
|
|
59
|
-
width: number;
|
|
60
|
-
height: number;
|
|
61
|
-
};
|
|
62
|
-
export declare function getScreenSize(): {
|
|
63
|
-
width: number;
|
|
64
|
-
height: number;
|
|
65
|
-
};
|
|
66
|
-
type PosEvent = MouseEvent | TouchEvent | React.MouseEvent<HTMLElement> | React.TouchEvent<HTMLElement>;
|
|
67
|
-
export declare function getX(e: PosEvent): number;
|
|
68
|
-
export declare function getY(e: PosEvent): number;
|
|
69
|
-
export declare function weakMapMemoize<T extends object, R>(func: (value: T) => R): (value: T) => R;
|
|
70
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
import type JSZip from "jszip";
|
|
2
|
-
import ReactDOM from "react-dom/client";
|
|
3
|
-
import { Store, Track, LoadedURLTrack, Middleware, ButterchurnOptions, PartialState, Options, MediaStatus, PlaylistTrack, PlayerMediaStatus, IMetadataApi } from "./types";
|
|
4
|
-
import { IMedia, IMediaClass } from "./media";
|
|
5
|
-
import Emitter from "./emitter";
|
|
6
|
-
import { SerializedStateV1 } from "./serializedStates/v1Types";
|
|
7
|
-
import Disposable from "./Disposable";
|
|
8
|
-
export interface PrivateOptions {
|
|
9
|
-
__initialState?: PartialState;
|
|
10
|
-
__customMiddlewares?: Middleware[];
|
|
11
|
-
__butterchurnOptions?: ButterchurnOptions;
|
|
12
|
-
__customMediaClass?: IMediaClass;
|
|
13
|
-
}
|
|
14
|
-
export interface InjectableDependencies {
|
|
15
|
-
requireJSZip: () => Promise<JSZip>;
|
|
16
|
-
requireMusicMetadata: () => Promise<IMetadataApi>;
|
|
17
|
-
}
|
|
18
|
-
declare class Webamp {
|
|
19
|
-
static VERSION: string;
|
|
20
|
-
_actionEmitter: Emitter;
|
|
21
|
-
_root: ReactDOM.Root | null;
|
|
22
|
-
_disposable: Disposable;
|
|
23
|
-
options: Options & PrivateOptions & InjectableDependencies;
|
|
24
|
-
media: IMedia;
|
|
25
|
-
store: Store;
|
|
26
|
-
/**
|
|
27
|
-
* Returns a true if the current browser supports the features that Webamp depends upon.
|
|
28
|
-
*
|
|
29
|
-
* It is recommended to check this before you attempt to instantiate an instance of Winamp.
|
|
30
|
-
*/
|
|
31
|
-
static browserIsSupported(): boolean;
|
|
32
|
-
constructor(options: Options & PrivateOptions & InjectableDependencies);
|
|
33
|
-
/**
|
|
34
|
-
* Play the current track.
|
|
35
|
-
*/
|
|
36
|
-
play(): void;
|
|
37
|
-
/**
|
|
38
|
-
* Pause the current track.
|
|
39
|
-
*/
|
|
40
|
-
pause(): void;
|
|
41
|
-
/**
|
|
42
|
-
* Stop the currently playing audio. Equivalent to pressing the "stop" button.
|
|
43
|
-
*/
|
|
44
|
-
stop(): void;
|
|
45
|
-
/**
|
|
46
|
-
* Set volume from 0 - 100.
|
|
47
|
-
*/
|
|
48
|
-
setVolume(volume: number): void;
|
|
49
|
-
/**
|
|
50
|
-
* Seek backward n seconds in the current track.
|
|
51
|
-
*/
|
|
52
|
-
seekBackward(seconds: number): void;
|
|
53
|
-
/**
|
|
54
|
-
* Seek forward n seconds in the current track.
|
|
55
|
-
*/
|
|
56
|
-
seekForward(seconds: number): void;
|
|
57
|
-
/**
|
|
58
|
-
* Seek to a given time within the current track.
|
|
59
|
-
*/
|
|
60
|
-
seekToTime(seconds: number): void;
|
|
61
|
-
/**
|
|
62
|
-
* Check if shuffle is enabled.
|
|
63
|
-
*/
|
|
64
|
-
isShuffleEnabled(): boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Toggle shuffle mode between enabled and disabled.
|
|
67
|
-
*/
|
|
68
|
-
toggleShuffle(): void;
|
|
69
|
-
/**
|
|
70
|
-
* Check if repeat is enabled.
|
|
71
|
-
*/
|
|
72
|
-
isRepeatEnabled(): boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Toggle repeat mode between enabled and disabled.
|
|
75
|
-
*/
|
|
76
|
-
toggleRepeat(): void;
|
|
77
|
-
/**
|
|
78
|
-
* Play the next track.
|
|
79
|
-
*/
|
|
80
|
-
nextTrack(): void;
|
|
81
|
-
/**
|
|
82
|
-
* Play the previous track.
|
|
83
|
-
*/
|
|
84
|
-
previousTrack(): void;
|
|
85
|
-
/**
|
|
86
|
-
* Set the current track to a specific track in the playlist by zero-based index.
|
|
87
|
-
*
|
|
88
|
-
* Note: If Webamp is currently playing, the track will begin playing. If
|
|
89
|
-
* Webamp is not playing, the track will not start playing. You can use
|
|
90
|
-
* `webamp.pause()` before calling this method or `webamp.play()` after
|
|
91
|
-
* calling this method to control whether the track starts playing.
|
|
92
|
-
*/
|
|
93
|
-
setCurrentTrack(index: number): void;
|
|
94
|
-
/**
|
|
95
|
-
* Add an array of `Track`s to the end of the playlist.
|
|
96
|
-
*/
|
|
97
|
-
appendTracks(tracks: Track[]): void;
|
|
98
|
-
/**
|
|
99
|
-
* Replace the playlist with an array of `Track`s and begin playing the first track.
|
|
100
|
-
*/
|
|
101
|
-
setTracksToPlay(tracks: Track[]): void;
|
|
102
|
-
/**
|
|
103
|
-
* Get the current playlist in order.
|
|
104
|
-
*/
|
|
105
|
-
getPlaylistTracks(): PlaylistTrack[];
|
|
106
|
-
/**
|
|
107
|
-
* Get the current "playing" status.
|
|
108
|
-
*/
|
|
109
|
-
getMediaStatus(): MediaStatus;
|
|
110
|
-
/**
|
|
111
|
-
* Get the current "playing" status of the player. Similar to
|
|
112
|
-
* `getMediaStatus()`, but can differentiate between different reasons why the
|
|
113
|
-
* player might not be playing, such as "ENDED" when the end of the playlist
|
|
114
|
-
* has been reached or "CLOSED" when the player has been closed.
|
|
115
|
-
*/
|
|
116
|
-
getPlayerMediaStatus(): PlayerMediaStatus;
|
|
117
|
-
/**
|
|
118
|
-
* A callback which will be called when Webamp is _about to_ close. Returns an
|
|
119
|
-
* "unsubscribe" function. The callback will be passed a `cancel` function
|
|
120
|
-
* which you can use to conditionally prevent Webamp from being closed.
|
|
121
|
-
*
|
|
122
|
-
* @returns An "unsubscribe" function. Useful if at some point in the future you want to stop listening to these events.
|
|
123
|
-
*/
|
|
124
|
-
onWillClose(cb: (cancel: () => void) => void): () => void;
|
|
125
|
-
/**
|
|
126
|
-
* A callback which will be called when Webamp is closed.
|
|
127
|
-
*
|
|
128
|
-
* @returns An "unsubscribe" function. Useful if at some point in the future you want to stop listening to these events.
|
|
129
|
-
*/
|
|
130
|
-
onClose(cb: () => void): () => void;
|
|
131
|
-
/**
|
|
132
|
-
* Equivalent to selecting "Close" from Webamp's options menu. Once closed,
|
|
133
|
-
* you can open it again with `.reopen()`.
|
|
134
|
-
*/
|
|
135
|
-
close(): void;
|
|
136
|
-
/**
|
|
137
|
-
* After `.close()`ing this instance, you can reopen it by calling this method.
|
|
138
|
-
*/
|
|
139
|
-
reopen(): void;
|
|
140
|
-
/**
|
|
141
|
-
* A callback which will be called when a new track starts loading.
|
|
142
|
-
*
|
|
143
|
-
* This can happen on startup when the first track starts buffering, or when a
|
|
144
|
-
* subsequent track starts playing. The callback will be called with an
|
|
145
|
-
* object `({url: 'https://example.com/track.mp3'})` containing the URL of the
|
|
146
|
-
* track.
|
|
147
|
-
*
|
|
148
|
-
* Note: If the user drags in a track, the URL may be an ObjectURL.
|
|
149
|
-
*
|
|
150
|
-
* @returns An "unsubscribe" function. Useful if at some point in the future
|
|
151
|
-
* you want to stop listening to these events.
|
|
152
|
-
*/
|
|
153
|
-
onTrackDidChange(cb: (trackInfo: LoadedURLTrack | null) => void): () => void;
|
|
154
|
-
/**
|
|
155
|
-
* A callback which will be called when Webamp is minimized.
|
|
156
|
-
*
|
|
157
|
-
* @returns An "unsubscribe" function. Useful if at some point in the future you want to stop listening to these events.
|
|
158
|
-
*/
|
|
159
|
-
onMinimize(cb: () => void): () => void;
|
|
160
|
-
/**
|
|
161
|
-
* Set the skin to use. This can be a URL or a base64 encoded string. The skin
|
|
162
|
-
* will be loaded asynchronously.
|
|
163
|
-
*
|
|
164
|
-
* NOTE: If the URL is not on the same domain as the page, you will need to consider CORS.
|
|
165
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
|
166
|
-
*/
|
|
167
|
-
setSkinFromUrl(url: string): void;
|
|
168
|
-
/**
|
|
169
|
-
* Returns a promise that resolves when the skin is done loading.
|
|
170
|
-
*/
|
|
171
|
-
skinIsLoaded(): Promise<void>;
|
|
172
|
-
/**
|
|
173
|
-
* Webamp will wait until it has fetched the skin and fully parsed it and then render itself.
|
|
174
|
-
*
|
|
175
|
-
* Webamp is rendered into a new DOM node at the end of the <body> tag with the id `#webamp`.
|
|
176
|
-
*
|
|
177
|
-
* If a domNode is passed, Webamp will place itself in the center of that DOM node.
|
|
178
|
-
*
|
|
179
|
-
* @returns A promise is returned which will resolve after the render is complete.
|
|
180
|
-
*/
|
|
181
|
-
renderWhenReady(node: HTMLElement): Promise<void>;
|
|
182
|
-
/**
|
|
183
|
-
* **Note:** _This method is not fully functional. It is currently impossible to
|
|
184
|
-
* clean up a Winamp instance. This method makes an effort, but it still leaks
|
|
185
|
-
* the whole instance. In the future the behavior of this method will improve,
|
|
186
|
-
* so you might as well call it._
|
|
187
|
-
*
|
|
188
|
-
* When you are done with a Webamp instance, call this method and Webamp will
|
|
189
|
-
* attempt to clean itself up to avoid memory leaks.
|
|
190
|
-
*/
|
|
191
|
-
dispose(): void;
|
|
192
|
-
__loadSerializedState(serializedState: SerializedStateV1): void;
|
|
193
|
-
__getSerializedState(): SerializedStateV1;
|
|
194
|
-
__onStateChange(cb: () => void): () => void;
|
|
195
|
-
/**
|
|
196
|
-
* Wait for the store to match a predicate condition.
|
|
197
|
-
* Returns a promise that resolves when the condition is met.
|
|
198
|
-
* If the instance is disposed, the promise will be rejected.
|
|
199
|
-
*/
|
|
200
|
-
private storeHas;
|
|
201
|
-
_bufferTracks(tracks: Track[]): void;
|
|
202
|
-
}
|
|
203
|
-
export default Webamp;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|