Skylar-Tech / node-red-contrib-matrix-chat

Matrix chat server support for Node-RED
GNU General Public License v3.0
31 stars 10 forks source link

Support Video & Audio message types #3

Open skylord123 opened 2 years ago

skylord123 commented 2 years ago

Currently we can only receive video & audio message types but not send them. These can be sent as files currently to get around this but wont render as a Video/Audio message.

jahegu commented 1 year ago

this would be really cool. Waiting for it

skylord123 commented 1 year ago

So I was going to add this but then thinking about it the send file & send image nodes should be combined instead and then have the ability to select what type you are sending when configuring the node. This will reduce the node count for this package and make the code a bit easier to maintain. We can then add the video & audio support at the same time. This will be less of a breaking change for people down the road.

But the good news is you can already do this if you turn global access on from the server config node and then use a function node. Here is a flow that will let you send either a video or audio file using this method: send-video-or-audio.json.txt image

Import that json into Node-RED and modify the first line of the Send Video and Send Audio nodes to match the userId of your client. That should work until we get official support for it.

Thanks!