Skip to content

Commit 661266d

Browse files
committed
fix(android): can not open video in external app
ref: react/react-native#32311
1 parent 8162a6f commit 661266d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

apps/mobile/src/modules/entry-list/templates/EntryVideoItem.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ const openVideo = async (url: string) => {
130130
if (openLinksInExternalApp) {
131131
const schemeLink = parseSchemeLink(url)
132132
try {
133-
const isInstalled = !!schemeLink && (await Linking.canOpenURL(schemeLink))
134-
if (schemeLink && isInstalled) {
133+
if (schemeLink) {
135134
await Linking.openURL(schemeLink)
136135
return
137136
}
@@ -141,6 +140,6 @@ const openVideo = async (url: string) => {
141140
}
142141

143142
// Fallback to opening in in-app browser
144-
const formattedUrl = transformVideoUrl({ url }) || url
143+
const formattedUrl = openLinksInExternalApp ? url : transformVideoUrl({ url }) || url
145144
openLink(formattedUrl)
146145
}

0 commit comments

Comments
 (0)