Skip to content

Commit

Permalink
Merge pull request #181 from eshaz/bump-deps
Browse files Browse the repository at this point in the history
Bump Deps
  • Loading branch information
eshaz authored Aug 7, 2023
2 parents 7c234e4 + 0f6a666 commit f710987
Show file tree
Hide file tree
Showing 105 changed files with 3,094 additions and 2,835 deletions.
3,534 changes: 1,863 additions & 1,671 deletions src/demo/package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"audiomotion-analyzer": "^4.0.0",
"audiomotion-analyzer": "^4.1.0",
"butterchurn": "^2.6.7",
"butterchurn-presets": "^2.4.7",
"icecast-metadata-player": "file:../icecast-metadata-player",
Expand All @@ -13,7 +13,7 @@
},
"devDependencies": {
"gh-pages": "^5.0.0",
"prettier": "^2.8.8"
"prettier": "^3.0.1"
},
"scripts": {
"start": "react-scripts start",
Expand Down
13 changes: 7 additions & 6 deletions src/demo/public/bare-minimum-demo.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand All @@ -7,10 +7,11 @@
name="description"
content="Icecast Metadata JS - Javascript library that reads, parses, and queues real-time metadata from an Icecast stream."
/>
<script src="/icecast-metadata-js/icecast-metadata-player-1.16.3.main.min.js"></script>
<script src="/icecast-metadata-js/icecast-metadata-player-1.16.4.main.min.js"></script>
<style>
body {
background: linear-gradient(
background:
linear-gradient(
217deg,
rgba(255, 0, 0, 0.3),
rgba(255, 0, 0, 0) 70.71%
Expand Down Expand Up @@ -80,7 +81,7 @@

const onMetadata = (metadata) => {
metadataEl.innerHTML = `<td><pre>${formatMetadata(
metadata
metadata,
)}</pre></td>`;
onMetadataEnqueue();
};
Expand All @@ -91,7 +92,7 @@
acc +
`<tr><td><pre>${formatTime(timestampOffset)}</pre></td>` +
`<td><pre>${formatMetadata(metadata)}</pre></td></tr>`,
`<th>Up Next</th>`
`<th>Up Next</th>`,
);
};
</script>
Expand Down Expand Up @@ -171,7 +172,7 @@ <h1 style="margin-bottom: 0px">
</ol>
<b>Example</b>
<pre>
&lt;script src="icecast-metadata-player-1.16.3.main.min.js"&gt;&lt;/script&gt;
&lt;script src="icecast-metadata-player-1.16.4.main.min.js"&gt;&lt;/script&gt;
&lt;script&gt;
const onMetadata = (metadata) =&gt; {
document.getElementById("metadata").innerHTML = metadata.StreamTitle;
Expand Down
16 changes: 8 additions & 8 deletions src/demo/public/cast-receiver.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<!doctype html>
<html>
<script
type="text/javascript"
src="//www.gstatic.com/cast/sdk/libs/receiver/2.0.0/cast_receiver.js"
></script>
<script src="/icecast-metadata-js/icecast-metadata-player-1.16.3.main.min.js"></script>
<script src="/icecast-metadata-js/icecast-metadata-player-1.16.4.main.min.js"></script>
<link
href="https://fonts.googleapis.com/css?family=Montserrat&display=swap"
rel="stylesheet"
Expand Down Expand Up @@ -124,15 +124,15 @@ <h3>Codec Updates</h3>

const onCodecUpdate = (audioCodecData, duration) => {
audioInfoEl.shadowRoot.innerHTML = `<div style="margin: 5px 0;">Last Updated: ${formatTime(
duration
duration,
)}</div><table style="border-spacing: 10px 0; margin-top: 5px"><tbody>${Object.entries(
audioCodecData
audioCodecData,
)
.sort(([a], [b]) => a.localeCompare(b))
.reduce(
(acc, [key, value]) =>
acc + `<tr><td>${key}</td><td>${value}</td></tr>`,
""
"",
)}</tbody></table>`;
};

Expand All @@ -143,7 +143,7 @@ <h3>Codec Updates</h3>
`<tr><td class="metadata-time">${formatTime(timestampOffset)}</td>` +
`<td class="metadata">${formatMetadata(metadata)}</td></tr>`,
`<th class="metadata-header">Update Time</th>` +
`<th class="metadata-header">Up Next</th>`
`<th class="metadata-header">Up Next</th>`,
);
};

Expand Down Expand Up @@ -215,7 +215,7 @@ <h3>Codec Updates</h3>

castReceiverManager.onReady = function (event) {
window.castReceiverManager.setApplicationState(
"Icecast Metadata JS Demo"
"Icecast Metadata JS Demo",
);
};

Expand Down Expand Up @@ -316,7 +316,7 @@ <h3>Codec Updates</h3>
this.xPos,
this.yPos,
this.radius,
`${this.rgb},${this.opacity})`
`${this.rgb},${this.opacity})`,
);
}
}
Expand Down
45 changes: 23 additions & 22 deletions src/demo/public/demo.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand All @@ -10,8 +10,8 @@
/>
<meta name="theme-color" content="#000000" />
<meta name="title" content="Icecast Metadata Player Demo" />
<script src="/icecast-metadata-js/icecast-metadata-player-1.16.3.main.min.js"></script>
<script src="/icecast-metadata-js/icecast-metadata-stats-0.1.9.min.js"></script>
<script src="/icecast-metadata-js/icecast-metadata-player-1.16.4.main.min.js"></script>
<script src="/icecast-metadata-js/icecast-metadata-stats-0.1.10.min.js"></script>
<script src="//www.gstatic.com/cv/js/sender/v1/cast_sender.js"></script>
<link
href="https://fonts.googleapis.com/css?family=Montserrat&display=swap"
Expand All @@ -23,7 +23,8 @@
text-size-adjust: none;
}
body {
background: linear-gradient(
background:
linear-gradient(
217deg,
rgba(255, 0, 0, 0.3),
rgba(255, 0, 0, 0) 70.71%
Expand Down Expand Up @@ -180,7 +181,7 @@
<script>
let playerFormData, statsFormData;
const stationsJson = fetch("/icecast-metadata-js/stations.json").then(
(res) => res.json()
(res) => res.json(),
);

// helper functions
Expand Down Expand Up @@ -244,7 +245,7 @@

document.playerForm.addEventListener("change", () => {
playerFormData = Object.fromEntries(
new FormData(playerForm).entries()
new FormData(playerForm).entries(),
);

getIcecastMetadataStats();
Expand All @@ -265,7 +266,7 @@

const stationsEl = document.getElementById("stations");
const supportedTypesEl = document.getElementById(
"supported-codecs-table-body"
"supported-codecs-table-body",
);
const endpointEl = document.getElementById("endpoint");

Expand Down Expand Up @@ -356,7 +357,7 @@
}

playerFormData = Object.fromEntries(
new FormData(playerForm).entries()
new FormData(playerForm).entries(),
);
statsFormData = Object.fromEntries(new FormData(statsForm).entries());

Expand All @@ -378,13 +379,13 @@
window.__onGCastApiAvailable = (loaded) => {
if (loaded) {
const sessionRequest = new window.chrome.cast.SessionRequest(
castAPIId
castAPIId,
);

const apiConfig = new window.chrome.cast.ApiConfig(
sessionRequest,
(session) => (castSession = session),
() => {}
() => {},
);

window.chrome.cast.initialize(apiConfig);
Expand Down Expand Up @@ -894,7 +895,7 @@ <h1 style="margin-bottom: 0px">
</ol>
<b>Example</b>
<pre>
&lt;script src="icecast-metadata-player-1.16.3.main.min.js"&gt;&lt;/script&gt;
&lt;script src="icecast-metadata-player-1.16.4.main.min.js"&gt;&lt;/script&gt;
&lt;script&gt;
const onMetadata = (metadata) =&gt; {
document.getElementById("metadata").innerHTML = metadata.StreamTitle;
Expand Down Expand Up @@ -1176,7 +1177,7 @@ <h1 style="margin-bottom: 0px">
<li>
Download the
<a
href="https://raw.githubusercontent.com/eshaz/icecast-metadata-js/master/src/icecast-metadata-stats/build/icecast-metadata-stats-0.1.9.min.js"
href="https://raw.githubusercontent.com/eshaz/icecast-metadata-js/master/src/icecast-metadata-stats/build/icecast-metadata-stats-0.1.10.min.js"
>latest build</a
>, or install via
<a href="https://www.npmjs.com/package/icecast-metadata-stats"
Expand All @@ -1199,7 +1200,7 @@ <h1 style="margin-bottom: 0px">
</ol>
<b>Example</b>
<pre>
&lt;script src="icecast-metadata-stats-0.1.9.min.js"&gt;&lt;/script&gt;
&lt;script src="icecast-metadata-stats-0.1.10.min.js"&gt;&lt;/script&gt;
&lt;script&gt;
const onStats = (stats) =&gt; {
document.getElementById("stats").innerHTML = stats.icy.StreamTitle;
Expand Down Expand Up @@ -1245,16 +1246,16 @@ <h1 style="margin-bottom: 0px">

const onCodecUpdate = (audioCodecData, duration) => {
audioInfoEl.shadowRoot.innerHTML = `<div style="margin: 5px 0;">Last Updated: ${formatTime(
duration
duration,
)}</div><table style="margin-top: 5px; border-collapse: collapse;">${Object.entries(
audioCodecData
audioCodecData,
)
.sort(([a], [b]) => a.localeCompare(b))
.reduce(
(acc, [key, value]) =>
acc +
`<tr><td style="padding-right: 10px;">${key}</td><td>${value}</td></tr>`,
""
"",
)}</table>`;
};

Expand All @@ -1264,9 +1265,9 @@ <h1 style="margin-bottom: 0px">
acc +
`<tr><td class="time">${formatTime(timestampOffset)}</td>` +
`<td class="metadata"><pre>${formatMetadata(
metadata
metadata,
)}</pre></td></tr>`,
`<th>Update Time&nbsp</th><th class="metadata-header">Up Next</th>`
`<th>Update Time&nbsp</th><th class="metadata-header">Up Next</th>`,
);
};

Expand Down Expand Up @@ -1302,7 +1303,7 @@ <h1 style="margin-bottom: 0px">
// gets a new instance of the IcecastMetadataPlayer and starts a timer
const getIcecastMetadataPlayer = () => {
const enableCodecUpdate = document.getElementById(
"isCodecUpdateEnabled"
"isCodecUpdateEnabled",
).checked;

options = getFormOptions();
Expand All @@ -1320,7 +1321,7 @@ <h1 style="margin-bottom: 0px">
onCodecUpdate: enableCodecUpdate && onCodecUpdate,
onError,
onSwitch,
}
},
);

icecastMetadataPlayer.addEventListener("metadata", (...args) => {
Expand Down Expand Up @@ -1369,12 +1370,12 @@ <h1 style="margin-bottom: 0px">
)
metadataEl.innerHTML = currentMetadata;
},
{ once: true }
{ once: true },
);

icecastMetadataPlayer.switchEndpoint(
options.endpoint.split(","),
options
options,
);
}
});
Expand Down
22 changes: 0 additions & 22 deletions src/demo/public/icecast-metadata-player-1.16.3.common.min.js

This file was deleted.

This file was deleted.

This file was deleted.

23 changes: 0 additions & 23 deletions src/demo/public/icecast-metadata-player-1.16.3.main.min.js

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

22 changes: 0 additions & 22 deletions src/demo/public/icecast-metadata-player-1.16.3.synaudio.min.js

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit f710987

Please sign in to comment.