@internetarchive/radio-player 0.0.3 → 0.1.0
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 +2 -2
- package/.eslintrc +0 -37
- package/.gitignore +0 -11
- package/.storybook/.babelrc +0 -15
- package/.storybook/addons.js +0 -7
- package/.storybook/config.js +0 -11
- package/.storybook/webpack.config.js +0 -5
- package/demo/full-text-search-service.ts +0 -32
- package/demo/index.html +0 -53
- package/demo/radio-player-controller.ts +0 -237
- package/karma.bs.config.js +0 -16
- package/karma.conf.js +0 -66
- package/package-lock.json +0 -51719
- package/stories/index.stories.js +0 -40
- package/stories/transcript.js +0 -683
- package/test/assets/arrow.mp3 +0 -0
- package/test/music-zone.test.js +0 -13
- package/test/promised-sleep.js +0 -3
- package/test/radio-player-config.test.js +0 -42
- package/test/radio-player.test.js +0 -1072
- package/test/sample_transcript.js +0 -1493
- package/test/search-handler/search-backends/full-text-sample-response-brackets.js +0 -60
- package/test/search-handler/search-backends/full-text-sample-response-em.js +0 -60
- package/test/search-handler/search-backends/full-text-search-backend.test.js +0 -74
- package/test/search-handler/search-backends/full-text-search-response.test.js +0 -14
- package/test/search-handler/search-backends/local-search-backend.test.js +0 -39
- package/test/search-handler/search-handler.test.js +0 -550
- package/test/search-handler/search-helper.test.js +0 -63
- package/test/search-handler/search-model.test.js +0 -56
- package/test/search-handler/transcript-index.test.js +0 -66
- package/test/search-results-switcher.test.js +0 -97
- package/tsconfig.build.json +0 -7
- package/tsconfig.json +0 -21
- package/yarn.lock +0 -14450
package/test/music-zone.test.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
html, fixture, expect, oneEvent, elementUpdated
|
|
3
|
-
} from '@open-wc/testing';
|
|
4
|
-
|
|
5
|
-
import MusicZone from '../lib/src/models/music-zone';
|
|
6
|
-
|
|
7
|
-
describe('Music Zone', () => {
|
|
8
|
-
it('can be instantiated', async () => {
|
|
9
|
-
const zone = new MusicZone(10, 20);
|
|
10
|
-
expect(zone.start).to.equal(10);
|
|
11
|
-
expect(zone.end).to.equal(20);
|
|
12
|
-
});
|
|
13
|
-
});
|
package/test/promised-sleep.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { expect } from '@open-wc/testing';
|
|
2
|
-
import { AudioSource } from '@internetarchive/audio-element';
|
|
3
|
-
|
|
4
|
-
import RadioPlayerConfig from '../lib/src/models/radio-player-config';
|
|
5
|
-
|
|
6
|
-
describe('Radio Player Config', () => {
|
|
7
|
-
it('can be instantiated', async () => {
|
|
8
|
-
const source1 = new AudioSource('http://foo.bar/foo.mp3', 'audio/mpeg');
|
|
9
|
-
const source2 = new AudioSource('http://foo.bar/foo.ogg', 'audio/ogg');
|
|
10
|
-
|
|
11
|
-
const config = new RadioPlayerConfig(
|
|
12
|
-
'foo',
|
|
13
|
-
'2019-10-29',
|
|
14
|
-
'http://foo.bar/image.jpg',
|
|
15
|
-
'http://bar.foo/waveform.png',
|
|
16
|
-
[source1, source2],
|
|
17
|
-
['foo', 'bar', 'baz']
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
expect(config.title).to.equal('foo');
|
|
21
|
-
expect(config.date).to.equal('2019-10-29');
|
|
22
|
-
expect(config.logoUrl).to.equal('http://foo.bar/image.jpg');
|
|
23
|
-
expect(config.waveformUrl).to.equal('http://bar.foo/waveform.png');
|
|
24
|
-
expect(config.audioSources).to.eql([source1, source2]);
|
|
25
|
-
expect(config.quickSearches).to.eql(['foo', 'bar', 'baz']);
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
it('quicksearches are empty if none passed in', async () => {
|
|
29
|
-
const source1 = new AudioSource('http://foo.bar/foo.mp3', 'audio/mpeg');
|
|
30
|
-
const source2 = new AudioSource('http://foo.bar/foo.ogg', 'audio/ogg');
|
|
31
|
-
|
|
32
|
-
const config = new RadioPlayerConfig(
|
|
33
|
-
'foo',
|
|
34
|
-
'2019-10-29',
|
|
35
|
-
'http://foo.bar/image.jpg',
|
|
36
|
-
'http://bar.foo/waveform.png',
|
|
37
|
-
[source1, source2]
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
expect(config.quickSearches).to.eql([]);
|
|
41
|
-
});
|
|
42
|
-
});
|