File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 1414 * limitations under the License.
1515 */
1616
17+ import Combine
1718import Foundation
1819
1920@MainActor
Original file line number Diff line number Diff line change 1515 */
1616
1717@preconcurrency import AVFoundation
18+ import Combine
19+ import Foundation
1820
1921@MainActor
2022open class LocalMedia : ObservableObject {
2123 // MARK: - Error
2224
2325 public enum Error : LocalizedError {
2426 case mediaDevice( Swift . Error )
27+
28+ public var errorDescription : String ? {
29+ switch self {
30+ case let . mediaDevice( error) :
31+ " Media device error: \( error. localizedDescription) "
32+ }
33+ }
2534 }
2635
2736 // MARK: - Devices
Original file line number Diff line number Diff line change 1414 * limitations under the License.
1515 */
1616
17+ import Combine
1718import Foundation
1819import OrderedCollections
1920
@@ -27,7 +28,14 @@ open class Session: ObservableObject {
2728 case failedToSend( Swift . Error )
2829
2930 public var errorDescription : String ? {
30- " TODO "
31+ switch self {
32+ case . agentNotConnected:
33+ " Agent not connected "
34+ case let . failedToConnect( error) :
35+ " Failed to connect: \( error. localizedDescription) "
36+ case let . failedToSend( error) :
37+ " Failed to send: \( error. localizedDescription) "
38+ }
3139 }
3240 }
3341
You can’t perform that action at this time.
0 commit comments