flashphoner / wcs-ios-sdk-samples

7 stars 5 forks source link

Mute Audio' and 'Mute Video' are not available in WCSStream in FPWCSApi2Swift.framework #6

Closed sherbakova031193 closed 3 years ago

sherbakova031193 commented 3 years ago

Hello, Mute Audio' and 'Mute Video' are not available in WCSStream in FPWCSApi2Swift.framework

flashphoner commented 3 years ago

Good day. The methods WCSStream.muteAudio() and WCSStream.muteVideo() are declared in Swift framework headers (see FPWCSApi2Swift.xcframework\ios-arm64_armv7\FPWCSApi2Swift.framework\Headers\FPWCSApi2Stream.h file) and can be used in code. Please try to modify Two Way Streaming example code like this:

    fileprivate func onPublishing(_ stream:FPWCSApi2Stream) {
        publishButton.setTitle("STOP", for:.normal);
        changeViewState(publishButton, true);
        stream.muteAudio();
    }

The example is building successfully with latest iOS SDK build 2.6.27

sherbakova031193 commented 3 years ago

Thank you!