disable video (#466)

This commit is contained in:
KoalaSat 2023-03-27 10:28:37 +00:00 committed by GitHub
commit 4db2267ec6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 18 deletions

View File

@ -7,7 +7,6 @@ import LnPreview from '../../LnPreview'
import { decode, type PaymentRequestObject, type TagsObject } from 'bolt11'
import { AppContext } from '../../../Contexts/AppContext'
import { navigate } from '../../../lib/Navigation'
import VideoPlayer from 'react-native-video-controls'
interface TextContentProps {
urls: Record<string, string>
@ -58,16 +57,9 @@ export const LinksPreview: React.FC<TextContentProps> = ({ urls, lnUrl }) => {
return require(DEFAULT_COVER)
}
const videoPreview = (
<VideoPlayer
source={{ uri: firstLink ?? '' }}
style={styles.videPlayer}
paused={true}
disableBack
disableVolume
disableFullscreen
/>
)
// const videoPreview = (
// <></>
// )
const linkPreview = (
<Card onPress={async () => firstLink && (await Linking.openURL(firstLink))}>
@ -147,11 +139,11 @@ export const LinksPreview: React.FC<TextContentProps> = ({ urls, lnUrl }) => {
</>
)
} else if (firstLink) {
if (urls[firstLink] === 'video') {
return videoPreview
} else {
return linkPreview
}
// if (urls[firstLink] === 'video') {
// return videoPreview
// } else {
return linkPreview
// }
} else {
return <></>
}

View File

@ -59,8 +59,6 @@
"react-native-svg": "^13.7.0",
"react-native-vector-icons": "^9.2.0",
"react-native-version-number": "^0.3.6",
"react-native-video": "^5.2.1",
"react-native-video-controls": "^2.8.1",
"react-native-webp-format": "^1.1.2",
"readable-stream": "^4.3.0",
"safe-buffer": "^5.2.1",