-
Notifications
You must be signed in to change notification settings - Fork 1
Stream recording UI #1387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Stream recording UI #1387
Conversation
| label = I18n.t("helpers.label.stream_recording.record_all_days") | ||
| all = [label, "", {selected: val.blank?, data: {mandatory: true}}] | ||
| opts = StreamRecording::ALL_DAYS.map { |d| [I18n.t("date.day_names")[d % 7], d] } | ||
| options_for_select(opts.prepend(all), val) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working around some slim-select-y limitations here. Made the Every Day option an empty string, and mark it as mandatory, so you can't remove it.
But the "exclusive" code in the stimulus controller will remove it if you select Wednesday or something.
|
|
||
| export default class extends Controller { | ||
| static values = { groupSelect: Boolean, exclusive: Array } | ||
| static values = { exclusive: Array } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upgraded to slim select V3 to fix some pre-existing bugs with the "exclusive" value. (Only used on the episode planner, when you select "every other week" vs "week 1" etc).
Had to make a few changes here to get everything working again.
| bucket: s3_bucket, | ||
| cache_control: "max-age=60", | ||
| content_type: "application/json", | ||
| key: S3_KEY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully okay to just make this file public? Nothing secret in there.
| record_days: s.record_days, | ||
| record_hours: s.record_hours, | ||
| callback: PorterUtils.callback_sqs | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open to feedback on what this config is.
….prx.org into feat/stream_recording
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cavis created a new Sass file for slim-select styles
| --ss-bg-color: #{$white}; | ||
| --ss-font-color: #{$gray-700}; | ||
| --ss-border-color: #{$border-color}; | ||
| --ss-border-radius: #{$border-radius}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here lie the Slim Select overrides, allowed me to remove a few lines from the old form.scss file
| // overrides Slim Select v3 component styles | ||
| --ss-bg-color: #{$navy-900}; | ||
| --ss-font-color: #{$white}; | ||
| --ss-border-color: #{$border-color-dark}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dark mode overrides are now much simpler with these.
| .ss-option.ss-highlighted, | ||
| .ss-option:not(.ss-disabled).ss-selected { | ||
| --ss-bg-color: #{$white}; | ||
| color: var(--ss-bg-color); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except this. WHY!?!
Might be worth a gripe to the maintainer.
Starting on the UI to configure a live stream recording:
This will end up written to a config file at
s3://prx-feed/streams.json, containing something like:[ { "id": 1, "podcast_id": 284, "job_id": "284/1/:date/:hour", "url": "http://backbonenetworks.streamguys.com/remixxm.mp3", "start_date": "2025-12-17", "end_date": null, "record_days": null, "record_hours": [13, 19, 22], "callback": "https://sqs.us-east-1.amazonaws.com/123456/ryan_feeder_fixer_callback" } ]Open to suggestions on the format/contents of that JSON. Figuring out what's enough for the orchestration layer to make hourly recordings, and callback them to Feeder SQS.