twilio / twilio-video.js

Twilio’s Programmable Video JavaScript SDK
https://www.twilio.com/docs/video/javascript
Other
571 stars 217 forks source link

Poor performance using Safari on iOS devices (Low FPS) #1448

Closed Galzk closed 2 years ago

Galzk commented 3 years ago

When using the app on an iOS device with Safari browser, we get very low FPS count.

Steps to reproduce the behavior:

  1. Enter a room using the Safari browser on an iOS device
  2. See bad performance on peer's screen
  3. Incoming video is smooth as expected on the iOS device itself

Expected behavior Video should be smooth and performant on all supported devices and platforms

Video

https://user-images.githubusercontent.com/34302982/113510142-f9307180-9561-11eb-81b6-0b62866ea317.mp4

Environment (please complete the following information):

More info -I've also tried running the "build" version (non-development) in order to narrow down the possibility of the issue only occurring when using the development code -No changes were made to the code -I think this issue is related to the twilio-video repo, but let's make sure -I've used 2 different networks in order to check, and in the video I use my cellular connectivity, and on the mac I'm on WIFI -When using https://appr.tc/ I get a smooth 30 FPS at all times (well, not considering the occasional frame drop). Both Safari on mac and on iOS

Galzk commented 3 years ago

My colleague @JonnieDev suggested that I run twilio-video quickstart and see if the issue is reproducible there as well:

https://user-images.githubusercontent.com/34302982/113557255-63025700-9606-11eb-8003-691100873d3a.mp4

At the start it's stuck and the FPS is low, but it gets better as time progresses. Could it be related to simulticast?

timmydoza commented 3 years ago

Thanks for the issue @Galzk!

I tried to reproduce this issue by connecting to a room (with simulcast enabled) on an iPhone 11, and the framerates seemed reasonable to me. Unfortunately I don't have an iPad that I can try this out on.

Since this issue is reproducible in two different apps, I'll see if I can get this issue transferred to the twilio-video SDK repo. This way the SDK engineers will be able to take a look.

In the meantime, is there a room SID that you can provide?

manjeshbhargav commented 3 years ago

Hi @Galzk ,

Thanks for writing in with your issue. Are you using Group Rooms or Peer-to-Peer Rooms. Also, can you share a Room SID for the test you ran? In the react app, you can get the Room SID by running twilioRoom.sid in the JS console after joining the Room.

Thanks,

Manjesh

Galzk commented 3 years ago

RM3b09eb2184c4369213dc91debce65746 Here you go I'm using the default preferences for room type I've done this:

  1. Log in with the iPad (safari)
  2. Log in with my mac (safari) - now the iPad feed is laggy like in the video
  3. Log in with Firefox on my android - my android feed and mac feed is working flawlessly, iPad feed is laggy on both device
manurana commented 3 years ago

I can confirm this on a vanilla twilio-react-app installation. Tried with 2 separate iPads, of different vintages, both had this issue. Could not see this on iPhones.

Something I noticed, the network level indicator is VERY LOW (1 bar) for the user on the iPad, in spite of being on a fast network.

agpl commented 2 years ago

Hello, I'm experiencing similar issue with iOS safari, but I just discovered that, whenever I use unmute button and say something it's smooth again. Is there any way to fix this issue? Here is my Room SID RMa6941f1176e404dbab2b7ef25c23d3ca

Network level indicators are ok (4-5 bars)

FYI I'm using https://github.com/twilio/twilio-video-app-react