🐛 Fixes of videos and more
This commit is contained in:
29
ios/SolianBroadcastExtension/DarwinNotification.swift
Normal file
29
ios/SolianBroadcastExtension/DarwinNotification.swift
Normal file
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// DarwinNotificationCenter.swift
|
||||
// Broadcast Extension
|
||||
//
|
||||
// Created by Alex-Dan Bumbu on 23/03/2021.
|
||||
// Copyright © 2021 8x8, Inc. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
enum DarwinNotification: String {
|
||||
case broadcastStarted = "iOS_BroadcastStarted"
|
||||
case broadcastStopped = "iOS_BroadcastStopped"
|
||||
}
|
||||
|
||||
class DarwinNotificationCenter {
|
||||
|
||||
static let shared = DarwinNotificationCenter()
|
||||
|
||||
private let notificationCenter: CFNotificationCenter
|
||||
|
||||
init() {
|
||||
notificationCenter = CFNotificationCenterGetDarwinNotifyCenter()
|
||||
}
|
||||
|
||||
func postNotification(_ name: DarwinNotification) {
|
||||
CFNotificationCenterPostNotification(notificationCenter, CFNotificationName(rawValue: name.rawValue as CFString), nil, nil, true)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user