Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

How to tell if video of remote participant is pause/unpause (APP SDK)? #39

Open
dcmen opened this issue Apr 19, 2017 · 4 comments
Open

Comments

@dcmen
Copy link

dcmen commented Apr 19, 2017

I use below code:
ParticipantVideo participantVideo = this.remoteParticipantLeader.getParticipantVideo();
participantVideo.subscribe(this.mmvrSurfaceView);

            participantVideo.addOnPropertyChangedCallback(new   Observable.OnPropertyChangedCallback() {
                @Override
                public void onPropertyChanged(Observable observable, int i) {
                    final ParticipantVideo ppVideo = (ParticipantVideo) observable;
                    ppVideo.isPaused()
                }
            });

But ppVideo.isPaused() alway return false. Plz help me

@guoGavin
Copy link

Me too.

participantVideo.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
	@Override
	public void onPropertyChanged(Observable observable, int i) {
		if(observable instanceof ParticipantVideo) {
			switch (i) {
				case ParticipantVideo.PARTICIPANT_VIDEO_PAUSED_PROPERTY_ID:
					//get pause status
					break;
			}
		}
};

@VincentH-Net
Copy link

VincentH-Net commented Apr 20, 2017

I have a workaround for this bug, which lets me detect remote video pause/unpause so I can hide or show the remote video view on remote video (un)pause.

I encountered this defect in the SfB Android App SDK, in all versions from 0.5 to the current 1.1
Hopefully the SfB App SDK for Android team will fix this soon! Are you watching guys?

Here is my workaround :

  1. Join the meeting with the remote video view hidden
  2. In the OnFrameRendered method of your MMVRSurfaceView.IMMVRCallback implementation, unhide the remote video view if it is hidden. Also set a flag that frames were rendered.
  3. Before you subscribe to an external video stream, clear the rendered flag
  4. In your external video paused property changed handler, check the rendered flag to see whether we are currently paused. Then simply toggle the remote video view visibility to the other state and set the rendered flag to match the new state.

This works reasonably well in most meeting connect flows but it is a bit brittle; missing paused changed messages can result in the video window remaining visible while external video is paused.

@rahulyaa
Copy link
Collaborator

@dcmen @guoGavin @VincentH-Net I will look into this one.
Thanks for reporting this.

@VincentH-Net
Copy link

@rahulyaa any progress on this? Is it fixed in 1.0.3?
(1.0.3 has been out for 10 days now but without any release notes on what was fixed / changed. 1.0.3 is not even mentioned on https://msdn.microsoft.com/en-us/skype/appsdk/releasenotes)

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

No branches or pull requests

4 participants