I want render HTML (from react) code in react native using react-native-render-html package everything works fine but audio and video not working

185 views Asked by At

Hi I'm trying to render html code which include video and audio tags everything rendering perfectly but audio and video tag not rendering. Here my code is

const HtmlContentCoponent = ({sourceData}) => {
const source = {
html: `<div class=\"se-component \" contenteditable=\"false\"><h1>hiii</h1><figure> 
<audio controls=\"true\" origin-size=\",\" src=\"https://nf1f8200- 
a.akamaihd.net/downloads/ringtones/files/mp3/tumse-mohabbat-hai-slowed-reverb-hindi- 
song-59437.mp3\" data-index=\"0\" data-file-name=\"tumse-mohabbat-hai-slowed-reverb- 
hindi-song-59437.mp3\" data-file-size=\"0\" class=\"active\" style=\"\"></audio> 
</figure></div>`
};

 return (
 <View style={{backgroundColor: 'white'}}>
  <RenderHtml
    source={source}
    tagsStyles={tagsStyles}
  />
 </View>
);
};

export default HtmlContentCoponent;

and this is the page enter image description here

just see in source h1 tag and audio both are available but h1 only rendering.

0

There are 0 answers