GithubHelp home page GithubHelp logo

Comments (7)

saroar avatar saroar commented on August 15, 2024 1

@mrfarukturgut sure i will share with you here
check this, please
https://gist.github.com/saroar/3eb128b158c42b300781331c97f3654c#file-webrtcclient-swift-L201
https://gist.github.com/saroar/5c5f2e61cf309b2360202f83723ba1c4#file-callmanager-swift-L655
it's my production ios app code

from webrtc-ios.

saroar avatar saroar commented on August 15, 2024

in WebRTC class i this this function but no luck

func removeVideo() {
        for transceiver in self.peerConnection.transceivers {
            if transceiver.mediaType == .video {
                transceiver.stop()
            }
        }
    }

i try this but it stop video but wheni come back video it does not work :(

from webrtc-ios.

stasel avatar stasel commented on August 15, 2024

Hi @saroar, In my demo I didn't put effort to do more advance functionalities such as turning on/off video.

in your example you can also try to stop capture in your video capture clas s

from webrtc-ios.

saroar avatar saroar commented on August 15, 2024

@stasel it does not work let me try if i can do it or if you know how to do it you can share with us thanks

from webrtc-ios.

saroar avatar saroar commented on August 15, 2024

fixed it thanks :) if you will have time I can create pull request

from webrtc-ios.

mrfarukturgut avatar mrfarukturgut commented on August 15, 2024

@saroar wish, you have shared your solution man

from webrtc-ios.

mrfarukturgut avatar mrfarukturgut commented on August 15, 2024
    func pauseVideo() {
        self.setVideoEnabled(false)
    }
    
    func unpauseVideo() {
        self.setVideoEnabled(true)
    }
    private func setVideoEnabled(_ isEnabled: Bool) {
        let videoTracks = self.peerConnection.transceivers.compactMap { return $0.sender.track as? RTCVideoTrack }
        videoTracks.forEach { $0.isEnabled = isEnabled }
    }

from webrtc-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.