I am trying to implement video and audio chat in my ionic app. I tried many solutions but they work on either android or ios but not in a hybrid app. also some solutions provide Cordova code, how to convert that Cordova code to ionic?
Asked
Active
Viewed 1,671 times
2
-
see daily.co they have a great API to do just this – Aaron Saunders May 24 '20 at 18:03
1 Answers
0
the "WebRTC" is something you must know about! search it in Google. And as a solution I really recommend you to try Twilio. the docs can be read at: https://www.twilio.com/docs
and you can add it in your project using npm or yanr and then use it with the prochased accountSid and authoken.
we used it in our project and it works perfectly!

Mahdi Zarei
- 5,644
- 7
- 24
- 54
-
1hello, I tried twilio in following way, but by local as well as participants camera not displaying(all other tasks works fine) Video.connect(token, {name: room_name}).then(function (room) { Video.createLocalVideoTrack().then(function (track) { $("#localVideo").append(track.attach()); }); room.on('participantConnected', function (participant) { $("#patientVideo").append(participant.track.attach()) }) }); HTML
-
-
@shubhamshinde `{name: room_name, video: {width: this.platform.width()}}` – Mahdi Zarei May 30 '20 at 15:17
-
@shubhamshinde I used it in 3 different projects and it works just fine. follow the docs again with more attention. and if my answer was useful to you make it the correct answer. – Mahdi Zarei May 30 '20 at 15:20
-
its working fine on browser, but on android device it gives error as **ERROR Error: Uncaught (in promise): NotReadableError: Could not start video source** – shubham shinde May 31 '20 at 15:20
-
@shubhamshinde I really need to see the code if you want me to help more – Mahdi Zarei Jun 02 '20 at 12:56
-
thnks @MahdiZarei its working fine now, i had forgotten to add video and audio permissions in config.xml – shubham shinde Jun 02 '20 at 17:58
-