Files
bsky-social-app/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoEmbedInnerWeb.shared.ts
T
2026-08-13 22:13:49 +03:00

49 lines
1019 B
TypeScript

import {app} from '#/lexicons'
export type VideoEmbedInnerWebProps = {
embed: app.bsky.embed.video.View
active: boolean
setActive: () => void
onScreen: boolean
lastKnownTime: React.RefObject<number | undefined>
}
export class HLSUnsupportedError extends Error {
constructor() {
super('HLS is not supported')
}
}
export class VideoNotFoundError extends Error {
constructor() {
super('Video not found')
}
}
/**
* Fatal hls.js playback error. `detail` is the hls.js error details code
* (e.g. bufferAppendError), which buckets failures more usefully than the
* error message.
*/
export class HLSFatalError extends Error {
detail: string
type: string
diagnostics: Record<string, unknown>
constructor({
detail,
type,
cause,
diagnostics,
}: {
detail: string
type: string
cause: Error
diagnostics: Record<string, unknown>
}) {
super(cause.message, {cause})
this.detail = detail
this.type = type
this.diagnostics = diagnostics
}
}