Use the current embed player via TIDALs OEmbed API. #191
No reviewers
Labels
No Label
1000k
100k
10k
200k
20k
500k
50k
5k
75k
backend
blocked:design
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
P1
P2
P3
question
scope:intl
scope:nip
scope:query_tracing
scope:ux
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Kieran/snort#191
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "tidal-embed-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The code was using the old unmaintained embed player. This updates the code to use the newest one via our OEmbed API: https://oembed.tidal.com/?url=https://tidal.com/browse/track/145596276
The OEmbed API delivers the embed with sizes for different embed types.
dangerouslySetInnerHTML
is a bit sad, if wanted I can refactor to instead read out sizes from the delivered iframe and set those on a newYea not a fan of injecting random HTML onto the page, why does this not work as an iframe?
I mean why do the sizes need to be set on the iframes, can we not just set the width of the frame and the height is dynamic, that is what we do for spotify/youtube/soundcloud etc and it works fine
Embeds from different services does not support a limitless amount of sizes. Their respective OEmbed API will report a supported recommended size. Dynamic heights aren't possible since the contents from an iframe can not affect the height of the iframe.
You can check the OEmbed spec here; all music-player embeds use the rich type -> https://oembed.com/#section2:~:text=2.3.4.4.-,The%20rich%20type,-This%20type%20is
Updated now to use the source and height on a constructed iframe instead. (width 100 %)
Really nice, thanks!