Comments (7)
I'll try to look into a fix for this... Essentially, builds were taking far too long on Cloudflare and I was also worried about hitting storage and file count limitations on Cloudflare Pages, hence moving the audio to separate storage.
You might be able to use something like Python's simple web server by running it in the audio/
folder and updating the audio URL prefix in the source code for now.
cd audio
python3 -m http.server 9000
Then update the following lines:
rail-announcements/src/announcement-data/AnnouncementSystem.ts
Lines 153 to 155 in d9a3ac7
to:
generateAudioFileUrl(fileId: string, customPrefix?: string): string {
return `http://localhost:9000/${customPrefix || this.FILE_PREFIX}/${this.processAudioFileId(fileId).replace(/\./g, '/')}.mp3`
}
from rail-announcements.
@davwheat
Just tried your suggested fix, but no luck.
And this error in the Python terminal:
@opott ➜ /workspaces/rail-announcements/audio (main) $ python3 -m http.server 9000
Serving HTTP on 0.0.0.0 port 9000 (http://0.0.0.0:9000/) ...
127.0.0.1 - - [16/Jun/2024 12:32:11] code 501, message Unsupported method ('OPTIONS')
127.0.0.1 - - [16/Jun/2024 12:32:11] "OPTIONS /SN/377/bing%20bong.mp3 HTTP/1.1" 501 -
127.0.0.1 - - [16/Jun/2024 12:32:11] code 501, message Unsupported method ('OPTIONS')
127.0.0.1 - - [16/Jun/2024 12:32:11] "OPTIONS /SN/377/stations/ABW.mp3 HTTP/1.1" 501 -
127.0.0.1 - - [16/Jun/2024 12:32:11] code 501, message Unsupported method ('OPTIONS')
127.0.0.1 - - [16/Jun/2024 12:32:11] "OPTIONS /SN/377/please%20mind%20the%20gap%20between%20the%20train%20and%20the%20platform.mp3 HTTP/1.1" 501 -
127.0.0.1 - - [16/Jun/2024 12:32:11] code 501, message Unsupported method ('OPTIONS')
127.0.0.1 - - [16/Jun/2024 12:32:11] "OPTIONS /SN/377/we%20are%20now%20approaching.mp3 HTTP/1.1" 501 -
from rail-announcements.
Sorry this took so long... This should be better now from changes in 9313af4 and 58ee9b5.
I've added some new info to the README for local development. In a nutshell, run these three in different terminals one after the other:
yarn develop
yarn develop:workers
yarn serve-audio
You can access the site on http://local.davw.network:8787
(local.davw.network
points to 127.0.0.1
and is needed for CORS stuff)
Let me know if you still have issues.
from rail-announcements.
Hi. Not sure if I am doing something wrong here, but when I follow the steps provided and access the site, I get an error when I open a page for an announcement system.
However, the Celia & Phil pages appear to work properly, as well as the live trains. I am only having issues opening the pages for onboard systems and the ScotRail station system.
from rail-announcements.
Oh, I just broke something with my latest change. Not your fault...
from rail-announcements.
Oh, that's alright. I thought I was doing something wrong! 😂
from rail-announcements.
That should also be fixed with the latest commit
from rail-announcements.
Related Issues (20)
- error while playing an announcement HOT 5
- [Live Trains] Doesn't handle calling points post-join
- North Pole International not selectable HOT 1
- RRB Ends - does not play on last calling point HOT 1
- [Phil/Celia] Add catering options for announcements HOT 2
- [Phil/Celia] Delay announcements on 120 minutes OR above are not playable HOT 2
- [Live Trains] Platform alteration announcements with live trains? HOT 1
- Bakerloo line is not announced (Elephant bound) HOT 3
- [Live Trains] Short platform info is wrong after an enroute formation change HOT 3
- [Live Trains] Map named services
- London Waterloo International not selectable HOT 2
- Not exactly an issue but are you working on adding any announcements by Emma Hignett? thx HOT 1
- [Live Trains] Short platforms don't get capped at split portion length
- [Daktronics] Some destinations are shown as 2nd/3rd even when too long
- Announcement for trains dividing. HOT 2
- Amey Phil/Celia - Not calling at stations reason
- Announcing omission HOT 1
- Rail annouments ID 847c2fefe3554892b0a795714a532865 HOT 1
- ScotRail Railways TOC doesn't work
- [TfL Elizabeth Line] Add Barking Riverside
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rail-announcements.