Skip to content

Commit

Permalink
Changing URL for YouTube stream
Browse files Browse the repository at this point in the history
  • Loading branch information
EricTendian committed Nov 28, 2024
1 parent 678a629 commit 1e6060e
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 3,091 deletions.
15 changes: 0 additions & 15 deletions app/routes/audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,6 @@ export default class AudioRoute extends Route {
const response = await fetch('/data/audio_data/online_streams.json');
model.streams = await response.json();

try {
const ytResponse = await fetch(
'https://worker.erictendian.workers.dev/youtubelive/',
);
const ytResponseData = await ytResponse.text();

const parser = new DOMParser();
const doc = parser.parseFromString(ytResponseData, 'text/html');
model.youtubeEmbedUrl = doc.querySelector(
'meta[property="og:video:secure_url"]',
).attributes.content.value;
} catch (e) {
console.error('Error fetching YouTube data', e);
}

return model;
}
}
2 changes: 1 addition & 1 deletion app/templates/audio.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div>
<h3>General #ChicagoScanner feed</h3>
<p>Scanner feed of ISP Dist. Chicago, Metra PD, CPD Citywides, various CFD incident channels, Marine 16, and aviation UNICOM. Scan list subject to change.<br><br><a href="https://www.youtube.com/@EricTendian/live" target="_blank" rel="noopener noreferrer">View on YouTube</a></p>
<iframe id="youtube-player" title="YouTube scanner feed" src="{{this.model.youtubeEmbedUrl}}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
<iframe id="youtube-player" title="YouTube scanner feed" src="https://crimeisdown.com/youtubelive" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div>
<div class="mt-3">
<div class="accordion" id="accordion">
Expand Down
12 changes: 0 additions & 12 deletions worker/.editorconfig

This file was deleted.

6 changes: 0 additions & 6 deletions worker/.prettierrc

This file was deleted.

Loading

0 comments on commit 1e6060e

Please sign in to comment.