@livo-tv/blocks 0.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/index.cjs +307 -114
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +82 -1
- package/dist/index.d.ts +82 -1
- package/dist/index.js +246 -57
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -439,6 +439,86 @@ interface AvatarEditorDialogProps {
|
|
|
439
439
|
}
|
|
440
440
|
declare function AvatarEditorDialog({ value, onChange, onSave, displaySize, editorSize, outputSize, placeholder, editLabel, dialogTitle, acceptText, cancelText, savingText, savedText, successMessage, errorMessage, className, editorLabels, }: AvatarEditorDialogProps): React.JSX.Element;
|
|
441
441
|
|
|
442
|
+
type CurtainKind = "image" | "video";
|
|
443
|
+
interface CurtainStageProps {
|
|
444
|
+
kind: CurtainKind;
|
|
445
|
+
url: string;
|
|
446
|
+
alt?: string;
|
|
447
|
+
className?: string;
|
|
448
|
+
/** When true, video curtains show a static frame instead of looping. */
|
|
449
|
+
reducedMotion?: boolean;
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* Waiting-room backdrop: a still image or a muted looping video.
|
|
453
|
+
* Honors `prefers-reduced-motion` (or an explicit `reducedMotion` prop)
|
|
454
|
+
* by freezing video on the first frame.
|
|
455
|
+
*/
|
|
456
|
+
declare function CurtainStage({ kind, url, alt, className, reducedMotion, }: CurtainStageProps): React.JSX.Element;
|
|
457
|
+
|
|
458
|
+
interface WaitingRoomCurtain {
|
|
459
|
+
kind: CurtainKind;
|
|
460
|
+
url: string;
|
|
461
|
+
}
|
|
462
|
+
interface WaitingRoomProps {
|
|
463
|
+
title: string;
|
|
464
|
+
organizationName?: string | null;
|
|
465
|
+
organizationImage?: string | null;
|
|
466
|
+
startsAt?: number | null;
|
|
467
|
+
durationSeconds?: number | null;
|
|
468
|
+
curtain?: WaitingRoomCurtain | null;
|
|
469
|
+
nowMs?: number;
|
|
470
|
+
labels?: {
|
|
471
|
+
startsIn?: string;
|
|
472
|
+
started?: string;
|
|
473
|
+
duration?: (minutes: number) => string;
|
|
474
|
+
};
|
|
475
|
+
className?: string;
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* Public waiting-room chrome: curtain (or calm branded fallback), title,
|
|
479
|
+
* org avatar, and a countdown to `startsAt`.
|
|
480
|
+
*/
|
|
481
|
+
declare function WaitingRoom({ title, organizationName, organizationImage, startsAt, durationSeconds, curtain, nowMs, labels, className, }: WaitingRoomProps): React.JSX.Element;
|
|
482
|
+
|
|
483
|
+
type CastFramework = {
|
|
484
|
+
CastContext: {
|
|
485
|
+
getInstance: () => {
|
|
486
|
+
setOptions: (options: {
|
|
487
|
+
receiverApplicationId: string;
|
|
488
|
+
autoJoinPolicy?: string;
|
|
489
|
+
}) => void;
|
|
490
|
+
requestSession: () => Promise<unknown>;
|
|
491
|
+
getCurrentSession: () => {
|
|
492
|
+
loadMedia: (request: unknown) => Promise<unknown>;
|
|
493
|
+
} | null;
|
|
494
|
+
};
|
|
495
|
+
};
|
|
496
|
+
};
|
|
497
|
+
type ChromeCast = {
|
|
498
|
+
media: {
|
|
499
|
+
DEFAULT_MEDIA_RECEIVER_APP_ID: string;
|
|
500
|
+
MediaInfo: new (url: string, contentType: string) => unknown;
|
|
501
|
+
LoadRequest: new (media: unknown) => unknown;
|
|
502
|
+
};
|
|
503
|
+
AutoJoinPolicy?: {
|
|
504
|
+
ORIGIN_SCOPED: string;
|
|
505
|
+
};
|
|
506
|
+
};
|
|
507
|
+
declare global {
|
|
508
|
+
interface Window {
|
|
509
|
+
cast?: {
|
|
510
|
+
framework?: CastFramework;
|
|
511
|
+
};
|
|
512
|
+
chrome?: {
|
|
513
|
+
cast?: ChromeCast;
|
|
514
|
+
};
|
|
515
|
+
__onGCastApiAvailable?: (available: boolean) => void;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
declare function loadCastSender(): Promise<void>;
|
|
519
|
+
/** Cast an HLS master playlist to the default Chromecast media receiver. */
|
|
520
|
+
declare function castHlsUrl(hlsUrl: string): Promise<void>;
|
|
521
|
+
|
|
442
522
|
/**
|
|
443
523
|
* Playback error description, ported from the app's HLS player but stripped of
|
|
444
524
|
* Sentry. `@livo/blocks` must stay reporting-agnostic: the player surfaces
|
|
@@ -540,6 +620,7 @@ interface VideoPlayerLabels {
|
|
|
540
620
|
enterFullscreen?: string;
|
|
541
621
|
exitFullscreen?: string;
|
|
542
622
|
pictureInPicture?: string;
|
|
623
|
+
cast?: string;
|
|
543
624
|
settings?: string;
|
|
544
625
|
quality?: string;
|
|
545
626
|
auto?: string;
|
|
@@ -687,4 +768,4 @@ declare function useMediaQuery(query: string): boolean;
|
|
|
687
768
|
|
|
688
769
|
declare function cn(...inputs: ClassValue[]): string;
|
|
689
770
|
|
|
690
|
-
export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorLabels, type AvatarEditorProps, type BlocksLanguage, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, DEFAULT_EDITABLE_SECTION_LABELS, DataList, DataListItem, type DataListItemProps, type DataListProps, type DescribedPlaybackError, EditableSection, type EditableSectionLabels, type EditableSectionMode, type EditableSectionProps, type EditableSectionSlots, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, ErrorState, FeedVideoPlayer, type FeedVideoPlayerProps, FieldMessage, type FieldMessageProps, type HlsPlayerMode, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, type QualityLevel, SafeImage, type SafeImageProps, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type UseEditableSectionOptions, type UseEditableSectionResult, type UseFeedExclusivePlaybackResult, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describeAvResync, describePlaybackError, shouldRetryLiveEdge404, useEditableSection, useFeedExclusivePlayback, useHlsPlayback, useLanguageContext, useMediaQuery, usePlaybackStats };
|
|
771
|
+
export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorLabels, type AvatarEditorProps, type BlocksLanguage, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type CurtainKind, CurtainStage, type CurtainStageProps, DEFAULT_EDITABLE_SECTION_LABELS, DataList, DataListItem, type DataListItemProps, type DataListProps, type DescribedPlaybackError, EditableSection, type EditableSectionLabels, type EditableSectionMode, type EditableSectionProps, type EditableSectionSlots, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, ErrorState, FeedVideoPlayer, type FeedVideoPlayerProps, FieldMessage, type FieldMessageProps, type HlsPlayerMode, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, type QualityLevel, SafeImage, type SafeImageProps, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type UseEditableSectionOptions, type UseEditableSectionResult, type UseFeedExclusivePlaybackResult, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, WaitingRoom, type WaitingRoomCurtain, type WaitingRoomProps, castHlsUrl, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describeAvResync, describePlaybackError, loadCastSender, shouldRetryLiveEdge404, useEditableSection, useFeedExclusivePlayback, useHlsPlayback, useLanguageContext, useMediaQuery, usePlaybackStats };
|
package/dist/index.d.ts
CHANGED
|
@@ -439,6 +439,86 @@ interface AvatarEditorDialogProps {
|
|
|
439
439
|
}
|
|
440
440
|
declare function AvatarEditorDialog({ value, onChange, onSave, displaySize, editorSize, outputSize, placeholder, editLabel, dialogTitle, acceptText, cancelText, savingText, savedText, successMessage, errorMessage, className, editorLabels, }: AvatarEditorDialogProps): React.JSX.Element;
|
|
441
441
|
|
|
442
|
+
type CurtainKind = "image" | "video";
|
|
443
|
+
interface CurtainStageProps {
|
|
444
|
+
kind: CurtainKind;
|
|
445
|
+
url: string;
|
|
446
|
+
alt?: string;
|
|
447
|
+
className?: string;
|
|
448
|
+
/** When true, video curtains show a static frame instead of looping. */
|
|
449
|
+
reducedMotion?: boolean;
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* Waiting-room backdrop: a still image or a muted looping video.
|
|
453
|
+
* Honors `prefers-reduced-motion` (or an explicit `reducedMotion` prop)
|
|
454
|
+
* by freezing video on the first frame.
|
|
455
|
+
*/
|
|
456
|
+
declare function CurtainStage({ kind, url, alt, className, reducedMotion, }: CurtainStageProps): React.JSX.Element;
|
|
457
|
+
|
|
458
|
+
interface WaitingRoomCurtain {
|
|
459
|
+
kind: CurtainKind;
|
|
460
|
+
url: string;
|
|
461
|
+
}
|
|
462
|
+
interface WaitingRoomProps {
|
|
463
|
+
title: string;
|
|
464
|
+
organizationName?: string | null;
|
|
465
|
+
organizationImage?: string | null;
|
|
466
|
+
startsAt?: number | null;
|
|
467
|
+
durationSeconds?: number | null;
|
|
468
|
+
curtain?: WaitingRoomCurtain | null;
|
|
469
|
+
nowMs?: number;
|
|
470
|
+
labels?: {
|
|
471
|
+
startsIn?: string;
|
|
472
|
+
started?: string;
|
|
473
|
+
duration?: (minutes: number) => string;
|
|
474
|
+
};
|
|
475
|
+
className?: string;
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* Public waiting-room chrome: curtain (or calm branded fallback), title,
|
|
479
|
+
* org avatar, and a countdown to `startsAt`.
|
|
480
|
+
*/
|
|
481
|
+
declare function WaitingRoom({ title, organizationName, organizationImage, startsAt, durationSeconds, curtain, nowMs, labels, className, }: WaitingRoomProps): React.JSX.Element;
|
|
482
|
+
|
|
483
|
+
type CastFramework = {
|
|
484
|
+
CastContext: {
|
|
485
|
+
getInstance: () => {
|
|
486
|
+
setOptions: (options: {
|
|
487
|
+
receiverApplicationId: string;
|
|
488
|
+
autoJoinPolicy?: string;
|
|
489
|
+
}) => void;
|
|
490
|
+
requestSession: () => Promise<unknown>;
|
|
491
|
+
getCurrentSession: () => {
|
|
492
|
+
loadMedia: (request: unknown) => Promise<unknown>;
|
|
493
|
+
} | null;
|
|
494
|
+
};
|
|
495
|
+
};
|
|
496
|
+
};
|
|
497
|
+
type ChromeCast = {
|
|
498
|
+
media: {
|
|
499
|
+
DEFAULT_MEDIA_RECEIVER_APP_ID: string;
|
|
500
|
+
MediaInfo: new (url: string, contentType: string) => unknown;
|
|
501
|
+
LoadRequest: new (media: unknown) => unknown;
|
|
502
|
+
};
|
|
503
|
+
AutoJoinPolicy?: {
|
|
504
|
+
ORIGIN_SCOPED: string;
|
|
505
|
+
};
|
|
506
|
+
};
|
|
507
|
+
declare global {
|
|
508
|
+
interface Window {
|
|
509
|
+
cast?: {
|
|
510
|
+
framework?: CastFramework;
|
|
511
|
+
};
|
|
512
|
+
chrome?: {
|
|
513
|
+
cast?: ChromeCast;
|
|
514
|
+
};
|
|
515
|
+
__onGCastApiAvailable?: (available: boolean) => void;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
declare function loadCastSender(): Promise<void>;
|
|
519
|
+
/** Cast an HLS master playlist to the default Chromecast media receiver. */
|
|
520
|
+
declare function castHlsUrl(hlsUrl: string): Promise<void>;
|
|
521
|
+
|
|
442
522
|
/**
|
|
443
523
|
* Playback error description, ported from the app's HLS player but stripped of
|
|
444
524
|
* Sentry. `@livo/blocks` must stay reporting-agnostic: the player surfaces
|
|
@@ -540,6 +620,7 @@ interface VideoPlayerLabels {
|
|
|
540
620
|
enterFullscreen?: string;
|
|
541
621
|
exitFullscreen?: string;
|
|
542
622
|
pictureInPicture?: string;
|
|
623
|
+
cast?: string;
|
|
543
624
|
settings?: string;
|
|
544
625
|
quality?: string;
|
|
545
626
|
auto?: string;
|
|
@@ -687,4 +768,4 @@ declare function useMediaQuery(query: string): boolean;
|
|
|
687
768
|
|
|
688
769
|
declare function cn(...inputs: ClassValue[]): string;
|
|
689
770
|
|
|
690
|
-
export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorLabels, type AvatarEditorProps, type BlocksLanguage, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, DEFAULT_EDITABLE_SECTION_LABELS, DataList, DataListItem, type DataListItemProps, type DataListProps, type DescribedPlaybackError, EditableSection, type EditableSectionLabels, type EditableSectionMode, type EditableSectionProps, type EditableSectionSlots, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, ErrorState, FeedVideoPlayer, type FeedVideoPlayerProps, FieldMessage, type FieldMessageProps, type HlsPlayerMode, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, type QualityLevel, SafeImage, type SafeImageProps, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type UseEditableSectionOptions, type UseEditableSectionResult, type UseFeedExclusivePlaybackResult, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describeAvResync, describePlaybackError, shouldRetryLiveEdge404, useEditableSection, useFeedExclusivePlayback, useHlsPlayback, useLanguageContext, useMediaQuery, usePlaybackStats };
|
|
771
|
+
export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorLabels, type AvatarEditorProps, type BlocksLanguage, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type CurtainKind, CurtainStage, type CurtainStageProps, DEFAULT_EDITABLE_SECTION_LABELS, DataList, DataListItem, type DataListItemProps, type DataListProps, type DescribedPlaybackError, EditableSection, type EditableSectionLabels, type EditableSectionMode, type EditableSectionProps, type EditableSectionSlots, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, ErrorState, FeedVideoPlayer, type FeedVideoPlayerProps, FieldMessage, type FieldMessageProps, type HlsPlayerMode, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, type QualityLevel, SafeImage, type SafeImageProps, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type UseEditableSectionOptions, type UseEditableSectionResult, type UseFeedExclusivePlaybackResult, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, WaitingRoom, type WaitingRoomCurtain, type WaitingRoomProps, castHlsUrl, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describeAvResync, describePlaybackError, loadCastSender, shouldRetryLiveEdge404, useEditableSection, useFeedExclusivePlayback, useHlsPlayback, useLanguageContext, useMediaQuery, usePlaybackStats };
|