This commit is contained in:
Михаил Капелько
2024-01-15 19:02:23 +03:00
parent 1779eb3efe
commit a0ad8da8df
8 changed files with 63 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
public extension Mic {
enum K {
public static let isActive = "Mic.isActive"
}
}

View File

@@ -0,0 +1 @@
public enum Mic { }

View File

@@ -0,0 +1,27 @@
import BusX
import SwiftUI
extension MicItem {
public struct V: View {
@StateObject var isActive = BusUI.Value(Mic.K.isActive, false)
public init() {
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
Bus.send(Mic.K.isActive, true)
}
DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
Bus.send(Mic.K.isActive, false)
}
}
public var body: some View {
Text("Mic activity")
.padding(8)
.border(
isActive.v ? Color.black : Color.gray,
width: isActive.v ? 3 : 1
)
.animation(.easeInOut(duration: 0.3))
}
}
}

View File

@@ -0,0 +1 @@
public enum MicItem { }

17
Modules/MicX/MicX.podspec Normal file
View File

@@ -0,0 +1,17 @@
Pod::Spec.new do |s|
s.name = 'MicX'
s.version = '2024.01.15'
s.license = 'IVCS'
s.summary = 'Отображение звуковой активности участника'
s.homepage = 'IVCS'
s.author = 'IVCS'
s.source = { :git => 'https://fake.com/FAKE.git', :tag => s.version }
s.source_files = '**/**/*.{swift,yml}'
s.swift_version = '5.2'
s.ios.deployment_target = '14.0'
s.dependency 'AELog'
s.dependency 'BusX'
s.dependency 'MPAKX'
end