Image transfer through javascript sdk

128 views
Skip to first unread message

Vinit Asher

unread,
Jul 2, 2020, 8:03:21 AM7/2/20
to Ant Media Server
Hello!,
I'm trying to use data channel to transfer images. I used the tutorial on the website to transfer images but it didn't work. I need the help for the same. It would be great if there's a working demo of it available.
Secondly, as I read we can we also read other files as binary and send data over the data channels.
Thank you for the help.

Ant Media

unread,
Jul 2, 2020, 11:17:51 AM7/2/20
to vas...@skandha.in, ant-medi...@googlegroups.com
Hi Vinit Asher,

Please check following blog:

and check this file about chat and file transfer. They should be enough:

Best Regards,
Can

PS 1: 2000th instance celebration campaign is ongoing. You still have a chance to join at https://antmedia.io/?add-to-cart=1576&coupon=CELEBRATE-2000-DISCOUNT
PS 2: Free or Paid one-on-one support and consultancy for your streaming project, please book at https://calendly.com/antmedia/

, Vinit Asher <vas...@skandha.in> wrote:
--
You received this message because you are subscribed to the Google Groups "Ant Media Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ant-media-serv...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-media-server/8183ef49-3aa4-41ff-924f-47bb6c63b2dbo%40googlegroups.com.
11722:1264838

Raju SaH

unread,
Jul 27, 2020, 3:19:51 AM7/27/20
to Ant Media Server


On Thursday, July 2, 2020 at 9:02:51 PM UTC+5:45, Ant Media wrote:
Hi Vinit Asher,

Please check following blog:

and check this file about chat and file transfer. They should be enough:

Best Regards,
Can

PS 1: 2000th instance celebration campaign is ongoing. You still have a chance to join at https://antmedia.io/?add-to-cart=1576&coupon=CELEBRATE-2000-DISCOUNT
PS 2: Free or Paid one-on-one support and consultancy for your streaming project, please book at https://calendly.com/antmedia/

On Thu, 2 Jul at 3:03 PM
, Vinit Asher <vas...@skandha.in> wrote:
Hello!,
I'm trying to use data channel to transfer images. I used the tutorial on the website to transfer images but it didn't work. I need the help for the same. It would be great if there's a working demo of it available.
Secondly, as I read we can we also read other files as binary and send data over the data channels.
Thank you for the help.
--
You received this message because you are subscribed to the Google Groups "Ant Media Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ant-medi...@googlegroups.com.

Hello,
but it throws Error at Receiver end:

VM11:1 Uncaught SyntaxError: Unexpected token � in JSON at position 51
at JSON.parse (<anonymous>)
at handleImageData (Conference:502)
at WebRTCAdaptor.callback (Conference:851)
at RTCDataChannel.dataChannel.onmessage (webrtc_adaptor.js:807)

I tried to separate the header & image in JSON but it didn't worked !
Thank you for the help!
thans11722:1264838sdfassdad
th

Ant Media

unread,
Jul 27, 2020, 7:23:56 PM7/27/20
to raju...@gmail.com, ant-medi...@googlegroups.com
Hi Raju SaH,

chat.html works in normal circumstances in p2p communication, I tried it just now in Chrome browser.
It seems you modified it for a conference but probably there was a problem in the adaptation. Please use chat.html page to communicate with other chat.html page without any modification. And write us the error you get if you get any.

Best Regards,
Can

PS : Free or Paid one-on-one support and consultancy for your streaming project, please book at https://calendly.com/antmedia/

, Raju SaH <raju...@gmail.com> wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to ant-media-serv...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-media-server/d415796c-0370-407f-8830-b83e7d46d143o%40googlegroups.com.
15027:1264838

Raju SaH

unread,
Jul 28, 2020, 7:40:43 AM7/28/20
to Ant Media Server
Hi Can,

I have used the same chat.html file, only changed websocket address. But got same Error

And I want to use chat and file(Image) transfer in video conferencing too, what should i do ?
Thank You!
, Raju SaH <raju...@gmail.com> wrote:

Ant Media

unread,
Jul 28, 2020, 1:44:45 PM7/28/20
to raju...@gmail.com, ant-medi...@googlegroups.com
Hi Raju SaH,

can you send me your Ant Media Server URL address with unchanged chat.html installed? I need to reproduce and debug the issue myself.

Best Regards,
Can

PS : Free or Paid one-on-one support and consultancy for your streaming project, please book at https://calendly.com/antmedia/

On Tue, 28 Jul at 2:40 PM
, Raju SaH <raju...@gmail.com> wrote:
Hi Can,

I have used the same chat.html file, only changed websocket address. But got same Error

And I want to use chat and file(Image) transfer in video conferencing too, what should i do ?
Thank You!

On Tuesday, July 28, 2020 at 5:08:56 AM UTC+5:45, Ant Media wrote:
Hi Raju SaH,

chat.html works in normal circumstances in p2p communication, I tried it just now in Chrome browser.
It seems you modified it for a conference but probably there was a problem in the adaptation. Please use chat.html page to communicate with other chat.html page without any modification. And write us the error you get if you get any.

Best Regards,
Can

PS : Free or Paid one-on-one support and consultancy for your streaming project, please book at https://calendly.com/antmedia/

On Mon, 27 Jul at 10:19 AM
, Raju SaH <raju...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "Ant Media Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ant-media-serv...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-media-server/545d7e2b-f912-443c-acce-ec8b28d98402o%40googlegroups.com.
15027:1264838

Raju SaH

unread,
Jul 30, 2020, 6:12:14 AM7/30/20
to Ant Media Server
Hi Can,

Please find the Attachment, 
Now send_image.html file throwing error: "connection closed" just after Joining.

But we are using same url: wss://media.nhancelms.com:5443/LiveApp/websocket  for Video Conferencing and it's working fine.

Question:
I want to use chat and file(Image) transfer in video conferencing too, what should i do ?

Thank You!

, Raju SaH <raju...@gmail.com> wrote:
send_image.html
Reply all
Reply to author
Forward
0 new messages