mirror of
https://github.com/KoalaSat/nostros.git
synced 2024-09-28 22:30:41 +00:00
disable video (#466)
This commit is contained in:
commit
4db2267ec6
@ -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 <></>
|
||||
}
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user