Cordova-plugin-iosrtc: stream.getVideoTracks()[0].enabled should blank off the stream?

Created on 19 Nov 2019  路  9Comments  路  Source: cordova-rtc/cordova-plugin-iosrtc

Expected behavior

getVideoTracks()[0].enabled = false

should blank off the screen (just sending a black image). Ideal for muting the camera.
Same behavior can be seen with webrtc in chrome

Observed behavior

getVideoTracks()[0].enabled = false

just pauses/freezes the screen. The last video frame can be seen

Steps to reproduce the problem

Create a stream with getUserMedia and attach it to a video element

Set

stream.getVideoTracks()[0].enabled

to false

Platform information

  • Cordova version: 8.1.2
  • Cordova ios version: 4.5.5
  • Plugin version: 6.0.3
  • iOS version: 13.2.3
  • Xcode version: 11.2.1
PluginMediaStreamRenderer bug enhancement

All 9 comments

We would need to clear the texture buffer to be blank instead of last frame.

Im not considering that a bug. I will see what I can do.

Cool and thanks! Hint: In previous versions (< 5.x) the video was black when enabled was set to false.

Maybe you can somehow reuse the code there.

@derMani this part of the implementation did not change, WebRTC.framework did however, so that might be where the issue lies. Thx for input.

I had the same problem, the stream stuck in the last frame

I have tested #427 and the video is paused when getVideoTracks()[0].enabled = false

I may have an idea, I may disable rendering all together when enabled false.

Hey @hthetiot, any update on this? 鉂わ笍

lol nope @oscarvadillog

Was this page helpful?
0 / 5 - 0 ratings