如何在React Native中在视频上添加文本和表情符号

问题描述

我正在使用react-native-camera,正在录制 30 seconds的视频。录制完视频后,我将显示该录制用户的预览。还允许他在上面添加一些文字或表情符号。在视频的任何位置添加文字和表情符号都可以正常工作。您也可以拖动它们。但是我的问题是,当视频保存到数据库中时,如何将这些文本和表情符号粘贴到视频上,下次播放时应如何将表情符号和文本粘贴在一起。 问候

  <View style={styles.mediaPlayer}>
    <TouchableWithoutFeedback
      onPress={() => {
        setPaused(!pause);
      }}>
      <Video
        paused={pause}
        source={{
          uri: video,}}
        style={{height: '100%'}}
        volume={0.4}
        resizeMode="cover"
        repeat={true}
      />
    </TouchableWithoutFeedback>
    <Draggable
      x={200}
      y={300}
      minX={0}
      minY={0}
      style={{position: 'absolute',top: 10}}
      maxY={500}
      maxX={500}>
      <Text
        style={{
          fontSize: 90,color: 'white',}}>
        {emojiIcon}
      </Text>
    </Draggable>
    {isEditable && (
      <Draggable
        x={200}
        y={300}
        minX={0}
        minY={0}
        maxX={480}
        maxY={480}
        onPress={() => {
          setEditable(!isEditable);
        }}>
        <TextInput
          multiline
          numberOfLines={3}
          maxLength={30}
          placeholder="write something"
          value={text}
          onChangeText={(e) => {
            setText(e);
          }}
          placeholderTextColor={'white'}
          style={{
            borderBottomWidth: text === '' ? 2 : 0,borderBottomColor: primaryColor,fontFamily: Fonts.CenturyRegular,width: '70%',fontSize: 15,padding: 0,}}
        />
      </Draggable>
    )}
  </View>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)