Stream from canvas.captureStream fails to play when send over webrtc

Viewed 21

I am working on a conferencing app using webrtc. To reduce bandwidth I draw the webcam streams on canvas and resize the canvas based on the number of the active webcams in the room. So far so good and it was (is) working until chrome updated to version 104 on android devices ...
The stream from canvas plays fine on the source device but when send to other peers over webrtc the stream gets stuck in loading status ...
This only happens in some devices and not all of them ...
after some debugging and testing I figured it out that its because of the canvas size !
Since I am resizing the canvas, it does not have a standard video size and I think that where it fails ... I tried setting the canvas size multiples of 32 and 64, some sizes works with 32 and some with 64 but not all ...

This is only happening in Android Chrome version 104+, I tried looking at the changelogs for this release to see what has changed, but could not find anything. So anyone knows what change could have cause this and how to fix it ?

I have also enabled simulcast for the streams a,d when its disabled most of the sizes works but still not all of them !

0 Answers
Related