twilio / video-quickstart-ios

Twilio Video Quickstart for iOS
https://www.twilio.com/docs/api/video
MIT License
465 stars 178 forks source link

remote video is not shown in one side using replayKit capture #465

Closed kjoe07 closed 4 years ago

kjoe07 commented 4 years ago

Before filing an issue please check that the issue is not already addressed by the following:

If this is an issue with the QuickStart itself, file it here. If this is an issue with the SDK or how to do something with the SDK please use twilio-video-ios instead.

Please ensure that you are not sharing any Personally Identifiable Information(PII) or sensitive account information (API keys, credentials, etc.) when reporting an issue.

Description

having both apps in iOS one can see the other screen but the second only show a blank screen

Steps to Reproduce

  1. connect to the room
  2. subscribe to video and audio

Code

func renderRemoteParticipant(participant : RemoteParticipant) -> Bool {
        let videoPublications = participant.remoteVideoTracks
        for publication in videoPublications {
            if let subscribedVideoTrack = publication.remoteTrack,
                publication.isTrackSubscribed {
                setupRemoteVideoView()
                subscribedVideoTrack.addRenderer(self.remoteView!)
                self.participant = participant
                return true
            }
        }
        return false
    }

in both apps is this method from quick connect example

Expected Behavior

when showing remote screen in both app should show the remote video

Actual Behavior

only the professor app can see the student screen but the student just white screen

Reproduces How Often

100%

Logs

Debug level logs are helpful when investigating issues. To enable debug level logging, add the following code to your application:

TwilioVideoSDK.setLogLevel(.debug) not set, 
Screen capture started.
Local identity profesor@ios.com
Number of connected Participants 1
Subscribed to EEbe4f4749bca6feC0bb825B12CE6a79 audio track for Participant test@ana.com
Subscribed to Screen video track for Participant test@ana.com
Unsubscribed from EEbe4f4749bca6feC0bb825B12CE6a79 audio track for Participant test@ana.com
Unsubscribed from Screen video track for Participant test@ana.com
Room room_2133, Participant test@ana.com disconnected

Versions

All relevant version information for the issue.

Video iOS SDK

[3.2.2 via CocoaPods]

Xcode

[11.3.1]

iOS Version

[13.3.1, IPADOS 13.4]

iOS Device

[ iPhone 7 Plus,IPAD 3] TeacherPruebaViewControlller.swift.zip StudentPruebaViewController.swift.zip

mrchauhan2802 commented 4 years ago

Same issue

piyushtank commented 4 years ago

Hi @kjoe07

Both the files have the same code except the student file stops capturing and recording explicitly when user starts sharing the screen.

Screen Shot 2020-04-01 at 8 24 33 PM

This looks like an application UI bug to me. But without having complete picture of the app, it's hard to say where exactly the bug is in the application code. Since the student's screen is visible on professor side, I recommend using student side ui code on both first and see if both the side screen is visible, once this is achieved, implement the logic around professor side. I recommend using our ReplayKit example for reference.

Best, Piyush

mrchauhan2802 commented 4 years ago

Hello Piyush

I have the same issue one side the person cant view and its happen when a user join when it creates the room it's working

What should is do #458

kjoe07 commented 4 years ago

Hi @kjoe07

Both the files have the same code except the student file stops capturing and recording explicitly when user starts sharing the screen.

Screen Shot 2020-04-01 at 8 24 33 PM

This looks like an application UI bug to me. But without having complete picture of the app, it's hard to say where exactly the bug is in the application code. Since the student's screen is visible on professor side, I recommend using student side ui code on both first and see if both the side screen is visible, once this is achieved, implement the logic around professor side. I recommend using our ReplayKit example for reference.

Best, Piyush

I was thinking the same and the I just copy paste the UI from storyBoard and the clase from the student class to the professor app. instantiate the same vc in both apps. I expected that no remote video in any app, but the behavior was the same as the code change, the stop recorder method I added because a crash occurs that says trying to record a recording when already was recording. the code is presented in both vc just in the teacher have another logic that I refactored making some test. I'm gonna try to see it I can log the metal log that says something like the horizontal resolution in 0.0000, don't have a clue if metal have a thing to do with the recording, but the log is weird to me. 1920x0.000 with a log. about the example of replayKit is that exactly what I'm following and quickexample that has the logic for the remote video. or a least I'm trying

mrchauhan2802 commented 4 years ago

You got any solution ?

kjoe07 commented 4 years ago

You got any solution ?

not at the moment

piyushtank commented 4 years ago

Hi @kjoe07,

Is it possible you create a branch to reproduce the problem or share a project here on a drive or by support ticket . I will be happy to take a look.

Best, Piyush

piyushtank commented 4 years ago

Hi @kjoe07,

Were you able to make progress on resolving the issue?

Best, Piyush

kjoe07 commented 4 years ago

the truth is not able to solve I changed a line of code to make the remote screen frame equals to UIScreen.main.bound an then then I can see the other profesor, but the profesor now cannot see the student, or making radon test one side is not able to wash the other side. Any tip why does the not working thruh a vpn

piyushtank commented 4 years ago

@kjoe07 To me, this sounds like an app UI bug. Since we are having lot of back and forth, I will be happy to hop on a quick call later today or tomorrow if you like. Let me know.

kjoe07 commented 4 years ago

ok I'll share some code with you and lets try it. let me know is you have some time to try, I all already added to the repo. mail me to test it and give you the login