File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,6 +115,7 @@ interface MediaVideoPlayerProps {
115115 readonly thumbnailKey : string ;
116116 readonly thumbnailVisible ?: boolean ;
117117 readonly unavailable ?: boolean ;
118+ readonly unavailableDetail ?: string ;
118119 readonly expanded ?: boolean ;
119120 readonly autoPlay ?: boolean ;
120121 readonly paused ?: boolean ;
@@ -163,7 +164,11 @@ function MediaVideoPlayerContent(props: MediaVideoPlayerProps) {
163164 />
164165 ) : null }
165166 { props . unavailable ? (
166- < AppText className = "text-sm text-white/80" > Video unavailable</ AppText >
167+ < AppText className = "text-center text-sm text-white/80" >
168+ { props . unavailableDetail
169+ ? `Video unavailable. ${ props . unavailableDetail } `
170+ : "Video unavailable" }
171+ </ AppText >
167172 ) : props . uri === null ? (
168173 < AppActivityIndicator color = "#ffffff" accessibilityLabel = "Loading video" />
169174 ) : (
Original file line number Diff line number Diff line change 1+ import { MISSING_FILE_ACCESS_MESSAGE } from "@t3tools/client-runtime/state/assets" ;
12import { createContext , useContext } from "react" ;
23import { MediaVideoPlayer } from "../../components/MediaVideoPlayer" ;
34import { useAssetUrlState , useRefreshAssetUrl } from "../../state/assets" ;
@@ -39,6 +40,11 @@ export function ThreadMarkdownVideo(props: {
3940 thumbnailKey = { thumbnailKey }
4041 thumbnailVisible = { visible }
4142 unavailable = { "resource" in source && asset . _tag === "Failure" }
43+ unavailableDetail = {
44+ "resource" in source && asset . _tag === "Failure" && asset . reason === "missing-file-access"
45+ ? MISSING_FILE_ACCESS_MESSAGE
46+ : undefined
47+ }
4248 actionsSource = { source . actionsSource }
4349 />
4450 ) ;
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ export function MediaVideoPlayer({
139139 stateClassName ,
140140 ) }
141141 >
142- < span className = "inline-flex items-center gap-1.5" >
142+ < span data-thread-find-ignore className = "inline-flex items-center gap-1.5" >
143143 < TriangleAlertIcon aria-hidden className = "size-3.5 shrink-0" />
144144 { [ "Video unavailable" , label , unavailableDetail ] . filter ( Boolean ) . join ( " · " ) }
145145 </ span >
You can’t perform that action at this time.
0 commit comments