OfficeDev / skype-android-app-sdk-samples

This repo contains Android samples powered by the Microsoft Skype for Business App SDK. Samples developed using Android Studio
MIT License
51 stars 52 forks source link

MMVRSurfaceView is black #35

Open guoGavin opened 7 years ago

guoGavin commented 7 years ago

At first, it can work well, but when I turn off the phone screen and then open and found the video can not play properly, MMVRSurfaceView is black. I know that the onSurfaceTextureDestroyed method is called when the screen is turned off. So MMVRSurfaceView was destroyed. But when I open the screen again, how do you see the video?

My solution is to create a new MMVRSurfaceView when the screen is open again. But I don't think it's a good idea. So what should I do?

当我使用MMVRSurfaceView显示对方的视频的时候,刚开始它可以工作的很好,但是当我关闭手机屏幕之后再次打开手机屏幕,会发现MMVRSurfaceView是黑色的,不会再显示出来视频了。 通过分析,我知道在手机屏幕关闭的时候,MMVRSurfaceView的onSurfaceTextureDestroyed方法被调用了,然后它就被销毁了。 那么,当我再次打开手机,我要怎么样才能够看到视频呢? 我现在的解决方法是,当手机屏幕再次打开的时候,重新创建一个MMVRSurfaceView。 但是我不认为这是一个好的办法,我应该怎么办?

rahulyaa commented 7 years ago

@guoGavin Is this with the sample SfbDemo or healthCare apps? Or is this in your own app?

guoGavin commented 7 years ago

@rahulyaa SfbDemo(GuestMeetingJoin) and my app are like this.

guoGavin commented 7 years ago

Before closing the screen,it can work well;关闭屏幕之前,看起来不错: screenshot_20170316-103332 Close the screen and open again. MMVRSurfaceView is black;关闭屏幕之后再次打开,就是黑色的,看不到视频: screenshot_20170316-103345

screenshot_20170316-103438

Moreover, the last picture can be seen, my own preview video is obviously deformed;最后一张图片可以很明显的看出来,我自己的预览视频是明显变形了的。

guoGavin commented 7 years ago

@rahulyaa I need to solve this problem quickly. and i really need to realize the function of multi person video.#36. However, due to the time difference, our communication efficiency is very low. If you can, I hope you can send mail to me(gavinguo@yipinapp.com).Thanks.

我真的很需要快速解决这个问题。 而且我很需要实现多人视频的功能#36. 但是,由于时差问题,我们沟通的效率很低下,如果可以,请给我发送邮件(gavinguo@yipinapp.com).谢谢

rahulyaa commented 7 years ago

@guoGavin What happens to your activity (or fragment) when the phone is turned off? Is the activity destroyed? You will need to handle this case in your activity lifecycle handlers.

guoGavin commented 7 years ago

@rahulyaa Please see my sample. https://github.com/guoGavin/SkypeAndroidSdkDemo

and,not is phone turned off,is mobile phone screen is off,for example, click on the power button。 另外,不是手机关闭了,而是手机屏幕关闭了,比如按了一下手机电源键。

Here are some log information, hope to help: logs.txt

In app, after joining meeting and opening video activity when we minimize the application by pressing home key in android, it's not showing the participant video when we open it back from recent apps. Self video is working. like this problem

guoGavin commented 7 years ago

@rahulyaa Any suggestions?

rahulyaa commented 7 years ago

Like I mentioned before: What happens to your activity (or fragment) when the phone is turned off? Is the activity destroyed? You will need to handle this case in your activity lifecycle handlers.

guoGavin commented 7 years ago

Not destroyed. execute the onPause() method My solution is to create a new MMVRSurfaceView when the onRestart() method is called. But I think it's too much of a waste of resources.

Can you run to see my sample?

fabiomercorillo commented 7 years ago

I have same problem

j7arsen commented 7 years ago

I have same problem