我想在页面上制作一个测验应用程序,我才刚刚开始。我想在主页上的api.js页面上显示视频数据,但是视频无法捕获,因为它捕获为文本。我该怎么办。我想看视频作为标题
import {getData} from './api';
import { Text, View, StyleSheet } from 'react-native';
class Decklist extends React.Component {
render() {
const decks = getData ()
return (
<View >
{Object.keys(decks).map((deck)=> {
const {title, question} = decks [deck]
return (
<View>
<Text> {title}</Text>
</View>
)
})}
</View>
);
}
}
api.js page:
animal: {
title: 'http://d23dyxeqlo5psv.cloudfront.net/big_buck_bunny.mp4',
question: [{
question: 'ne yapar',
answer: 'kapar',
trueanswer: 'true'
},