Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stream.getVideoTracks()[0].enabled should blank off the stream? #449

Open
derMani opened this issue Nov 19, 2019 · 10 comments
Open

stream.getVideoTracks()[0].enabled should blank off the stream? #449

derMani opened this issue Nov 19, 2019 · 10 comments

Comments

@derMani
Copy link

derMani commented Nov 19, 2019

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
@hthetiot
Copy link
Contributor

hthetiot commented Nov 19, 2019

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.

@derMani
Copy link
Author

derMani commented Nov 19, 2019

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.

@hthetiot
Copy link
Contributor

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

@hthetiot hthetiot self-assigned this Nov 19, 2019
@hthetiot hthetiot added this to the 6.0.x milestone Nov 21, 2019
@hthetiot hthetiot modified the milestones: 6.0.x, 7.0.x Feb 25, 2020
@yangjingyu
Copy link
Contributor

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

@hthetiot hthetiot modified the milestones: 7.0.x, 6.0.13 May 24, 2020
@hthetiot hthetiot modified the milestones: 6.0.13, 6.0.x Jul 10, 2020
@hthetiot hthetiot modified the milestones: 6.0.x, 8.0.x, 7.0.0, 6.0.14 Jul 15, 2020
@hthetiot
Copy link
Contributor

Related #427

@hthetiot hthetiot modified the milestones: 6.0.14, 6.0.x, 8.0.x Jul 17, 2020
@oscarvadillog
Copy link

oscarvadillog commented Jul 20, 2020

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

@hthetiot hthetiot added the bug label Jul 21, 2020
@hthetiot
Copy link
Contributor

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

@oscarvadillog
Copy link

Hey @hthetiot, any update on this? ❤️

@hthetiot
Copy link
Contributor

lol nope @oscarvadillog

@hthetiot hthetiot modified the milestones: 8.0.0, 8.0.x Nov 25, 2020
@hthetiot hthetiot modified the milestones: 8.0.x, 6.2.0 Jan 20, 2021
@hthetiot hthetiot modified the milestones: 6.2.0, triage Mar 1, 2021
@Bamasdf
Copy link

Bamasdf commented Apr 4, 2024

@hthetiot Is there any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants