-
Notifications
You must be signed in to change notification settings - Fork 29
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
Switch Publisher video between camera and static image #66
Comments
Yes, you can use "Publisher.PublishVideo = false" to stop publishing video (you can later set it to true to start publishing video again), however subscribers will just see an empty black screen for the publisher video feed, and not a selected image. I'll see about adding a sample to do this. Currently the closest sample I can see is the one for "ScreenSharing" although in this case an IVideoCapturer is created that captures the screen instead of a preselected fixed image. |
Thanks for the replay. `
` It doesn't use IVideoCapturer to create the Capturer. Could you give me some snippet about create IVideoCapturer and set Image as source? If I want to switch Capturer source, can I just reset Capturer to |
If you're talking about the ScreenSharing capturer, it does implement IVideoCapturer. This screensharing capturer is bit more complicated than what you require because it makes live captures of the screen. For your use case you would only need to read the fixed image once and use that inside the loop when periodically invoking frameConsumer.Consume(frame) I'll try to save some time to provide a sample |
@ntustzeus, would a sample app still be helpful? Or, is the recipe that Sergio provided sufficient? |
It would be helpful if we have sample code to change the Publisher streaming source. my workaround is change the Publisher component to a image component, so users just have image from UI. but when I download archives, it still has two streaming videos in the mp4 file. (In this case, we always have 1-1 communication) |
C#, WPF
I'm asked to implement a button that can switch Publisher streaming between camera and static image.
In video conferences, some users prefer not to display their real-time video to others, so they want to show a static image instead.
Is it possible that I just upload a user selected image and show only image to others?
From the sample code, it seems I can just set PublishVideo to stop outputing streaming video.
Publisher = new Publisher.Builder(context) { Capturer = capturerDevices[0].CreateVideoCapturer(VideoCapturer.Resolution.High, VideoCapturer.FrameRate.Fps30), Renderer = PublisherVideo }.Build(); Publisher.PublishVideo = true;
The text was updated successfully, but these errors were encountered: