Compare commits

...

1 Commits

Author SHA1 Message Date
Eric Bailey a9112f4073 Add Riverside support 2025-01-06 13:45:44 -06:00
2 changed files with 11 additions and 0 deletions
+10
View File
@@ -25,6 +25,7 @@ export const embedPlayerSources = [
'giphy',
'tenor',
'flickr',
'riverside',
] as const
export type EmbedPlayerSource = (typeof embedPlayerSources)[number]
@@ -45,6 +46,7 @@ export type EmbedPlayerType =
| 'giphy_gif'
| 'tenor_gif'
| 'flickr_album'
| 'riverside'
export const externalEmbedLabels: Record<EmbedPlayerSource, string> = {
youtube: 'YouTube',
@@ -57,6 +59,7 @@ export const externalEmbedLabels: Record<EmbedPlayerSource, string> = {
appleMusic: 'Apple Music',
soundcloud: 'SoundCloud',
flickr: 'Flickr',
riverside: 'Riverside',
}
export interface EmbedPlayerParams {
@@ -85,6 +88,13 @@ export function parseEmbedPlayerFromUrl(
return undefined
}
if (urlp.hostname.endsWith('riverside.fm')) {
return {
type: 'riverside',
source: 'riverside',
playerUri: urlp.href,
}
}
// youtube
if (urlp.hostname === 'youtu.be') {
const videoId = urlp.pathname.split('/')[1]
+1
View File
@@ -106,6 +106,7 @@ const schema = z.object({
appleMusic: z.enum(externalEmbedOptions).optional(),
soundcloud: z.enum(externalEmbedOptions).optional(),
flickr: z.enum(externalEmbedOptions).optional(),
riverside: z.enum(externalEmbedOptions).optional(),
})
.optional(),
invites: z.object({