Closed jessielinden closed 2 weeks ago
This is a great improvement – thank you! It's marked draft, but I'm happy to merge it in now and we can figure it out over time. I'm sure we can find a way to make Spotify embeds look as good as YouTube/Vimeo embeds without too much extra work!
Awesome!
Proposal
Progress
For my own website, I customized what they provided by taking the following steps:
Embed
inits do (seturl
andtitle
) and what itsrender
function does into a functionembed
that returns a stringfunc embed(spotifyID: String, title: String, height: String = "520", type: SpotifyContentType = .track) -> String { if let test = URL(string: "https://open.spotify.com/embed/\(type.rawValue)/\(spotifyID)?utm_source=generator&theme=0") { let url = test.absoluteString let allowPermissions = "autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture" return #""# } else { fatalError("Failed to create Spotify URL from ID: (spotifyID).") } }