@internetarchive/radio-player 0.0.4-alpha.1 → 0.1.1-alpha.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 (69) hide show
  1. package/LICENSE +661 -661
  2. package/README.md +142 -142
  3. package/index.d.ts +15 -15
  4. package/index.js +28 -28
  5. package/lib/src/assets/img/left.d.ts +2 -2
  6. package/lib/src/assets/img/left.js +15 -15
  7. package/lib/src/assets/img/right.d.ts +2 -2
  8. package/lib/src/assets/img/right.js +15 -15
  9. package/lib/src/models/music-zone.d.ts +12 -12
  10. package/lib/src/models/music-zone.js +15 -15
  11. package/lib/src/models/radio-player-config.d.ts +26 -26
  12. package/lib/src/models/radio-player-config.js +27 -27
  13. package/lib/src/radio-player.d.ts +589 -589
  14. package/lib/src/radio-player.js +1337 -1338
  15. package/lib/src/radio-player.js.map +1 -1
  16. package/lib/src/search-handler/search-backends/full-text-search-backend/full-text-search-backend.d.ts +82 -82
  17. package/lib/src/search-handler/search-backends/full-text-search-backend/full-text-search-backend.js +107 -107
  18. package/lib/src/search-handler/search-backends/full-text-search-backend/full-text-search-delegate.d.ts +9 -0
  19. package/lib/src/search-handler/search-backends/full-text-search-backend/full-text-search-delegate.js +1 -0
  20. package/lib/src/search-handler/search-backends/full-text-search-backend/full-text-search-delegate.js.map +1 -0
  21. package/lib/src/search-handler/search-backends/full-text-search-backend/full-text-search-response.d.ts +48 -48
  22. package/lib/src/search-handler/search-backends/full-text-search-backend/full-text-search-response.js +58 -58
  23. package/lib/src/search-handler/search-backends/full-text-search-backend/full-text-search-service-interface.d.ts +16 -16
  24. package/lib/src/search-handler/search-backends/full-text-search-backend/full-text-search-service-interface.js +1 -1
  25. package/lib/src/search-handler/search-backends/local-search-backend/local-search-backend.d.ts +27 -27
  26. package/lib/src/search-handler/search-backends/local-search-backend/local-search-backend.js +42 -42
  27. package/lib/src/search-handler/search-backends/search-backend-interface.d.ts +9 -9
  28. package/lib/src/search-handler/search-backends/search-backend-interface.js +1 -1
  29. package/lib/src/search-handler/search-handler-interface.d.ts +17 -17
  30. package/lib/src/search-handler/search-handler-interface.js +1 -1
  31. package/lib/src/search-handler/search-handler.d.ts +83 -83
  32. package/lib/src/search-handler/search-handler.js +177 -177
  33. package/lib/src/search-handler/search-helper.d.ts +12 -12
  34. package/lib/src/search-handler/search-helper.js +22 -22
  35. package/lib/src/search-handler/search-index.d.ts +53 -0
  36. package/lib/src/search-handler/search-index.js +118 -0
  37. package/lib/src/search-handler/search-index.js.map +1 -0
  38. package/lib/src/search-handler/search-models.d.ts +45 -45
  39. package/lib/src/search-handler/search-models.js +49 -49
  40. package/lib/src/search-handler/transcript-index-interface.d.ts +38 -38
  41. package/lib/src/search-handler/transcript-index-interface.js +1 -1
  42. package/lib/src/search-handler/transcript-index.d.ts +53 -53
  43. package/lib/src/search-handler/transcript-index.js +80 -80
  44. package/lib/src/search-results-switcher.d.ts +58 -58
  45. package/lib/src/search-results-switcher.js +133 -133
  46. package/package.json +93 -93
  47. package/src/assets/img/left.ts +17 -17
  48. package/src/assets/img/right.ts +17 -17
  49. package/src/models/music-zone.ts +17 -17
  50. package/src/models/radio-player-config.ts +47 -47
  51. package/src/radio-player.ts +1398 -1402
  52. package/src/search-handler/search-backends/full-text-search-backend/full-text-search-backend.ts +140 -140
  53. package/src/search-handler/search-backends/full-text-search-backend/full-text-search-response.ts +110 -110
  54. package/src/search-handler/search-backends/full-text-search-backend/full-text-search-service-interface.ts +17 -17
  55. package/src/search-handler/search-backends/local-search-backend/local-search-backend.ts +50 -50
  56. package/src/search-handler/search-backends/search-backend-interface.ts +10 -10
  57. package/src/search-handler/search-handler-interface.ts +18 -18
  58. package/src/search-handler/search-handler.ts +217 -217
  59. package/src/search-handler/search-helper.ts +25 -25
  60. package/src/search-handler/search-models.ts +69 -69
  61. package/src/search-handler/transcript-index-interface.ts +42 -42
  62. package/src/search-handler/transcript-index.ts +93 -93
  63. package/src/search-results-switcher.ts +131 -131
  64. package/lib/demo/full-text-search-service.d.ts +0 -14
  65. package/lib/demo/full-text-search-service.js +0 -34
  66. package/lib/demo/full-text-search-service.js.map +0 -1
  67. package/lib/demo/radio-player-controller.d.ts +0 -41
  68. package/lib/demo/radio-player-controller.js +0 -200
  69. package/lib/demo/radio-player-controller.js.map +0 -1
package/README.md CHANGED
@@ -1,142 +1,142 @@
1
- # \<radio-player>
2
-
3
- A Radio Player that displays closed captioning and allows searching.
4
-
5
- ![Radio Player](./assets/img/radio-player.png "Radio Player Demo")
6
-
7
- ## Installation
8
- ```bash
9
- yarn add @internetarchive/radio-player
10
- ```
11
-
12
- ## Usage
13
- ```js
14
- // radio-player.js
15
- import RadioPlayer from '@internetarchive/radio-player';
16
- export default RadioPlayer;
17
- ```
18
-
19
- ```html
20
- <!-- index.html -->
21
- <script type="module">
22
- import './radio-player.js';
23
- </script>
24
-
25
- <style>
26
- radio-player {
27
- line-height: 1.5rem;
28
- color: white;
29
-
30
- --timeColor: white;
31
- --timeColumnWidth: 3rem;
32
- --transcriptHeight: 200px;
33
-
34
- --autoScrollButtonFontColor: black;
35
- --autoScrollButtonBackgroundColor: white;
36
-
37
- --normalTextColor: gray;
38
- --activeTextColor: white;
39
- --searchResultInactiveBorderColor: gray;
40
- --searchResultActiveBorderColor: green;
41
-
42
- --trackColor: black;
43
- --trackBorder: 1px solid white;
44
- }
45
- </style>
46
-
47
- <radio-player></radio-player>
48
-
49
- <script>
50
- // Configure the radio player
51
-
52
- const radioPlayer = document.querySelector('radio-player');
53
-
54
- radioPlayer.addEventListener('searchRequested', e => {
55
- console.log('Search requested', e.detail.searchTerm);
56
- });
57
-
58
- radioPlayer.addEventListener('searchCleared', e => {
59
- console.log('Search cleared');
60
- });
61
-
62
- radioPlayer.addEventListener('playbackPaused', e => {
63
- console.log('Playback paused');
64
- });
65
-
66
- radioPlayer.addEventListener('playbackStarted', e => {
67
- console.log('Playback started');
68
- });
69
-
70
- radioPlayer.addEventListener('currentTimeChanged', e => {
71
- console.log('Current time changed', e.detail.currentTime);
72
- });
73
-
74
- radioPlayer.addEventListener('timeChangedFromScrub', e => {
75
- console.log('New time', e.detail.newTime);
76
- });
77
-
78
- radioPlayer.addEventListener('transcriptEntrySelected', e => {
79
- console.log('New time', e.detail.newTime);
80
- });
81
-
82
- radioPlayer.addEventListener('canplay', e => {
83
- console.log('Media can play');
84
- });
85
-
86
- const quickSearchTerms = [];
87
-
88
- const audioSource = new AudioSource(
89
- 'https://ia803005.us.archive.org/30/items/BBC_Radio_2_20190502_180000/BBC_Radio_2_20190502_180000.mp3',
90
- 'audio/mpeg',
91
- );
92
-
93
- const radioConfig = new RadioPlayerConfig(
94
- 'Voice of America',
95
- '7:00pm',
96
- './logo.jpg',
97
- './waveform.png',
98
- [audioSource],
99
- quickSearchTerms,
100
- );
101
-
102
- const transcriptEntries: TranscriptEntryConfig[] = [...];
103
-
104
- const transcriptConfig = new TranscriptConfig(transcriptEntries);
105
-
106
- radioPlayer.config = radioConfig;
107
- radioPlayer.transcriptConfig = transcriptConfig
108
- </script>
109
-
110
- ```
111
-
112
- # Development
113
-
114
- ## Prerequisite
115
- ```bash
116
- yarn install
117
- ```
118
-
119
- ## Start Development Server
120
- ```bash
121
- yarn start // start development server and typescript compiler
122
- ```
123
-
124
- ## Testing
125
- ```bash
126
- yarn test
127
- ```
128
-
129
- ## Testing via browserstack
130
- ```bash
131
- yarn test:bs
132
- ```
133
-
134
- ## Demoing using storybook
135
- ```bash
136
- yarn storybook
137
- ```
138
-
139
- ## Linting
140
- ```bash
141
- yarn lint
142
- ```
1
+ # \<radio-player>
2
+
3
+ A Radio Player that displays closed captioning and allows searching.
4
+
5
+ ![Radio Player](./assets/img/radio-player.png "Radio Player Demo")
6
+
7
+ ## Installation
8
+ ```bash
9
+ yarn add @internetarchive/radio-player
10
+ ```
11
+
12
+ ## Usage
13
+ ```js
14
+ // radio-player.js
15
+ import RadioPlayer from '@internetarchive/radio-player';
16
+ export default RadioPlayer;
17
+ ```
18
+
19
+ ```html
20
+ <!-- index.html -->
21
+ <script type="module">
22
+ import './radio-player.js';
23
+ </script>
24
+
25
+ <style>
26
+ radio-player {
27
+ line-height: 1.5rem;
28
+ color: white;
29
+
30
+ --timeColor: white;
31
+ --timeColumnWidth: 3rem;
32
+ --transcriptHeight: 200px;
33
+
34
+ --autoScrollButtonFontColor: black;
35
+ --autoScrollButtonBackgroundColor: white;
36
+
37
+ --normalTextColor: gray;
38
+ --activeTextColor: white;
39
+ --searchResultInactiveBorderColor: gray;
40
+ --searchResultActiveBorderColor: green;
41
+
42
+ --trackColor: black;
43
+ --trackBorder: 1px solid white;
44
+ }
45
+ </style>
46
+
47
+ <radio-player></radio-player>
48
+
49
+ <script>
50
+ // Configure the radio player
51
+
52
+ const radioPlayer = document.querySelector('radio-player');
53
+
54
+ radioPlayer.addEventListener('searchRequested', e => {
55
+ console.log('Search requested', e.detail.searchTerm);
56
+ });
57
+
58
+ radioPlayer.addEventListener('searchCleared', e => {
59
+ console.log('Search cleared');
60
+ });
61
+
62
+ radioPlayer.addEventListener('playbackPaused', e => {
63
+ console.log('Playback paused');
64
+ });
65
+
66
+ radioPlayer.addEventListener('playbackStarted', e => {
67
+ console.log('Playback started');
68
+ });
69
+
70
+ radioPlayer.addEventListener('currentTimeChanged', e => {
71
+ console.log('Current time changed', e.detail.currentTime);
72
+ });
73
+
74
+ radioPlayer.addEventListener('timeChangedFromScrub', e => {
75
+ console.log('New time', e.detail.newTime);
76
+ });
77
+
78
+ radioPlayer.addEventListener('transcriptEntrySelected', e => {
79
+ console.log('New time', e.detail.newTime);
80
+ });
81
+
82
+ radioPlayer.addEventListener('canplay', e => {
83
+ console.log('Media can play');
84
+ });
85
+
86
+ const quickSearchTerms = [];
87
+
88
+ const audioSource = new AudioSource(
89
+ 'https://ia803005.us.archive.org/30/items/BBC_Radio_2_20190502_180000/BBC_Radio_2_20190502_180000.mp3',
90
+ 'audio/mpeg',
91
+ );
92
+
93
+ const radioConfig = new RadioPlayerConfig(
94
+ 'Voice of America',
95
+ '7:00pm',
96
+ './logo.jpg',
97
+ './waveform.png',
98
+ [audioSource],
99
+ quickSearchTerms,
100
+ );
101
+
102
+ const transcriptEntries: TranscriptEntryConfig[] = [...];
103
+
104
+ const transcriptConfig = new TranscriptConfig(transcriptEntries);
105
+
106
+ radioPlayer.config = radioConfig;
107
+ radioPlayer.transcriptConfig = transcriptConfig
108
+ </script>
109
+
110
+ ```
111
+
112
+ # Development
113
+
114
+ ## Prerequisite
115
+ ```bash
116
+ yarn install
117
+ ```
118
+
119
+ ## Start Development Server
120
+ ```bash
121
+ yarn start // start development server and typescript compiler
122
+ ```
123
+
124
+ ## Testing
125
+ ```bash
126
+ yarn test
127
+ ```
128
+
129
+ ## Testing via browserstack
130
+ ```bash
131
+ yarn test:bs
132
+ ```
133
+
134
+ ## Demoing using storybook
135
+ ```bash
136
+ yarn storybook
137
+ ```
138
+
139
+ ## Linting
140
+ ```bash
141
+ yarn lint
142
+ ```
package/index.d.ts CHANGED
@@ -1,15 +1,15 @@
1
- import RadioPlayer from './lib/src/radio-player.d';
2
- import SearchResultsSwitcher from './lib/src/search-results-switcher.d';
3
- import MusicZone from './lib/src/models/music-zone.d';
4
- import RadioPlayerConfig from './lib/src/models/radio-player-config.d';
5
- import { FullTextSearchServiceInterface } from './lib/src/search-handler/search-backends/full-text-search-backend/full-text-search-service-interface.d';
6
- import { SearchBackendInterface } from './lib/src/search-handler/search-backends/search-backend-interface.d';
7
-
8
- export {
9
- RadioPlayer,
10
- SearchResultsSwitcher,
11
- MusicZone,
12
- RadioPlayerConfig,
13
- FullTextSearchServiceInterface,
14
- SearchBackendInterface
15
- };
1
+ import RadioPlayer from './lib/src/radio-player.d';
2
+ import SearchResultsSwitcher from './lib/src/search-results-switcher.d';
3
+ import MusicZone from './lib/src/models/music-zone.d';
4
+ import RadioPlayerConfig from './lib/src/models/radio-player-config.d';
5
+ import { FullTextSearchServiceInterface } from './lib/src/search-handler/search-backends/full-text-search-backend/full-text-search-service-interface.d';
6
+ import { SearchBackendInterface } from './lib/src/search-handler/search-backends/search-backend-interface.d';
7
+
8
+ export {
9
+ RadioPlayer,
10
+ SearchResultsSwitcher,
11
+ MusicZone,
12
+ RadioPlayerConfig,
13
+ FullTextSearchServiceInterface,
14
+ SearchBackendInterface
15
+ };
package/index.js CHANGED
@@ -1,28 +1,28 @@
1
- import {
2
- TranscriptConfig,
3
- TranscriptEntryConfig
4
- } from '@internetarchive/transcript-view';
5
- import { AudioSource } from '@internetarchive/audio-element';
6
-
7
- import RadioPlayer from './lib/src/radio-player';
8
- import RadioPlayerConfig from './lib/src/models/radio-player-config';
9
- import { SearchHandler } from './lib/src/search-handler/search-handler';
10
- import { LocalSearchBackend } from './lib/src/search-handler/search-backends/local-search-backend/local-search-backend';
11
- import { FullTextSearchBackend } from './lib/src/search-handler/search-backends/full-text-search-backend/full-text-search-backend';
12
- import { TranscriptIndex } from './lib/src/search-handler/transcript-index';
13
- import { FullTextSearchResponse } from './lib/src/search-handler/search-backends/full-text-search-backend/full-text-search-response';
14
- import { FullTextSearchResponseDoc } from './lib/src/search-handler/search-backends/full-text-search-backend/full-text-search-response';
15
-
16
- export {
17
- RadioPlayer,
18
- RadioPlayerConfig,
19
- TranscriptConfig,
20
- TranscriptEntryConfig,
21
- AudioSource,
22
- SearchHandler,
23
- LocalSearchBackend,
24
- FullTextSearchBackend,
25
- TranscriptIndex,
26
- FullTextSearchResponse,
27
- FullTextSearchResponseDoc
28
- };
1
+ import {
2
+ TranscriptConfig,
3
+ TranscriptEntryConfig
4
+ } from '@internetarchive/transcript-view';
5
+ import { AudioSource } from '@internetarchive/audio-element';
6
+
7
+ import RadioPlayer from './lib/src/radio-player';
8
+ import RadioPlayerConfig from './lib/src/models/radio-player-config';
9
+ import { SearchHandler } from './lib/src/search-handler/search-handler';
10
+ import { LocalSearchBackend } from './lib/src/search-handler/search-backends/local-search-backend/local-search-backend';
11
+ import { FullTextSearchBackend } from './lib/src/search-handler/search-backends/full-text-search-backend/full-text-search-backend';
12
+ import { TranscriptIndex } from './lib/src/search-handler/transcript-index';
13
+ import { FullTextSearchResponse } from './lib/src/search-handler/search-backends/full-text-search-backend/full-text-search-response';
14
+ import { FullTextSearchResponseDoc } from './lib/src/search-handler/search-backends/full-text-search-backend/full-text-search-response';
15
+
16
+ export {
17
+ RadioPlayer,
18
+ RadioPlayerConfig,
19
+ TranscriptConfig,
20
+ TranscriptEntryConfig,
21
+ AudioSource,
22
+ SearchHandler,
23
+ LocalSearchBackend,
24
+ FullTextSearchBackend,
25
+ TranscriptIndex,
26
+ FullTextSearchResponse,
27
+ FullTextSearchResponseDoc
28
+ };
@@ -1,2 +1,2 @@
1
- declare const image: import("lit-html").TemplateResult<1>;
2
- export default image;
1
+ declare const image: import("lit-html").TemplateResult<1>;
2
+ export default image;
@@ -1,16 +1,16 @@
1
- import { html } from 'lit';
2
- const image = html `
3
- <svg height="13" viewBox="0 0 8 13" width="8" xmlns="http://www.w3.org/2000/svg">
4
- <path
5
- d="m-1.5 8.5 5-5 5 5"
6
- fill="none"
7
- stroke="#fff"
8
- stroke-linecap="round"
9
- stroke-linejoin="round"
10
- stroke-width="2"
11
- transform="matrix(0 -1 1 0 -2 9.7)"
12
- />
13
- </svg>
14
- `;
15
- export default image;
1
+ import { html } from 'lit';
2
+ const image = html `
3
+ <svg height="13" viewBox="0 0 8 13" width="8" xmlns="http://www.w3.org/2000/svg">
4
+ <path
5
+ d="m-1.5 8.5 5-5 5 5"
6
+ fill="none"
7
+ stroke="#fff"
8
+ stroke-linecap="round"
9
+ stroke-linejoin="round"
10
+ stroke-width="2"
11
+ transform="matrix(0 -1 1 0 -2 9.7)"
12
+ />
13
+ </svg>
14
+ `;
15
+ export default image;
16
16
  //# sourceMappingURL=left.js.map
@@ -1,2 +1,2 @@
1
- declare const image: import("lit-html").TemplateResult<1>;
2
- export default image;
1
+ declare const image: import("lit-html").TemplateResult<1>;
2
+ export default image;
@@ -1,16 +1,16 @@
1
- import { html } from 'lit';
2
- const image = html `
3
- <svg height="13" viewBox="0 0 8 13" width="8" xmlns="http://www.w3.org/2000/svg">
4
- <path
5
- d="m-1.5 8.5 5-5 5 5"
6
- fill="none"
7
- stroke="#fff"
8
- stroke-linecap="round"
9
- stroke-linejoin="round"
10
- stroke-width="2"
11
- transform="matrix(0 -1 -1 0 10 9.7)"
12
- />
13
- </svg>
14
- `;
15
- export default image;
1
+ import { html } from 'lit';
2
+ const image = html `
3
+ <svg height="13" viewBox="0 0 8 13" width="8" xmlns="http://www.w3.org/2000/svg">
4
+ <path
5
+ d="m-1.5 8.5 5-5 5 5"
6
+ fill="none"
7
+ stroke="#fff"
8
+ stroke-linecap="round"
9
+ stroke-linejoin="round"
10
+ stroke-width="2"
11
+ transform="matrix(0 -1 -1 0 10 9.7)"
12
+ />
13
+ </svg>
14
+ `;
15
+ export default image;
16
16
  //# sourceMappingURL=right.js.map
@@ -1,12 +1,12 @@
1
- /**
2
- * A data model for defining a zone of music, which is used
3
- * to skip over the zone if it is enabled.
4
- *
5
- * @export
6
- * @class MusicZone
7
- */
8
- export default class MusicZone {
9
- start: number;
10
- end: number;
11
- constructor(start: number, end: number);
12
- }
1
+ /**
2
+ * A data model for defining a zone of music, which is used
3
+ * to skip over the zone if it is enabled.
4
+ *
5
+ * @export
6
+ * @class MusicZone
7
+ */
8
+ export default class MusicZone {
9
+ start: number;
10
+ end: number;
11
+ constructor(start: number, end: number);
12
+ }
@@ -1,16 +1,16 @@
1
- /**
2
- * A data model for defining a zone of music, which is used
3
- * to skip over the zone if it is enabled.
4
- *
5
- * @export
6
- * @class MusicZone
7
- */
8
- export default class MusicZone {
9
- constructor(start, end) {
10
- this.start = 0;
11
- this.end = 0;
12
- this.start = start;
13
- this.end = end;
14
- }
15
- }
1
+ /**
2
+ * A data model for defining a zone of music, which is used
3
+ * to skip over the zone if it is enabled.
4
+ *
5
+ * @export
6
+ * @class MusicZone
7
+ */
8
+ export default class MusicZone {
9
+ constructor(start, end) {
10
+ this.start = 0;
11
+ this.end = 0;
12
+ this.start = start;
13
+ this.end = end;
14
+ }
15
+ }
16
16
  //# sourceMappingURL=music-zone.js.map
@@ -1,26 +1,26 @@
1
- import { AudioSource } from '@internetarchive/audio-element';
2
- /**
3
- * A data model to configure the Radio Player.
4
- *
5
- * @export
6
- * @class RadioPlayerConfig
7
- */
8
- export default class RadioPlayerConfig {
9
- title: string;
10
- date: string;
11
- logoUrl: string;
12
- waveformUrl: string | undefined;
13
- audioSources: AudioSource[];
14
- quickSearches: string[];
15
- /**
16
- * Creates an instance of RadioPlayerConfig.
17
- * @param {string} title
18
- * @param {string} date
19
- * @param {string} logoUrl
20
- * @param {string} waveformUrl
21
- * @param {AudioSource[]} audioSources
22
- * @param {string[]} [quickSearches=[]]
23
- * @memberof RadioPlayerConfig
24
- */
25
- constructor(title: string, date: string, logoUrl: string, waveformUrl: string | undefined, audioSources: AudioSource[], quickSearches?: string[]);
26
- }
1
+ import { AudioSource } from '@internetarchive/audio-element';
2
+ /**
3
+ * A data model to configure the Radio Player.
4
+ *
5
+ * @export
6
+ * @class RadioPlayerConfig
7
+ */
8
+ export default class RadioPlayerConfig {
9
+ title: string;
10
+ date: string;
11
+ logoUrl: string;
12
+ waveformUrl: string | undefined;
13
+ audioSources: AudioSource[];
14
+ quickSearches: string[];
15
+ /**
16
+ * Creates an instance of RadioPlayerConfig.
17
+ * @param {string} title
18
+ * @param {string} date
19
+ * @param {string} logoUrl
20
+ * @param {string} waveformUrl
21
+ * @param {AudioSource[]} audioSources
22
+ * @param {string[]} [quickSearches=[]]
23
+ * @memberof RadioPlayerConfig
24
+ */
25
+ constructor(title: string, date: string, logoUrl: string, waveformUrl: string | undefined, audioSources: AudioSource[], quickSearches?: string[]);
26
+ }
@@ -1,28 +1,28 @@
1
- /**
2
- * A data model to configure the Radio Player.
3
- *
4
- * @export
5
- * @class RadioPlayerConfig
6
- */
7
- export default class RadioPlayerConfig {
8
- /**
9
- * Creates an instance of RadioPlayerConfig.
10
- * @param {string} title
11
- * @param {string} date
12
- * @param {string} logoUrl
13
- * @param {string} waveformUrl
14
- * @param {AudioSource[]} audioSources
15
- * @param {string[]} [quickSearches=[]]
16
- * @memberof RadioPlayerConfig
17
- */
18
- constructor(title, date, logoUrl, waveformUrl, audioSources, quickSearches = []) {
19
- this.quickSearches = [];
20
- this.title = title;
21
- this.date = date;
22
- this.logoUrl = logoUrl;
23
- this.waveformUrl = waveformUrl;
24
- this.audioSources = audioSources;
25
- this.quickSearches = quickSearches;
26
- }
27
- }
1
+ /**
2
+ * A data model to configure the Radio Player.
3
+ *
4
+ * @export
5
+ * @class RadioPlayerConfig
6
+ */
7
+ export default class RadioPlayerConfig {
8
+ /**
9
+ * Creates an instance of RadioPlayerConfig.
10
+ * @param {string} title
11
+ * @param {string} date
12
+ * @param {string} logoUrl
13
+ * @param {string} waveformUrl
14
+ * @param {AudioSource[]} audioSources
15
+ * @param {string[]} [quickSearches=[]]
16
+ * @memberof RadioPlayerConfig
17
+ */
18
+ constructor(title, date, logoUrl, waveformUrl, audioSources, quickSearches = []) {
19
+ this.quickSearches = [];
20
+ this.title = title;
21
+ this.date = date;
22
+ this.logoUrl = logoUrl;
23
+ this.waveformUrl = waveformUrl;
24
+ this.audioSources = audioSources;
25
+ this.quickSearches = quickSearches;
26
+ }
27
+ }
28
28
  //# sourceMappingURL=radio-player-config.js.map