Skip to content

Commit

Permalink
Merge pull request #11 from AgoraIO-Community/single-view-public
Browse files Browse the repository at this point in the history
Publicise AgoraSingleVideoView
  • Loading branch information
maxxfrazer authored Feb 11, 2021
2 parents f06e584 + 67bea62 commit 492a76e
Show file tree
Hide file tree
Showing 63 changed files with 13 additions and 17,488 deletions.
2 changes: 1 addition & 1 deletion AgoraUIKit_iOS.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'AgoraUIKit_iOS'
s.version = '1.3.1'
s.version = '1.3.2'
s.summary = 'Agora video session UIKit template.'

s.description = <<-DESC
Expand Down
2 changes: 1 addition & 1 deletion AgoraUIKit_macOS.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'AgoraUIKit_macOS'
s.version = '1.3.1'
s.version = '1.3.2'
s.summary = 'Agora video session AppKit template.'

s.description = <<-DESC
Expand Down
12 changes: 8 additions & 4 deletions Sources/Agora-UIKit/AgoraSingleVideoView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ import AgoraRtcKit
/// View for the individual Agora Camera Feed.
public class AgoraSingleVideoView: MPView {
/// Is the video turned off for this user.
var videoMuted: Bool = true {
public var videoMuted: Bool = true {
didSet {
if oldValue != videoMuted {
self.canvas.view?.isHidden = videoMuted
}
}
}
/// Is the microphone muted for this user.
var audioMuted: Bool = true {
public var audioMuted: Bool = true {
didSet {
self.mutedFlag.isHidden = !audioMuted
}
Expand All @@ -34,7 +34,7 @@ public class AgoraSingleVideoView: MPView {
set { self.canvas.uid = newValue }
}
/// Canvas used to render the Agora RTC Video.
var canvas: AgoraRtcVideoCanvas
public var canvas: AgoraRtcVideoCanvas
/// View that the AgoraRtcVideoCanvas is sending the video feed to
var hostingView: MPView? {
self.canvas.view
Expand Down Expand Up @@ -80,7 +80,11 @@ public class AgoraSingleVideoView: MPView {
return muteFlag
}()

init(uid: UInt, micColor: MPColor) {
/// Create a new AgoraSingleVideoView to be displayed in your app
/// - Parameters:
/// - uid: User ID of the `AgoraRtcVideoCanvas` inside this view
/// - micColor: Color to be applied when the local or remote user mutes their microphone
public init(uid: UInt, micColor: MPColor) {
self.canvas = AgoraRtcVideoCanvas()
self.micFlagColor = micColor
super.init(frame: .zero)
Expand Down
3 changes: 3 additions & 0 deletions Sources/Agora-UIKit/AgoraVideoViewer+VideoControl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,15 @@ extension AgoraVideoViewer {
self.activeSpeaker = nil
self.remoteUserIDs = []
self.userVideoLookup = [:]
self.backgroundVideoHolder.subviews.forEach{ $0.removeFromSuperview() }
self.controlContainer?.isHidden = true
let leaveChannelRtn = self.agkit.leaveChannel(leaveChannelBlock)
defer {
if leaveChannelRtn == 0 {
delegate?.leftChannel?(chName)
}
}

return leaveChannelRtn
}

Expand Down
197 changes: 0 additions & 197 deletions docs/Classes.html

This file was deleted.

Loading

0 comments on commit 492a76e

Please sign in to comment.