peer deps? also canplay instead of canplaythrough
This commit is contained in:
parent
34facec032
commit
4f48ef3e22
7 changed files with 611 additions and 464 deletions
1064
package-lock.json
generated
1064
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@euterpe.js/euterpe",
|
"name": "@euterpe.js/euterpe",
|
||||||
"version": "1.0.9",
|
"version": "1.0.11",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"description": "Fully featured solution for playing music on the web. Support for local library, audio visuals and more!",
|
"description": "Fully featured solution for playing music on the web. Support for local library, audio visuals and more!",
|
||||||
"main": "./src/index.js",
|
"main": "./src/index.js",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@euterpe.js/music-library",
|
"name": "@euterpe.js/music-library",
|
||||||
"version": "1.0.8",
|
"version": "1.0.10",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"description": "A simple music library, acting as a Local DB as JS Object. Contains everything a person would need to store their music data for website playback.",
|
"description": "A simple music library, acting as a Local DB as JS Object. Contains everything a person would need to store their music data for website playback.",
|
||||||
"main": "./src/index.js",
|
"main": "./src/index.js",
|
||||||
|
|
|
@ -268,6 +268,7 @@ function from_json(db_stringified: { artists?: any, songs?: any, collections?: a
|
||||||
}
|
}
|
||||||
if (db_stringified.songs) {
|
if (db_stringified.songs) {
|
||||||
for (const song of db_stringified.songs) {
|
for (const song of db_stringified.songs) {
|
||||||
|
try { if (song.url) song.url = new URL(song.url) } catch (e) { console.error("failed to parse song.url" + e) }
|
||||||
if (song.artists) song.artists = song.artists.map((e: any) => ref_from_json(e))
|
if (song.artists) song.artists = song.artists.map((e: any) => ref_from_json(e))
|
||||||
if (song.remix_artists) song.remix_artists = song.remix_artists.map((e: any) => ref_from_json(e))
|
if (song.remix_artists) song.remix_artists = song.remix_artists.map((e: any) => ref_from_json(e))
|
||||||
if (song.in_collection) song.in_collection = ref_from_json(song.in_collection)
|
if (song.in_collection) song.in_collection = ref_from_json(song.in_collection)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@euterpe.js/player",
|
"name": "@euterpe.js/player",
|
||||||
"version": "1.0.5",
|
"version": "1.0.6",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"description": "A simple, safe AudioContext web music player",
|
"description": "A simple, safe AudioContext web music player",
|
||||||
"main": "./src/index.js",
|
"main": "./src/index.js",
|
||||||
|
|
|
@ -281,7 +281,7 @@ export class MusicPlayer {
|
||||||
//Found out today about this. Such a nice new way to mass remove event listeners!
|
//Found out today about this. Such a nice new way to mass remove event listeners!
|
||||||
const controller = new AbortController();
|
const controller = new AbortController();
|
||||||
|
|
||||||
this.audio_element.addEventListener("canplaythrough", function canplay_listener(s) {
|
this.audio_element.addEventListener("canplay", function canplay_listener(s) {
|
||||||
controller.abort()
|
controller.abort()
|
||||||
resolve(s)
|
resolve(s)
|
||||||
}, { signal: controller.signal })
|
}, { signal: controller.signal })
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@euterpe.js/visualizer",
|
"name": "@euterpe.js/visualizer",
|
||||||
"version": "1.0.6",
|
"version": "1.0.7",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"description": "Music visualizer based on SVG and AudioContext",
|
"description": "Music visualizer based on SVG and AudioContext",
|
||||||
"main": "./src/index.js",
|
"main": "./src/index.js",
|
||||||
|
|
Loading…
Reference in a new issue