react-native-gifted-chat: renderMessageVideo and renderMessageAudio doesn't work on expo ~42.0.1.
I had to make changes to the library on the node_modules itself in order to implement audio and video messages functionality, I at first after looking at the messages that said, “You need to provide your own implementation by using renderMessageVideo/renderMessageAudio prop,” I thought I had some sign of hope, but later found out they don’t work . Later I checked on the main component, and found out that, these two functions don’t exist.
Steps to Reproduce / Code Snippets
<GiftedChat
renderMessageVideo={yourRenderedComponentVideo}
renderMessageAudio={yourRenderedComponentAudio}
/>
and they don’t work, we see some blank messages or the text message as written before…
Expected Results
Expected results are pretty simple that, the renderMessageVideo and renderMessageAudio props are supposed to be working, and by sending the _props, we could render the message.
Additional Information
- Nodejs version: v14.17.3
- React version: 16.13.1
- expo version: ~42.0.1
- react-native-gifted-chat version: ^0.16.3
- Platform(s) (iOS, Android, or both?): both
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 15
Are you using typescript? Because when I go to the defaultProp types I do see renderMessageImage but I do not see renderMessageVideo. This is on version 0.16.3
@aamiryameen @DaanOolbekkink Thank you so much guys for co-operating, but a some time ago, I could successfully implement it using only
renderMessageVideo
andrenderMessageAudio
functions with theexpo-av
package of expo, Link to it is here : https://docs.expo.dev/versions/latest/sdk/av/ I created separate audio video components to render, and used those same function as props in the same <GiftedChat/> tag, and it works!!! Something like this for video (you can figure out the audio part ; ) ):And then :
Later all this, make sure you reload the whole app again! Else it might not work!!!
And same for audio! Thank you guys, once again : ), If you need any more help regarding this, let me know!
Also, my suggestion would be to update expo-cli and everything, along with updating of the package again if the issue keeps happening!
Okay so I don’t know why that is not working. This is my renderMessageVideo…
I am using functional components so you might need to change some things to fit it in your code
I have used it with react native vimeo player so I would think yes it does. My recommendation however is to load a thumbnail as an image in the bubble and then clicking the image would open a modal or new screen with the actual player. 😄
I have the same problem, any solution?