You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

37 lines
1.1 KiB

import React from "react";
import { View, Text, Dimensions } from "react-native";
import tw from "tailwind-rn";
import { Video } from "expo-av";
const {width} = Dimensions.get("window");
export default function VideoContent({ data }) {
const [status, setStatus] = React.useState({});
const video = React.useRef(null);
return (
<View style={tw("w-full flex-col mt-5")}>
<Text
style={[
tw("w-full text-right text-green-900 mb-4"),
{ fontSize: width / 34, fontFamily: "bold" },
]}
>
{'موضوع:' + ' ' + data.name}
</Text>
<View style={tw("flex flex-col")}>
<Video
ref={video}
style={{ width: "100%", height: (width * 9) / 16 - 16 }}
source={{
uri: `https://dnvn.ir/api/v1/file/${data.fileIds}`,
}}
useNativeControls
resizeMode="cover"
// onFullscreenUpdate={setOrientation}
isLooping
onPlaybackStatusUpdate={(status) => setStatus(() => status)}
/>
</View>
</View>
);
}