Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat(web): pass defaultPlaybackSpeed through Share components

Richie McIlroy045d665679d0
diff --git a/apps/web/app/s/[videoId]/Share.tsx b/apps/web/app/s/[videoId]/Share.tsx
index 3285097a2..15b559bed 100644
--- a/apps/web/app/s/[videoId]/Share.tsx
+++ b/apps/web/app/s/[videoId]/Share.tsx
@@ -152,6 +152,7 @@ interface ShareProps {
viewerId?: string | null;
isEditProcessing: boolean;
recordingStopped?: boolean;
+ defaultPlaybackSpeed?: number;
initialAiData?: {
title?: string | null;
summary?: string | null;
@@ -268,6 +269,7 @@ export const Share = ({
viewerId,
isEditProcessing,
recordingStopped = false,
+ defaultPlaybackSpeed,
}: ShareProps) => {
const effectiveDate: Date = data.metadata?.customCreatedAt
? new Date(data.metadata.customCreatedAt)
@@ -502,6 +504,7 @@ export const Share = ({
showPlaybackStatusBadge={viewerId === data.owner.id}
isEditProcessing={isEditProcessing}
recordingStopped={recordingStopped}
+ defaultPlaybackSpeed={defaultPlaybackSpeed}
ref={playerRef}
/>
</div>
diff --git a/apps/web/app/s/[videoId]/_components/ShareVideo.tsx b/apps/web/app/s/[videoId]/_components/ShareVideo.tsx
index 0110c1828..4eca38d6f 100644
--- a/apps/web/app/s/[videoId]/_components/ShareVideo.tsx
+++ b/apps/web/app/s/[videoId]/_components/ShareVideo.tsx
@@ -57,6 +57,7 @@ export const ShareVideo = forwardRef<
showPlaybackStatusBadge?: boolean;
isEditProcessing: boolean;
recordingStopped?: boolean;
+ defaultPlaybackSpeed?: number;
}
>(
(
@@ -72,6 +73,7 @@ export const ShareVideo = forwardRef<
showPlaybackStatusBadge = false,
isEditProcessing,
recordingStopped = false,
+ defaultPlaybackSpeed,
},
ref,
) => {
@@ -313,6 +315,7 @@ export const ShareVideo = forwardRef<
videoSrc={videoSrc}
rawFallbackSrc={rawFallbackSrc}
duration={data.duration}
+ defaultPlaybackSpeed={defaultPlaybackSpeed}
showPlaybackStatusBadge={showPlaybackStatusBadge}
disableCaptions={areCaptionsDisabled ?? false}
disableCommentStamps={areCommentStampsDisabled ?? false}
@@ -346,6 +349,7 @@ export const ShareVideo = forwardRef<
mediaPlayerClassName="w-full h-full max-w-full max-h-full rounded-xl"
videoSrc={videoSrc}
duration={data.duration}
+ defaultPlaybackSpeed={defaultPlaybackSpeed}
disableCaptions={areCaptionsDisabled ?? false}
chaptersSrc={areChaptersDisabled ? "" : chaptersUrl || ""}
captionsSrc={areCaptionsDisabled ? "" : subtitleUrl || ""}