@vinylproject/washtub-player 0.0.0-dev.faaadf8

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.
@@ -0,0 +1,83 @@
1
+ import { CSSResult } from 'lit';
2
+ import { LitElement } from 'lit';
3
+ import { nothing } from 'lit';
4
+ import { TemplateResult } from 'lit-html';
5
+
6
+ export declare interface AlbumMeta {
7
+ type: 'album';
8
+ title: string;
9
+ artist: string | null;
10
+ year: number | null;
11
+ cover_url: string | null;
12
+ allow_download: boolean;
13
+ tracks: EmbedTrack[];
14
+ }
15
+
16
+ export declare type EmbedMeta = SongMeta | AlbumMeta;
17
+
18
+ export declare interface EmbedTrack {
19
+ id: number;
20
+ title: string;
21
+ artist: string;
22
+ track_number: number;
23
+ disc_number: number;
24
+ duration_ms: number;
25
+ format: string;
26
+ bit_rate: number;
27
+ genre: string;
28
+ stream_url: string;
29
+ }
30
+
31
+ export declare interface SongMeta {
32
+ type: 'song';
33
+ title: string;
34
+ artist: string | null;
35
+ album: string | null;
36
+ year: number | null;
37
+ genre: string;
38
+ format: string;
39
+ bit_rate: number;
40
+ sample_rate: number;
41
+ duration_ms: number;
42
+ cover_url: string | null;
43
+ allow_download: boolean;
44
+ stream_url: string;
45
+ }
46
+
47
+ export declare class WashtubPlayer extends LitElement {
48
+ static styles: CSSResult;
49
+ token: string;
50
+ apiBase: string;
51
+ private meta;
52
+ private loading;
53
+ private error;
54
+ private activeTrackIndex;
55
+ private playing;
56
+ private currentTime;
57
+ private duration;
58
+ private audio;
59
+ connectedCallback(): void;
60
+ disconnectedCallback(): void;
61
+ private get resolvedApiBase();
62
+ private get isAlbum();
63
+ private get tracks();
64
+ private get activeTrack();
65
+ private get isActiveTrack();
66
+ private get progressPercent();
67
+ private resolve;
68
+ private handlePlay;
69
+ private handleTrackPlay;
70
+ private isTrackPlaying;
71
+ private isTrackActive;
72
+ private handleTrackEnded;
73
+ private handleSeek;
74
+ private get playButtonLabel();
75
+ private mimeType;
76
+ render(): TemplateResult<1> | typeof nothing;
77
+ private renderSong;
78
+ private renderAlbum;
79
+ private renderTags;
80
+ private renderControls;
81
+ }
82
+
83
+ export { }