2022-03-12 06:55:12 +08:00
|
|
|
//
|
|
|
|
// ReactNativeEventEmitter.swift
|
|
|
|
//
|
|
|
|
// Created by Tiago Daniel Jacobs on 11/03/22.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
import React
|
|
|
|
|
|
|
|
@objc(ReactNativeEventEmitter)
|
|
|
|
open class ReactNativeEventEmitter: RCTEventEmitter {
|
|
|
|
|
|
|
|
public static var emitter: RCTEventEmitter!
|
|
|
|
|
|
|
|
public enum EVENT: String, CaseIterable {
|
|
|
|
case onBroadcastRequested = "onBroadcastRequested"
|
|
|
|
case onBroadcastStarted = "onBroadcastStarted"
|
|
|
|
case onBroadcastPaused = "onBroadcastPaused"
|
|
|
|
case onBroadcastResumed = "onBroadcastResumed"
|
|
|
|
case onBroadcastFinished = "onBroadcastFinished"
|
2022-03-19 03:39:14 +08:00
|
|
|
case onScreenShareOfferCreated = "onScreenShareOfferCreated"
|
2022-03-28 02:05:47 +08:00
|
|
|
case onSetScreenShareRemoteSDPCompleted = "onSetScreenShareRemoteSDPCompleted"
|
2022-03-12 06:55:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
override init() {
|
|
|
|
super.init()
|
|
|
|
ReactNativeEventEmitter.emitter = self
|
|
|
|
}
|
|
|
|
|
|
|
|
open override func supportedEvents() -> [String] {
|
|
|
|
EVENT.allCases.map { $0.rawValue }
|
|
|
|
}
|
|
|
|
|
|
|
|
@objc open override class func requiresMainQueueSetup() -> Bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
}
|