OfficeDev / skype-ios-app-sdk-samples

This repository contains Objective C and Swift samples powered by the Microsoft Skype for Business App SDK.
MIT License
46 stars 23 forks source link

canStart is sometimes false in 1.3 #64

Open codingcronus opened 7 years ago

codingcronus commented 7 years ago

After upgrading to 1.3 the canStart property in:

is sometimes false. This means that the app receives video from the Skype for Business desktop application, but not the other way around.

codingcronus commented 7 years ago

I have isolated the bug. It seems that the SDK gets in a faulty state if the meeting url has been re-used. It works the first time, then if the user ends the meeting and re-joins it, the user video is not sent to the agent (I have re-created the bug in the sample Banking App for swift as well) and the preview-view remains hidden.

I have attached two screenshots of the app and the desktop app where you can see the issue.

img_3056

skype-desktop

4brunu commented 7 years ago

I was about to report the same issue. In the desktop app, sometimes show's the video from the mobile devices, sometimes it show's a black screen in desktop app, sometime it appears like your screenshot. It's random, I couldn't find a pattern.

4brunu commented 7 years ago
- (void)conversationHelper:(SfBConversationHelper *)avHelper videoService:(SfBVideoService *)videoService didChangeCanStart:(BOOL)canStart {
    if (canStart) {
        if (_viewSelfVideo.hidden) {
            _viewSelfVideo.hidden = NO;
        }

        NSError *error = nil;
        [videoService start:&error];
        if (error) {
            NSLog(@"videoService start: %@", error.localizedDescription);
        }
    }
}

The following code printed the following log videoService start: The operation couldn’t be completed. E_TooManyRequests (E2-3-5)

codingcronus commented 7 years ago

@jovillas Can you please label this as a bug and give us an ETA? This is unfortunately yet another critical bug and renders my app for danish municipalities almost useless.

As @4brunu also states, the bug seems to occur at random.

codingcronus commented 7 years ago

@jovillas et. al.: Our customer reports that they constantly experience audio, but no video. Sometimes video is received by the desktop application, but the app does not receive video from the desktop application, sometimes it's the other way around. Only very seldom will video work both ways :(

I have spent so much time bug tracking this library that I'm starting to get a bit tired (consultant, spent +100 hours debugging - hours that I have to pay for myself...)

albert0m commented 6 years ago

yeah, first time I tried the sdk I found the same exact problem. Did anyone solve this? I don't see the github issue section very active from their side.

albert0m commented 6 years ago

I was able to reproduce this bug instantly on an iPad AIR 2, with iOS 11, just running the example for the first time. I opened the video area, closed it, reopened it. Two participants with the same name inside the meeting, no video view on the app.

albert0m commented 6 years ago
schermata 2018-06-01 alle 12 20 42

This happens when I connect two different devices to the same meeting. Only the first one can transmit the video. This is taken straight from the sample from here.

codingcronus commented 6 years ago

We still experience this bug as well and it is so frustrating that nothing has been done about it. If only the SDK had a "retry connect" method or something like that, we could work around it.

albert0m commented 6 years ago

the really frustrating thing is that it can be reproduced just by running the example on two different devices, not some weird unreproducible bug. We fortunately found this at the beginning of the development, we won't be pushing this to our clients for sure. Btw, is anyone from the Skype team reading this?

OABsoftware commented 5 years ago

By now we're almost 9 months later and still this bug is present. Can we expect an updated version of the SDK anytime soon?

albert0m commented 5 years ago

I honestly don't think they really care about the development of the SDK (last commit a year ago - no answers to the issues). I see this is more of a "we have a sort-of-working SDK and it's more than enough".

OABsoftware commented 5 years ago

Sad but true.

Nevertheless I found a workaround:

Apply the following observers: videoService?.addObserver(self, forKeyPath: "canStart", options: [.initial], context: &kvo) videoService?.addObserver(self, forKeyPath: "canSetPaused", options: [.initial], context: &kvo) selfVideo?.addObserver(self, forKeyPath: "isPaused", options: [.initial], context: &kvo)

Then use this in your observerValue method: case "canStart", "canSetPaused", "isPaused": let isPaused = (selfVideo?.isPaused == true) let canSetPaused = (videoService?.canSetPaused == true) let canStart = (videoService?.canStart == true) videoStart.isEnabled = (isPaused && canSetPaused) || canStart

It works...

albert0m commented 5 years ago

thank you! we never pursued the integration in the end, just because if there are other bugs in the future, we are on our own :(

OABsoftware commented 5 years ago

True... May I ask which alternative you picked?

codingcronus commented 5 years ago

Yeah, it's a joke. Unfortunately on our behalf 👎

We have ditched the Skype for Business SDK as well. I have spent countless (actually not countless, but +400 hours!) of debugging, tracing memory leaks, testing work arounds etc. and finally convinced our client that the SfB SDK is too unstable and non-supported.

I have now created a native WebRTC solution which works perfectly. I will share my library (NativeScript so it works cross platform for iOS, Android and Web) shortly.

OABsoftware commented 5 years ago

Cool!