Skip to content
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

[C-3710] Continuous playback #7278

Merged
merged 2 commits into from
Jan 23, 2024

Conversation

dylanjeffers
Copy link
Contributor

@dylanjeffers dylanjeffers commented Jan 22, 2024

Description

Improves user experience by continuously playing tracks from a lineup without the need to touch the UI. You may think this was already a feature, but in fact, this only worked if the user manually scrolls the lineup to get more tracks.

Now a user can just hit play on their feed/trending/favorites, forget about the ui, and be able to continue to get music from the lineup. Once those are exhausted, we fetch suggested tracks, and continue on that forever.

Before, after 5 to 10 tracks the queue fetches suggested tracks and we lose the original lineup context. This is a SIGNIFICANT improvement to our playback experience!

Getting this to work was a bit tricky, since we need to know which lineup we are playing. The basic heuristic ive used is to just get the current track source, and use that to fetch more from that lineup. In the future we can improve this.

How Has This Been Tested?

Play a track on feed
Dont scroll lineup
Skip 5 or so tracks
Confirm the lineup has fetched the next batch of tracks visually, and playback is continuing.

Limitations

Shuffle mode is kinda fake, since itll shuffle the first n tracks, then fetch more, and continue on with shuffle. We may want to turn this behavior off with shuffle, or improve it further.

Future

This exposes major flaws with the existing lineup implementation. We must rethink lineups in the future to have a better experience.

Copy link

vercel bot commented Jan 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
audius-web-ssr ⬜️ Ignored (Inspect) Visit Preview Jan 23, 2024 1:31am

@dylanjeffers dylanjeffers changed the title [C-3710] Fetch more lineup near end of queue [C-3710] Continuous playback improvements Jan 22, 2024
@dylanjeffers dylanjeffers changed the title [C-3710] Continuous playback improvements [C-3710] Continuous playback Jan 22, 2024
@dylanjeffers dylanjeffers requested review from a team and Kyle-Shanks and removed request for a team January 22, 2024 23:52
Copy link
Contributor

@amendelsohn amendelsohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is 🔥

Such a huge win!!

const isNearEndOfQueue = index + 3 >= length

if (isNearEndOfQueue) {
yield* call(fetchLineupTracks)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@@ -166,6 +166,14 @@ export function* watchPlay() {

if (!playActionTrack) return

const length = yield* select(getLength)
const index = yield* select(getIndex)
const isNearEndOfQueue = index + 3 >= length
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

genius

const lineup = yield* select(lineupEntry.selector, currentArtist?.handle)

if (lineup.hasMore) {
const offset = lineup.entries.length + lineup.deleted + lineup.nullCount
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any danger of this getting out of sync? I think we should be good since it's based purely off of the state, but we could also calculate this in the reducer just to be safe

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so i copied this from the lineup, so yes there is a chance of the logic getting out of sync, if we forget to change in both places. but hoping from the perspective of redux state, both sides (ui and saga) can work together effectively here.

@audius-infra
Copy link
Collaborator

@dylanjeffers dylanjeffers merged commit d9300bf into main Jan 23, 2024
19 of 21 checks passed
@dylanjeffers dylanjeffers deleted the dj-c-3710-fetch-lineup-near-end-of-queue branch January 23, 2024 20:11
audius-infra pushed a commit that referenced this pull request Jan 27, 2024
[a15e3d8] [PAY-2400] Break CoinflowWithdrawModal out into its own modal (#7357) Marcus Pasell
[f4fe982] Limit query length in verbose check (#7360) Raymond Jacobson
[949cdd2] [INF-650] Fix PublicSite history bug (#7356) Sebastian Klingler
[b0ce935] Run docker prune synchronously at the end of jobs (#7355) Danny
[0860c5d] [PAY-2401] Update button/copy of withdrawal (#7351) Raymond Jacobson
[bf769ec] [PAY-40] Make Rewards Modal Scrollable (#7353) Marcus Pasell
[5b0c364] Bump version to 0.6.24 audius-infra
[e693ef6] Use rendezvous when gossiping ops (#7354) Steve Perkins
[5dc8965] Fix redis hoisting in relay (#7349) Theo Ilie
[f1359a9] Update pg_restore to v15 (#7346) Theo Ilie
[07bab83] [C-3729] Move top genre query to use aggregates (#7342) Raymond Jacobson
[8d7720e] Fix docker push-ddex (#7347) Michelle Brier
[c38f442] [C-3728] Add dominant genre support to aggregate_user (#7340) Raymond Jacobson
[0513090] Fix sign up rate-limiting issues (#7344) Dylan Jeffers
[1bcc737] Don't prune most recent images (#7337) Danny
[0cad4ed] [PAY-2354] Specify quality during track download (#7341) Reed
[e73e441] DDEX cleanup and remove unused dependencies (#7339) Michelle Brier
[610fd56] [C-3641] Clear sign up data on log out (#7338) JD Francis
[4f27e83] [INF-571] Add sentry logging to SSR worker (#7331) Sebastian Klingler
[808b195] [PAY-2386] Block add to playlist for library on stream gated (#7299) Raymond Jacobson
[8a38728] [C-3234] Update today date to include time so that tracks uploaded on the same day don't mix (#7335) Kyle Shanks
[e467583] Add mongoDB to ddex webapp (#7330) Michelle Brier
[bd56e2b] Remove GA from protodash build process (#7334) Theo Ilie
[0bdf871] Fix staging web deploy (#7332) Sebastian Klingler
[e19666f] SSR Follow ups (#7318) Sebastian Klingler
[3540e14] Merge "Link SP to Audius Profile" feature branch to main (#7298) nicoback2
[c49b8fc] Bump version to 0.6.23 audius-infra
[138ed9b] TCR Updates: cron and db init (#7324) alecsavvy
[318acec] PROTO-1580: use redis to store aao state and allow initial relay (#7310) alecsavvy
[69299ad] Fix Attestations (again) (#7329) Marcus Pasell
[7d11bd8] Hide audio onramp when all supported providers are not allowed (#7302) Raymond Jacobson
[83efcbe] Misc New Sign Up Select Artist fixes (#7325) JD Francis
[88b6c6a] [PAY-2238] Improve balance display with recovery process (#7322) Randy Schott
[8e53a7f] Fix sign up saga bug on native (#7323) JD Francis
[27f6438] Fix existing discovery attestations (#7320) Marcus Pasell
[692f60a] Update cash copy (#7321) Raymond Jacobson
[c00fad8] Build openresty image on release (#7319) Theo Ilie
[7b53f91] ⚠️ [INF-547] SSR Track Page (#7213) Sebastian Klingler
[d557552] Change redis DN key (#7317) Theo Ilie
[1329083] [QA-733] Dedupe albums and playlists on profile (#7316) Andrew Mendelsohn
[dcc2f61] [PAY-2394][PAY-2391][PAY-2393] Address misc coinflow withdrawal ux (#7312) Raymond Jacobson
[6005824] Fix payment router recovery indexing using wrong address for comparison (#7314) Randy Schott
[d58ac8f] Prune the docker cache more frequently (#7315) Danny
[19ea929] Fix hash routing check in index.html (#7297) Raymond Jacobson
[6b31794] Fix all caps metric name (#7313) JD Francis
[562b388] [C-3668] Improve artist previews (#7308) Dylan Jeffers
[87803d7] [C-3722] Fix scrolling on create login details page (#7311) JD Francis
[0f96753] [PAY-2376] Stems & Downloads section UI visibility according to access (#7275) Reed
[e732d23] [PAY-2372] Web summary table header clickable (#7293) Reed
[d3c5f17] add timeout to ga for faster healthz response (#7296) alecsavvy
[e8707b8] [C-3667] Improve preview hint, remove duplicate navigation (#7307) Dylan Jeffers
[e7863e0] [C-3702 C-3672] Fix sign-up cover-photo issues (#7301) Dylan Jeffers
[ad279c9] [PAY-2389] Perform recoveries via payment router to allow indexing (#7306) Randy Schott
[3b997ca] Bump version to 0.6.22 audius-infra
[0f9430c] Increase crudr sweep interval, add caching. (#7292) Steve Perkins
[439f10b] Add ChallengesApi, RewardManager to SDK (#7026) Marcus Pasell
[3f55d5d] [C-3718] Fix follow-artist metrics (#7305) Dylan Jeffers
[66bd8ab] [C-3712, C-3719] Fix loading of suggested tracks (#7303) Andrew Mendelsohn
[79bd9bc] [C-3697, C-3713, C-3714] Copy updates; add missing overflow menu items (#7304) Andrew Mendelsohn
[8211796] Remove download progress on ios (#7300) Reed
[8c1293d] [C-3575] Moar sign up metrics (#7288) JD Francis
[17f3a6c] [Web][Libs] QA for Link Audius Profile to Dashboard Wallet feature [C-3683] [C-3686] (#7283) nicoback2
[236f571] Fix logged out state track access (#7291) Saliou Diallo
[e78dfb9] Fix logged out state track access on client (#7295) Saliou Diallo
[e87fd07] [PAY-2327] Add stem upload row (#7277) Saliou Diallo
[8e9c243] [C-3703] Reroute away from signup if user already has 3 followees (#7294) JD Francis
[9cd65c6] Re-land #2 of ts env (#7290) Raymond Jacobson
[d9300bf] [C-3710] Continuous playback (#7278) Dylan Jeffers
[460c381] [C-3707] Remove text-input font scale (#7280) Dylan Jeffers
[f401fb3] [C-3716] Update sign up recovery flow for new sign up (#7289) Kyle Shanks
[f118aeb] [PAY-2368] Add lockAmount flag to web withdrawals (#7286) Randy Schott
[4b87ece] [C-3679] Filter out unowned collections from add modal and drawer (#7244) Andrew Mendelsohn
[2245cb9] [PAY-2375] Tag @audius in purchase tweets (#7274) Reed
[3887389] Revert "[C-3510] Re-land typescript env changes (#7272)" (#7287) Raymond Jacobson
[00ca201] use abis within healthz (#7276) alecsavvy
[c75590f] Bump version to 0.6.21 audius-infra
[1023c8d] Updates deprecated vscode settings (#7273) Randy Schott
[1730644] [PAY-2238][PAY-2242][PAY-2248] Adds more robust payment router indexing support (#7249) Randy Schott
[e147d2e] [C-3510] Re-land typescript env changes (#7272) Raymond Jacobson
[4e1b7fe] Fix mobile track pages due to collection check (#7285) Dylan Jeffers
[582c37d] DDEX standalone node (#7281) Michelle Brier
[568d677] Misc Sign Up QA Fixes (#7260) JD Francis
[85061bd] [C-3699, C-3700] Edit albums on mobile (#7270) Andrew Mendelsohn
[0e88152] Use defaults for trending track checks (#7279) Theo Ilie
[20f9ebd] [C-3689] Fix follow artists not happening if you wait too long on sign up (web) (#7257) JD Francis
[a8cca23] Fix desktop track tile title width (#7269) Dylan Jeffers
[81e8c8a] [DVRL-3] optimize image assets (#7238) Sam Gutentag
[df20e33] PROTO-1607: healthz rm GA dependency (#7264) alecsavvy
[fd8929e] [C-3696] Fix lineups and recommendations (#7263) Dylan Jeffers
[bbad3fe] Revert "[C-3510] Move mobile env from system config to ts env (#6935)" (#7268) Raymond Jacobson
[ac119fe] Make ddex tRPC Dockerfile run (#7261) Theo Ilie
[87f81b6] Attempt to circumvent docker-compose regression (#7266) Danny
[b48855b] Bump version to 0.6.20 audius-infra
[739ddf8] qm sync: handle non-200 status, more tests. (#7265) Steve Perkins
[64e38bc] [PAY-2367] Add migration to repair tips (#7252) Raymond Jacobson
[1ebec24] [C-3510] Move mobile env from system config to ts env (#6935) Raymond Jacobson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants