Skip to content

Instantly share code, notes, and snippets.

View iamyogish's full-sized avatar
👋

Yogish M iamyogish

👋
View GitHub Profile
@iamyogish
iamyogish / RTCClient.swift
Created February 19, 2018 09:41
Controlling the bandwidth used by WebRTC during calls
//...
func sendOffer() {
let peerConnection = getPeerConnection()
let mediaConstraints = getMediaConstraints()
peerConnection.offer(for: mediaConstraints) { [weak self] (sdp, error) in
guard error == nil else {
@iamyogish
iamyogish / RTCClient.swift
Last active February 19, 2018 09:11
Reducing the Video Quality of the WebRTC Call
static let LOCAL_VIDEO_TRACK_ID = "Your Local Video Track ID here"
static let AUDIO_TRACK_ID = "Your Local Audio Track ID here"
//...
func createLocalMediaStream() {
//...
let peerConnectionFactory = RTCPeerConnectionFactory()
let localMediaStream = peerConnectionFactory.mediaStream(withStreamId: LOCAL_VIDEO_TRACK_ID)
import RxSwift
import Foundation
example("startWith") {
Observable.of("1", "2", "3")
.startWith("A")
.startWith("B")
.startWith("C", "D")
.subscribe(onNext: {print($0)})