audio streaming app plyr.fm
38
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 35 lines 955 B view raw view rendered
1--- 2title: oembed 3sidebarTitle: oembed 4--- 5 6# `backend.api.oembed` 7 8 9oEmbed endpoint for track, playlist, and album embeds. 10 11Enables services like Leaflet.pub (via iframely) to discover 12and use our embed player instead of raw HTML5 audio. 13 14 15## Functions 16 17### `get_oembed` [source](https://github.com/zzstoatzz/plyr.fm/blob/main/backend/src/backend/api/oembed.py#L154) 18 19```python 20get_oembed(url: Annotated[str, Query(description='URL to get oEmbed data for')], db: Annotated[AsyncSession, Depends(get_db)], maxwidth: Annotated[int | None, Query()] = None, maxheight: Annotated[int | None, Query()] = None, format: Annotated[str, Query()] = 'json') -> OEmbedResponse 21``` 22 23 24Return oEmbed data for a track, playlist, or album URL. 25 26This enables services like iframely to discover our embed player. 27 28 29## Classes 30 31### `OEmbedResponse` [source](https://github.com/zzstoatzz/plyr.fm/blob/main/backend/src/backend/api/oembed.py#L28) 32 33 34oEmbed response for embeds. 35