@robono/calling-react-native 0.2.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -2
- package/README.md +97 -4
- package/RobonoCallingRuntime.podspec +1 -1
- package/SBOM.spdx.json +6982 -190
- package/android/build.gradle +1 -1
- package/android/consumer-rules.pro +5 -0
- package/android/src/main/java/com/robono/calling/CallingRuntime.java +29 -3
- package/android/src/main/java/com/robono/calling/CallingWarnings.java +59 -0
- package/app.plugin.cjs +4 -2
- package/assets/countdown/1.m4a +0 -0
- package/assets/countdown/10.m4a +0 -0
- package/assets/countdown/100.m4a +0 -0
- package/assets/countdown/101.m4a +0 -0
- package/assets/countdown/102.m4a +0 -0
- package/assets/countdown/103.m4a +0 -0
- package/assets/countdown/104.m4a +0 -0
- package/assets/countdown/105.m4a +0 -0
- package/assets/countdown/106.m4a +0 -0
- package/assets/countdown/107.m4a +0 -0
- package/assets/countdown/108.m4a +0 -0
- package/assets/countdown/109.m4a +0 -0
- package/assets/countdown/11.m4a +0 -0
- package/assets/countdown/110.m4a +0 -0
- package/assets/countdown/111.m4a +0 -0
- package/assets/countdown/112.m4a +0 -0
- package/assets/countdown/113.m4a +0 -0
- package/assets/countdown/114.m4a +0 -0
- package/assets/countdown/115.m4a +0 -0
- package/assets/countdown/116.m4a +0 -0
- package/assets/countdown/117.m4a +0 -0
- package/assets/countdown/118.m4a +0 -0
- package/assets/countdown/119.m4a +0 -0
- package/assets/countdown/12.m4a +0 -0
- package/assets/countdown/120.m4a +0 -0
- package/assets/countdown/121.m4a +0 -0
- package/assets/countdown/122.m4a +0 -0
- package/assets/countdown/123.m4a +0 -0
- package/assets/countdown/124.m4a +0 -0
- package/assets/countdown/125.m4a +0 -0
- package/assets/countdown/126.m4a +0 -0
- package/assets/countdown/127.m4a +0 -0
- package/assets/countdown/128.m4a +0 -0
- package/assets/countdown/129.m4a +0 -0
- package/assets/countdown/13.m4a +0 -0
- package/assets/countdown/130.m4a +0 -0
- package/assets/countdown/131.m4a +0 -0
- package/assets/countdown/132.m4a +0 -0
- package/assets/countdown/133.m4a +0 -0
- package/assets/countdown/134.m4a +0 -0
- package/assets/countdown/135.m4a +0 -0
- package/assets/countdown/136.m4a +0 -0
- package/assets/countdown/137.m4a +0 -0
- package/assets/countdown/138.m4a +0 -0
- package/assets/countdown/139.m4a +0 -0
- package/assets/countdown/14.m4a +0 -0
- package/assets/countdown/140.m4a +0 -0
- package/assets/countdown/141.m4a +0 -0
- package/assets/countdown/142.m4a +0 -0
- package/assets/countdown/143.m4a +0 -0
- package/assets/countdown/144.m4a +0 -0
- package/assets/countdown/145.m4a +0 -0
- package/assets/countdown/146.m4a +0 -0
- package/assets/countdown/147.m4a +0 -0
- package/assets/countdown/148.m4a +0 -0
- package/assets/countdown/149.m4a +0 -0
- package/assets/countdown/15.m4a +0 -0
- package/assets/countdown/150.m4a +0 -0
- package/assets/countdown/151.m4a +0 -0
- package/assets/countdown/152.m4a +0 -0
- package/assets/countdown/153.m4a +0 -0
- package/assets/countdown/154.m4a +0 -0
- package/assets/countdown/155.m4a +0 -0
- package/assets/countdown/156.m4a +0 -0
- package/assets/countdown/157.m4a +0 -0
- package/assets/countdown/158.m4a +0 -0
- package/assets/countdown/159.m4a +0 -0
- package/assets/countdown/16.m4a +0 -0
- package/assets/countdown/160.m4a +0 -0
- package/assets/countdown/161.m4a +0 -0
- package/assets/countdown/162.m4a +0 -0
- package/assets/countdown/163.m4a +0 -0
- package/assets/countdown/164.m4a +0 -0
- package/assets/countdown/165.m4a +0 -0
- package/assets/countdown/166.m4a +0 -0
- package/assets/countdown/167.m4a +0 -0
- package/assets/countdown/168.m4a +0 -0
- package/assets/countdown/169.m4a +0 -0
- package/assets/countdown/17.m4a +0 -0
- package/assets/countdown/170.m4a +0 -0
- package/assets/countdown/171.m4a +0 -0
- package/assets/countdown/172.m4a +0 -0
- package/assets/countdown/173.m4a +0 -0
- package/assets/countdown/174.m4a +0 -0
- package/assets/countdown/175.m4a +0 -0
- package/assets/countdown/176.m4a +0 -0
- package/assets/countdown/177.m4a +0 -0
- package/assets/countdown/178.m4a +0 -0
- package/assets/countdown/179.m4a +0 -0
- package/assets/countdown/18.m4a +0 -0
- package/assets/countdown/180.m4a +0 -0
- package/assets/countdown/181.m4a +0 -0
- package/assets/countdown/182.m4a +0 -0
- package/assets/countdown/183.m4a +0 -0
- package/assets/countdown/184.m4a +0 -0
- package/assets/countdown/185.m4a +0 -0
- package/assets/countdown/186.m4a +0 -0
- package/assets/countdown/187.m4a +0 -0
- package/assets/countdown/188.m4a +0 -0
- package/assets/countdown/189.m4a +0 -0
- package/assets/countdown/19.m4a +0 -0
- package/assets/countdown/190.m4a +0 -0
- package/assets/countdown/191.m4a +0 -0
- package/assets/countdown/192.m4a +0 -0
- package/assets/countdown/193.m4a +0 -0
- package/assets/countdown/194.m4a +0 -0
- package/assets/countdown/195.m4a +0 -0
- package/assets/countdown/196.m4a +0 -0
- package/assets/countdown/197.m4a +0 -0
- package/assets/countdown/198.m4a +0 -0
- package/assets/countdown/199.m4a +0 -0
- package/assets/countdown/2.m4a +0 -0
- package/assets/countdown/20.m4a +0 -0
- package/assets/countdown/200.m4a +0 -0
- package/assets/countdown/201.m4a +0 -0
- package/assets/countdown/202.m4a +0 -0
- package/assets/countdown/203.m4a +0 -0
- package/assets/countdown/204.m4a +0 -0
- package/assets/countdown/205.m4a +0 -0
- package/assets/countdown/206.m4a +0 -0
- package/assets/countdown/207.m4a +0 -0
- package/assets/countdown/208.m4a +0 -0
- package/assets/countdown/209.m4a +0 -0
- package/assets/countdown/21.m4a +0 -0
- package/assets/countdown/210.m4a +0 -0
- package/assets/countdown/211.m4a +0 -0
- package/assets/countdown/212.m4a +0 -0
- package/assets/countdown/213.m4a +0 -0
- package/assets/countdown/214.m4a +0 -0
- package/assets/countdown/215.m4a +0 -0
- package/assets/countdown/216.m4a +0 -0
- package/assets/countdown/217.m4a +0 -0
- package/assets/countdown/218.m4a +0 -0
- package/assets/countdown/219.m4a +0 -0
- package/assets/countdown/22.m4a +0 -0
- package/assets/countdown/220.m4a +0 -0
- package/assets/countdown/221.m4a +0 -0
- package/assets/countdown/222.m4a +0 -0
- package/assets/countdown/223.m4a +0 -0
- package/assets/countdown/224.m4a +0 -0
- package/assets/countdown/225.m4a +0 -0
- package/assets/countdown/226.m4a +0 -0
- package/assets/countdown/227.m4a +0 -0
- package/assets/countdown/228.m4a +0 -0
- package/assets/countdown/229.m4a +0 -0
- package/assets/countdown/23.m4a +0 -0
- package/assets/countdown/230.m4a +0 -0
- package/assets/countdown/231.m4a +0 -0
- package/assets/countdown/232.m4a +0 -0
- package/assets/countdown/233.m4a +0 -0
- package/assets/countdown/234.m4a +0 -0
- package/assets/countdown/235.m4a +0 -0
- package/assets/countdown/236.m4a +0 -0
- package/assets/countdown/237.m4a +0 -0
- package/assets/countdown/238.m4a +0 -0
- package/assets/countdown/239.m4a +0 -0
- package/assets/countdown/24.m4a +0 -0
- package/assets/countdown/240.m4a +0 -0
- package/assets/countdown/25.m4a +0 -0
- package/assets/countdown/26.m4a +0 -0
- package/assets/countdown/27.m4a +0 -0
- package/assets/countdown/28.m4a +0 -0
- package/assets/countdown/29.m4a +0 -0
- package/assets/countdown/3.m4a +0 -0
- package/assets/countdown/30.m4a +0 -0
- package/assets/countdown/31.m4a +0 -0
- package/assets/countdown/32.m4a +0 -0
- package/assets/countdown/33.m4a +0 -0
- package/assets/countdown/34.m4a +0 -0
- package/assets/countdown/35.m4a +0 -0
- package/assets/countdown/36.m4a +0 -0
- package/assets/countdown/37.m4a +0 -0
- package/assets/countdown/38.m4a +0 -0
- package/assets/countdown/39.m4a +0 -0
- package/assets/countdown/4.m4a +0 -0
- package/assets/countdown/40.m4a +0 -0
- package/assets/countdown/41.m4a +0 -0
- package/assets/countdown/42.m4a +0 -0
- package/assets/countdown/43.m4a +0 -0
- package/assets/countdown/44.m4a +0 -0
- package/assets/countdown/45.m4a +0 -0
- package/assets/countdown/46.m4a +0 -0
- package/assets/countdown/47.m4a +0 -0
- package/assets/countdown/48.m4a +0 -0
- package/assets/countdown/49.m4a +0 -0
- package/assets/countdown/5.m4a +0 -0
- package/assets/countdown/50.m4a +0 -0
- package/assets/countdown/51.m4a +0 -0
- package/assets/countdown/52.m4a +0 -0
- package/assets/countdown/53.m4a +0 -0
- package/assets/countdown/54.m4a +0 -0
- package/assets/countdown/55.m4a +0 -0
- package/assets/countdown/56.m4a +0 -0
- package/assets/countdown/57.m4a +0 -0
- package/assets/countdown/58.m4a +0 -0
- package/assets/countdown/59.m4a +0 -0
- package/assets/countdown/6.m4a +0 -0
- package/assets/countdown/60.m4a +0 -0
- package/assets/countdown/61.m4a +0 -0
- package/assets/countdown/62.m4a +0 -0
- package/assets/countdown/63.m4a +0 -0
- package/assets/countdown/64.m4a +0 -0
- package/assets/countdown/65.m4a +0 -0
- package/assets/countdown/66.m4a +0 -0
- package/assets/countdown/67.m4a +0 -0
- package/assets/countdown/68.m4a +0 -0
- package/assets/countdown/69.m4a +0 -0
- package/assets/countdown/7.m4a +0 -0
- package/assets/countdown/70.m4a +0 -0
- package/assets/countdown/71.m4a +0 -0
- package/assets/countdown/72.m4a +0 -0
- package/assets/countdown/73.m4a +0 -0
- package/assets/countdown/74.m4a +0 -0
- package/assets/countdown/75.m4a +0 -0
- package/assets/countdown/76.m4a +0 -0
- package/assets/countdown/77.m4a +0 -0
- package/assets/countdown/78.m4a +0 -0
- package/assets/countdown/79.m4a +0 -0
- package/assets/countdown/8.m4a +0 -0
- package/assets/countdown/80.m4a +0 -0
- package/assets/countdown/81.m4a +0 -0
- package/assets/countdown/82.m4a +0 -0
- package/assets/countdown/83.m4a +0 -0
- package/assets/countdown/84.m4a +0 -0
- package/assets/countdown/85.m4a +0 -0
- package/assets/countdown/86.m4a +0 -0
- package/assets/countdown/87.m4a +0 -0
- package/assets/countdown/88.m4a +0 -0
- package/assets/countdown/89.m4a +0 -0
- package/assets/countdown/9.m4a +0 -0
- package/assets/countdown/90.m4a +0 -0
- package/assets/countdown/91.m4a +0 -0
- package/assets/countdown/92.m4a +0 -0
- package/assets/countdown/93.m4a +0 -0
- package/assets/countdown/94.m4a +0 -0
- package/assets/countdown/95.m4a +0 -0
- package/assets/countdown/96.m4a +0 -0
- package/assets/countdown/97.m4a +0 -0
- package/assets/countdown/98.m4a +0 -0
- package/assets/countdown/99.m4a +0 -0
- package/assets/countdown/beep.wav +0 -0
- package/assets/countdown/manifest.json +1450 -0
- package/broadcast/SampleHandler.swift +92 -0
- package/dist/CallRecord.d.ts +19 -0
- package/dist/CallRecord.js +22 -0
- package/dist/appearance.d.ts +69 -4
- package/dist/appearance.js +70 -5
- package/dist/components.d.ts +135 -0
- package/dist/components.js +185 -0
- package/dist/controller.d.mts +1 -1
- package/dist/controller.mjs +61 -7
- package/dist/countdown-assets.d.ts +1 -0
- package/dist/countdown-assets.js +244 -0
- package/dist/countdown-native.d.ts +13 -0
- package/dist/countdown-native.js +66 -0
- package/dist/countdown.d.mts +13 -0
- package/dist/countdown.mjs +72 -0
- package/dist/expo-notifications.d.ts +1 -1
- package/dist/expo-notifications.js +3 -3
- package/dist/group-phase.d.mts +4 -0
- package/dist/group-phase.mjs +26 -0
- package/dist/groups.d.ts +41 -0
- package/dist/groups.js +91 -0
- package/dist/history.d.ts +6 -15
- package/dist/history.js +3 -11
- package/dist/index.d.ts +4 -2
- package/dist/index.js +4 -2
- package/dist/native-video.d.ts +8 -0
- package/dist/native-video.js +10 -0
- package/dist/native.d.ts +2 -0
- package/dist/native.js +56 -3
- package/dist/notification-router.d.ts +2 -1
- package/dist/notification-router.js +4 -4
- package/dist/notifications.d.ts +5 -3
- package/dist/notifications.js +7 -5
- package/dist/runtime.d.ts +8 -1
- package/dist/runtime.js +10 -1
- package/dist/screens.d.ts +6 -54
- package/dist/screens.js +17 -42
- package/dist/types.d.ts +45 -1
- package/dist/versions.d.ts +2 -0
- package/dist/versions.js +3 -0
- package/dist/visual/RobonoIcon.d.ts +232 -0
- package/dist/visual/RobonoIcon.js +20 -0
- package/dist/visual/icon-nodes.d.ts +3 -0
- package/dist/visual/icon-nodes.js +2 -0
- package/dist/visual/icon-paths.d.ts +221 -0
- package/dist/visual/icon-paths.js +221 -0
- package/examples/CallingHost.tsx +16 -8
- package/examples/CustomCallingScreen.tsx +64 -0
- package/examples/ExpoGroupCallingHost.tsx +42 -0
- package/examples/GroupCallingHost.tsx +70 -0
- package/ios/RobonoCallingRuntime.m +30 -0
- package/licenses/robono-icons-lucide-license.txt +43 -0
- package/licenses/robono-icons-weather-attribution.txt +1 -0
- package/licenses/robono-icons-weather-license.txt +21 -0
- package/package.json +26 -5
- package/plugin/screensharing.cjs +39 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import ReplayKit
|
|
2
|
+
import CoreImage
|
|
3
|
+
import ImageIO
|
|
4
|
+
import Darwin
|
|
5
|
+
|
|
6
|
+
/// ReplayKit supplies video only. Call microphone audio stays with WebRTC.
|
|
7
|
+
final class SampleHandler: RPBroadcastSampleHandler {
|
|
8
|
+
private let frames = DispatchQueue(label: "robono.screen.frames")
|
|
9
|
+
private let slot = DispatchSemaphore(value: 1)
|
|
10
|
+
private let context = CIContext(options: [.cacheIntermediates: false])
|
|
11
|
+
private var socketFD: Int32 = -1
|
|
12
|
+
private var lastStatus: CFTimeInterval = 0
|
|
13
|
+
private var lastFrame: CFTimeInterval = 0
|
|
14
|
+
private var stopped = false
|
|
15
|
+
private var startedAt = Date()
|
|
16
|
+
|
|
17
|
+
override func broadcastStarted(withSetupInfo setupInfo: [String: NSObject]?) {
|
|
18
|
+
startedAt = Date()
|
|
19
|
+
}
|
|
20
|
+
override func broadcastFinished() {
|
|
21
|
+
frames.async { self.stopped = true; self.status(false); self.disconnect() }
|
|
22
|
+
}
|
|
23
|
+
override func processSampleBuffer(_ sampleBuffer: CMSampleBuffer, with type: RPSampleBufferType) {
|
|
24
|
+
guard type == .video, let buffer = CMSampleBufferGetImageBuffer(sampleBuffer),
|
|
25
|
+
slot.wait(timeout: .now()) == .success else { return }
|
|
26
|
+
let orientation = (CMGetAttachment(sampleBuffer, key: RPVideoSampleOrientationKey as CFString, attachmentModeOut: nil) as? NSNumber)?.intValue ?? 1
|
|
27
|
+
frames.async { [self] in
|
|
28
|
+
defer { slot.signal() }
|
|
29
|
+
guard !stopped else { return }
|
|
30
|
+
let now = CACurrentMediaTime()
|
|
31
|
+
guard now - lastFrame >= 1.0 / 15.0 else { return }
|
|
32
|
+
lastFrame = now
|
|
33
|
+
guard connect() else {
|
|
34
|
+
if Date().timeIntervalSince(startedAt) > 20 { finish("Open the call before sharing your screen.") }
|
|
35
|
+
return
|
|
36
|
+
}
|
|
37
|
+
autoreleasepool {
|
|
38
|
+
let input = CIImage(cvPixelBuffer: buffer)
|
|
39
|
+
let scale = min(1, 1280 / max(input.extent.width, input.extent.height))
|
|
40
|
+
let image = input.transformed(by: CGAffineTransform(scaleX: scale, y: scale))
|
|
41
|
+
guard let jpeg = context.jpegRepresentation(of: image, colorSpace: CGColorSpaceCreateDeviceRGB(), options: [kCGImageDestinationLossyCompressionQuality as CIImageRepresentationOption: 0.7]) else { return }
|
|
42
|
+
let header = "HTTP/1.1 200 OK\r\nContent-Length: \(jpeg.count)\r\nBuffer-Width: \(Int(image.extent.width))\r\nBuffer-Height: \(Int(image.extent.height))\r\nBuffer-Orientation: \(orientation)\r\n\r\n"
|
|
43
|
+
var packet = Data(header.utf8); packet.append(jpeg)
|
|
44
|
+
let sent = packet.withUnsafeBytes { raw -> Bool in
|
|
45
|
+
guard let base = raw.baseAddress else { return false }
|
|
46
|
+
var offset = 0
|
|
47
|
+
while offset < raw.count {
|
|
48
|
+
let n = Darwin.send(socketFD, base.advanced(by: offset), raw.count - offset, 0)
|
|
49
|
+
if n <= 0 { return false }; offset += n
|
|
50
|
+
}
|
|
51
|
+
return true
|
|
52
|
+
}
|
|
53
|
+
if !sent { finish("Screen sharing ended.") }
|
|
54
|
+
else if now - lastStatus > 0.5 { lastStatus = now; status(true) }
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
private func connect() -> Bool {
|
|
59
|
+
if socketFD >= 0 { return true }
|
|
60
|
+
guard let group = Bundle.main.object(forInfoDictionaryKey: "RTCAppGroupIdentifier") as? String,
|
|
61
|
+
let url = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: group) else { return false }
|
|
62
|
+
let path = url.appendingPathComponent("rtc_SSFD").path
|
|
63
|
+
var address = sockaddr_un(); address.sun_family = sa_family_t(AF_UNIX)
|
|
64
|
+
let bytes = path.utf8CString
|
|
65
|
+
guard bytes.count <= MemoryLayout.size(ofValue: address.sun_path) else { return false }
|
|
66
|
+
withUnsafeMutableBytes(of: &address.sun_path) { destination in
|
|
67
|
+
bytes.withUnsafeBytes { source in destination.copyBytes(from: source) }
|
|
68
|
+
}
|
|
69
|
+
let fd = Darwin.socket(AF_UNIX, SOCK_STREAM, 0)
|
|
70
|
+
guard fd >= 0 else { return false }
|
|
71
|
+
var noSignal: Int32 = 1
|
|
72
|
+
setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &noSignal, socklen_t(MemoryLayout<Int32>.size))
|
|
73
|
+
var timeout = timeval(tv_sec: 2, tv_usec: 0)
|
|
74
|
+
setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &timeout, socklen_t(MemoryLayout<timeval>.size))
|
|
75
|
+
let result = withUnsafePointer(to: &address) { pointer in
|
|
76
|
+
pointer.withMemoryRebound(to: sockaddr.self, capacity: 1) { Darwin.connect(fd, $0, socklen_t(MemoryLayout<sockaddr_un>.size)) }
|
|
77
|
+
}
|
|
78
|
+
guard result == 0 else { Darwin.close(fd); return false }
|
|
79
|
+
socketFD = fd; return true
|
|
80
|
+
}
|
|
81
|
+
private func status(_ active: Bool) {
|
|
82
|
+
guard let group = Bundle.main.object(forInfoDictionaryKey: "RTCAppGroupIdentifier") as? String,
|
|
83
|
+
let url = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: group),
|
|
84
|
+
let data = try? JSONSerialization.data(withJSONObject: ["active": active, "at": Date().timeIntervalSince1970 * 1000]) else { return }
|
|
85
|
+
try? data.write(to: url.appendingPathComponent("robono-screen-status.json"), options: .atomic)
|
|
86
|
+
}
|
|
87
|
+
private func disconnect() { if socketFD >= 0 { Darwin.close(socketFD); socketFD = -1 } }
|
|
88
|
+
private func finish(_ message: String) {
|
|
89
|
+
stopped = true; status(false); disconnect()
|
|
90
|
+
finishBroadcastWithError(NSError(domain: "RobonoScreenSharing", code: 1, userInfo: [NSLocalizedDescriptionKey: message]))
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
import type { CallHistoryEntry } from '@robono/calling';
|
|
3
|
+
/** A call record, aligned with its caller. Separate from the text-bubble component. */
|
|
4
|
+
export declare function CallRecord({ entry, incomingColor, outgoingColor, textColor, secondaryColor, onCallBack, label, children, showTime }: {
|
|
5
|
+
entry: CallHistoryEntry;
|
|
6
|
+
incomingColor: string;
|
|
7
|
+
outgoingColor: string;
|
|
8
|
+
textColor?: string;
|
|
9
|
+
secondaryColor?: string;
|
|
10
|
+
/** Caller must recheck live availability before placing the callback. */
|
|
11
|
+
onCallBack?: () => void;
|
|
12
|
+
label: (entry: CallHistoryEntry) => {
|
|
13
|
+
label: string;
|
|
14
|
+
detail: string;
|
|
15
|
+
missed: boolean;
|
|
16
|
+
};
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
showTime?: boolean;
|
|
19
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Pressable, StyleSheet, Text, View } from 'react-native';
|
|
4
|
+
import { RobonoIcon } from './visual/RobonoIcon.js';
|
|
5
|
+
/** A call record, aligned with its caller. Separate from the text-bubble component. */
|
|
6
|
+
export function CallRecord({ entry, incomingColor, outgoingColor, textColor = '#ffffff', secondaryColor, onCallBack, label, children, showTime = false }) {
|
|
7
|
+
const description = label(entry);
|
|
8
|
+
const incoming = entry.role === 'callee';
|
|
9
|
+
const connected = entry.connectedAt != null;
|
|
10
|
+
const meta = [description.detail, showTime ? new Date(entry.createdAt).toLocaleTimeString(undefined, { hour: 'numeric', minute: '2-digit' }) : ''].filter(Boolean).join(' · ');
|
|
11
|
+
const actions = React.Children.toArray(children);
|
|
12
|
+
const content = _jsxs(_Fragment, { children: [_jsxs(View, { style: s.symbol, accessible: false, children: [_jsx(RobonoIcon, { name: description.missed ? 'missed' : entry.kind === 'video' ? 'video' : 'phone', size: 24, color: description.missed ? '#ff797e' : textColor }), !description.missed && _jsx(View, { style: [s.direction, { backgroundColor: incoming ? incomingColor : outgoingColor }], children: _jsx(RobonoIcon, { name: incoming ? 'incoming' : 'outgoing', size: 13, color: connected ? '#72ce99' : '#ff797e' }) })] }), _jsxs(View, { style: s.text, children: [_jsx(Text, { style: [s.title, { color: textColor }], children: description.label }), !!meta && _jsx(Text, { style: [s.detail, { color: secondaryColor || textColor }], children: meta })] })] });
|
|
13
|
+
return _jsxs(View, { style: [s.record, { backgroundColor: incoming ? incomingColor : outgoingColor, alignSelf: incoming ? 'flex-start' : 'flex-end' }], children: [onCallBack ? _jsx(Pressable, { accessibilityRole: "button", accessibilityLabel: `${description.label}${meta ? '. ' + meta : ''}`, accessibilityHint: incoming ? 'Call back' : 'Call again', onPress: onCallBack, style: ({ pressed }) => [s.main, pressed && { opacity: .65 }], children: content }) : _jsx(View, { style: s.main, children: content }), actions.length > 0 && _jsx(View, { style: s.actions, children: actions })] });
|
|
14
|
+
}
|
|
15
|
+
const s = StyleSheet.create({
|
|
16
|
+
record: { maxWidth: '100%', borderRadius: 14, borderWidth: 1, borderColor: '#ffffff16', flexDirection: 'row', alignItems: 'center', paddingHorizontal: 10, paddingVertical: 6 },
|
|
17
|
+
main: { minHeight: 48, flexDirection: 'row', alignItems: 'center', gap: 10, flexShrink: 1 },
|
|
18
|
+
symbol: { width: 38, height: 38, borderRadius: 12, backgroundColor: '#ffffff0d', alignItems: 'center', justifyContent: 'center' },
|
|
19
|
+
direction: { position: 'absolute', right: -2, bottom: -2, borderRadius: 7, padding: 1 },
|
|
20
|
+
text: { flexShrink: 1, gap: 3 }, title: { fontSize: 16, fontWeight: '600' }, detail: { fontSize: 12, fontVariant: ['tabular-nums'] },
|
|
21
|
+
actions: { borderLeftWidth: 1, borderLeftColor: '#ffffff22', marginLeft: 10, paddingLeft: 4, flexDirection: 'row', alignItems: 'center' },
|
|
22
|
+
});
|
package/dist/appearance.d.ts
CHANGED
|
@@ -8,8 +8,37 @@ export declare const callingColors: {
|
|
|
8
8
|
answer: string;
|
|
9
9
|
end: string;
|
|
10
10
|
};
|
|
11
|
+
/** Separate palettes let apps follow the device without changing saved brand colors. */
|
|
12
|
+
export declare const callingLightColors: {
|
|
13
|
+
background: string;
|
|
14
|
+
foreground: string;
|
|
15
|
+
secondary: string;
|
|
16
|
+
control: string;
|
|
17
|
+
accent: string;
|
|
18
|
+
answer: string;
|
|
19
|
+
end: string;
|
|
20
|
+
};
|
|
21
|
+
export interface CallingPresentation {
|
|
22
|
+
colorMode: "dark" | "light" | "system";
|
|
23
|
+
font: "system" | "serif" | "monospace";
|
|
24
|
+
textScale: 1 | 1.15 | 1.3;
|
|
25
|
+
layout: "standard" | "compact";
|
|
26
|
+
controlShape: "round" | "rounded";
|
|
27
|
+
showAvatar: boolean;
|
|
28
|
+
showCallDescription: boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare const callingPresentation: CallingPresentation;
|
|
11
31
|
export declare const callingText: {
|
|
12
32
|
call: string;
|
|
33
|
+
videoCall: string;
|
|
34
|
+
incomingVideo: string;
|
|
35
|
+
cameraOn: string;
|
|
36
|
+
cameraOff: string;
|
|
37
|
+
switchCamera: string;
|
|
38
|
+
more: string;
|
|
39
|
+
shareScreen: string;
|
|
40
|
+
stopSharing: string;
|
|
41
|
+
sharingScreen: string;
|
|
13
42
|
contact: string;
|
|
14
43
|
incoming: string;
|
|
15
44
|
outgoing: string;
|
|
@@ -49,16 +78,52 @@ export interface CallingAppearance {
|
|
|
49
78
|
appName: string;
|
|
50
79
|
logoUrl: string | null;
|
|
51
80
|
theme: typeof callingColors;
|
|
81
|
+
/** Omitted settings retain the original dark, standard layout. */
|
|
82
|
+
lightTheme?: typeof callingColors;
|
|
83
|
+
presentation?: Partial<CallingPresentation>;
|
|
52
84
|
labels: typeof callingText;
|
|
53
85
|
sounds: Record<SoundEvent, SoundChoice>;
|
|
54
86
|
}
|
|
55
87
|
export declare function defaultCallingAppearance(appName?: string): CallingAppearance;
|
|
56
88
|
export declare function validateCallingAppearance(input: unknown): CallingAppearance;
|
|
89
|
+
/** Shared by the optional mobile screen and website preview. */
|
|
90
|
+
export declare function resolveCallingDesign(appearance?: CallingAppearance, deviceMode?: "light" | "dark" | "unspecified" | null): {
|
|
91
|
+
presentation: {
|
|
92
|
+
colorMode: "dark" | "light" | "system";
|
|
93
|
+
font: "system" | "serif" | "monospace";
|
|
94
|
+
textScale: 1 | 1.15 | 1.3;
|
|
95
|
+
layout: "standard" | "compact";
|
|
96
|
+
controlShape: "round" | "rounded";
|
|
97
|
+
showAvatar: boolean;
|
|
98
|
+
showCallDescription: boolean;
|
|
99
|
+
};
|
|
100
|
+
colors: {
|
|
101
|
+
background: string;
|
|
102
|
+
foreground: string;
|
|
103
|
+
secondary: string;
|
|
104
|
+
control: string;
|
|
105
|
+
accent: string;
|
|
106
|
+
answer: string;
|
|
107
|
+
end: string;
|
|
108
|
+
};
|
|
109
|
+
mode: "light" | "dark";
|
|
110
|
+
avatarSize: number;
|
|
111
|
+
identityGap: number;
|
|
112
|
+
controlRadius: number;
|
|
113
|
+
fontFamily: {
|
|
114
|
+
ios: string | undefined;
|
|
115
|
+
android: "serif" | "monospace" | undefined;
|
|
116
|
+
web: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
57
119
|
/** Choose readable icon/status-bar ink against a brand color. */
|
|
58
120
|
export declare function callingInk(color: string): "#ffffff" | "#000000";
|
|
59
121
|
export declare const callingIcons: {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
122
|
+
share: "M9 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-5M7 21h10M12 21V8m-4 4 4-4 4 4";
|
|
123
|
+
camera: "M5 5.5h9a2.5 2.5 0 0 1 2.5 2.5v8a2.5 2.5 0 0 1-2.5 2.5H5A2.5 2.5 0 0 1 2.5 16V8A2.5 2.5 0 0 1 5 5.5ZM16.5 10l5-3v10l-5-3";
|
|
124
|
+
flip: "M5 8a8 8 0 0 1 14-1l1 2M15 9h5V4M19 16a8 8 0 0 1-14 1l-1-2M9 15H4v5";
|
|
125
|
+
answer: "M5 3.5h3l2 5-2.5 2a14 14 0 0 0 6 6l2-2.5 5 2v3c0 1.2-1.1 2.1-2.3 1.9A18.5 18.5 0 0 1 3.1 5.8C2.9 4.6 3.8 3.5 5 3.5Z";
|
|
126
|
+
end: "M3 10.5a17 17 0 0 1 18 0v5l-5-1v-3a12 12 0 0 0-8 0v3l-5 1Z";
|
|
127
|
+
mute: "M9 5a3 3 0 0 1 6 0v7a3 3 0 0 1-6 0ZM5.5 11.5v.5a6.5 6.5 0 0 0 13 0v-.5M12 18.5V22m-3 0h6";
|
|
128
|
+
speaker: "M3 9h4l5-4v14l-5-4H3ZM16 8a5 5 0 0 1 0 8m3-11a9 9 0 0 1 0 14";
|
|
64
129
|
};
|
package/dist/appearance.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { iconPaths } from "./visual/icon-paths.js";
|
|
1
2
|
/** Shared website/SDK contract. Values contain presentation only, never credentials. */
|
|
2
3
|
export const callingColors = {
|
|
3
4
|
background: "#080808",
|
|
@@ -8,8 +9,24 @@ export const callingColors = {
|
|
|
8
9
|
answer: "#247949",
|
|
9
10
|
end: "#bd2929",
|
|
10
11
|
};
|
|
12
|
+
/** Separate palettes let apps follow the device without changing saved brand colors. */
|
|
13
|
+
export const callingLightColors = {
|
|
14
|
+
background: "#ffffff", foreground: "#171717", secondary: "#606060",
|
|
15
|
+
control: "#eeeeee", accent: "#a84b11", answer: "#247949", end: "#bd2929",
|
|
16
|
+
};
|
|
17
|
+
export const callingPresentation = {
|
|
18
|
+
colorMode: "dark", font: "system", textScale: 1, layout: "standard",
|
|
19
|
+
controlShape: "round", showAvatar: true, showCallDescription: true,
|
|
20
|
+
};
|
|
11
21
|
export const callingText = {
|
|
12
22
|
call: "Voice call",
|
|
23
|
+
videoCall: "Video call",
|
|
24
|
+
incomingVideo: "Incoming video call",
|
|
25
|
+
cameraOn: "Camera on",
|
|
26
|
+
cameraOff: "Camera off",
|
|
27
|
+
switchCamera: "Flip camera",
|
|
28
|
+
more: "More",
|
|
29
|
+
shareScreen: "Share screen", stopSharing: "Stop sharing", sharingScreen: "Sharing screen",
|
|
13
30
|
contact: "Contact",
|
|
14
31
|
incoming: "Incoming voice call",
|
|
15
32
|
outgoing: "Calling…",
|
|
@@ -58,6 +75,8 @@ export function defaultCallingAppearance(appName = "") {
|
|
|
58
75
|
appName: appName.trim().slice(0, 60),
|
|
59
76
|
logoUrl: null,
|
|
60
77
|
theme: { ...callingColors },
|
|
78
|
+
lightTheme: { ...callingLightColors },
|
|
79
|
+
presentation: { ...callingPresentation },
|
|
61
80
|
labels: { ...callingText },
|
|
62
81
|
sounds: { ...callingSounds },
|
|
63
82
|
};
|
|
@@ -81,8 +100,37 @@ export function validateCallingAppearance(input) {
|
|
|
81
100
|
}
|
|
82
101
|
out.theme[key] = x;
|
|
83
102
|
}
|
|
103
|
+
if (v.lightTheme !== undefined) {
|
|
104
|
+
for (const key of Object.keys(callingColors)) {
|
|
105
|
+
const x = v.lightTheme?.[key];
|
|
106
|
+
if (typeof x !== "string" || !/^#[0-9a-f]{6}$/i.test(x)) {
|
|
107
|
+
throw Error("Choose a valid light color for " + key + ".");
|
|
108
|
+
}
|
|
109
|
+
out.lightTheme[key] = x;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
if (v.presentation !== undefined) {
|
|
113
|
+
if (!v.presentation || typeof v.presentation !== "object" || Array.isArray(v.presentation)) {
|
|
114
|
+
throw Error("Choose valid screen appearance settings.");
|
|
115
|
+
}
|
|
116
|
+
const choices = {
|
|
117
|
+
colorMode: ["dark", "light", "system"], font: ["system", "serif", "monospace"],
|
|
118
|
+
textScale: [1, 1.15, 1.3], layout: ["standard", "compact"],
|
|
119
|
+
controlShape: ["round", "rounded"], showAvatar: [true, false],
|
|
120
|
+
showCallDescription: [true, false],
|
|
121
|
+
};
|
|
122
|
+
for (const key of Object.keys(choices)) {
|
|
123
|
+
const value = v.presentation[key];
|
|
124
|
+
if (value === undefined)
|
|
125
|
+
continue;
|
|
126
|
+
if (!choices[key].includes(value)) {
|
|
127
|
+
throw Error("Choose a supported value for " + key + ".");
|
|
128
|
+
}
|
|
129
|
+
Object.assign(out.presentation, { [key]: value });
|
|
130
|
+
}
|
|
131
|
+
}
|
|
84
132
|
for (const key of Object.keys(callingText)) {
|
|
85
|
-
const x = v.labels?.[key];
|
|
133
|
+
const x = v.labels?.[key] ?? (['more', 'videoCall', 'incomingVideo', 'cameraOn', 'cameraOff', 'switchCamera', 'shareScreen', 'stopSharing', 'sharingScreen'].includes(key) ? callingText[key] : undefined);
|
|
86
134
|
if (typeof x !== "string" || !x.trim() ||
|
|
87
135
|
x.length >
|
|
88
136
|
([
|
|
@@ -109,6 +157,25 @@ export function validateCallingAppearance(input) {
|
|
|
109
157
|
}
|
|
110
158
|
return out;
|
|
111
159
|
}
|
|
160
|
+
/** Shared by the optional mobile screen and website preview. */
|
|
161
|
+
export function resolveCallingDesign(appearance, deviceMode = "dark") {
|
|
162
|
+
const presentation = { ...callingPresentation, ...appearance?.presentation };
|
|
163
|
+
const light = presentation.colorMode === "light" ||
|
|
164
|
+
(presentation.colorMode === "system" && deviceMode === "light");
|
|
165
|
+
return {
|
|
166
|
+
presentation,
|
|
167
|
+
colors: light ? { ...callingLightColors, ...appearance?.lightTheme } : { ...callingColors, ...appearance?.theme },
|
|
168
|
+
mode: light ? "light" : "dark",
|
|
169
|
+
avatarSize: presentation.layout === "compact" ? 72 : 104,
|
|
170
|
+
identityGap: presentation.layout === "compact" ? 10 : 14,
|
|
171
|
+
controlRadius: presentation.controlShape === "rounded" ? 18 : 36,
|
|
172
|
+
fontFamily: {
|
|
173
|
+
ios: presentation.font === "serif" ? "Georgia" : presentation.font === "monospace" ? "Menlo" : undefined,
|
|
174
|
+
android: presentation.font === "system" ? undefined : presentation.font,
|
|
175
|
+
web: presentation.font === "serif" ? 'Georgia, "Times New Roman", serif' : presentation.font === "monospace" ? 'Menlo, Consolas, monospace' : '-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
|
|
176
|
+
},
|
|
177
|
+
};
|
|
178
|
+
}
|
|
112
179
|
/** Choose readable icon/status-bar ink against a brand color. */
|
|
113
180
|
export function callingInk(color) {
|
|
114
181
|
const channels = [1, 3, 5].map((i) => parseInt(color.slice(i, i + 2), 16) / 255).map((v) => v <= .04045 ? v / 12.92 : ((v + .055) / 1.055) ** 2.4);
|
|
@@ -119,8 +186,6 @@ export function callingInk(color) {
|
|
|
119
186
|
: "#ffffff";
|
|
120
187
|
}
|
|
121
188
|
export const callingIcons = {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
mute: "M12 3a3 3 0 0 0-3 3v6a3 3 0 0 0 6 0V6a3 3 0 0 0-3-3ZM5 11v1a7 7 0 0 0 6 7v3h2v-3a7 7 0 0 0 6-7v-1h-2v1a5 5 0 0 1-10 0v-1H5Z",
|
|
125
|
-
speaker: "M3 9v6h4l5 4V5L7 9H3Zm12-3v2a5 5 0 0 1 0 8v2a7 7 0 0 0 0-12Zm3-3v2a9 9 0 0 1 0 14v2a11 11 0 0 0 0-18Z",
|
|
189
|
+
share: iconPaths['screen-share'], camera: iconPaths.video, flip: iconPaths.flip,
|
|
190
|
+
answer: iconPaths.phone, end: iconPaths['phone-end'], mute: iconPaths.mic, speaker: iconPaths.speaker,
|
|
126
191
|
};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import React, { type ComponentType, type ReactNode } from 'react';
|
|
2
|
+
import { type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
|
|
3
|
+
import { callingText, callingIcons, resolveCallingDesign, type CallingAppearance } from './appearance.js';
|
|
4
|
+
import type { CallingState } from './types.js';
|
|
5
|
+
export interface CallingTheme {
|
|
6
|
+
background: string;
|
|
7
|
+
foreground: string;
|
|
8
|
+
secondary: string;
|
|
9
|
+
control: string;
|
|
10
|
+
accent: string;
|
|
11
|
+
answer: string;
|
|
12
|
+
end: string;
|
|
13
|
+
}
|
|
14
|
+
type DefaultCallingLabels = typeof callingText;
|
|
15
|
+
export interface CallingLabels extends DefaultCallingLabels {
|
|
16
|
+
}
|
|
17
|
+
export type CallingAction = 'answer' | 'decline' | 'mute' | 'speaker' | 'resume' | 'end' | 'close' | 'camera' | 'flip' | 'share';
|
|
18
|
+
type Icon = keyof typeof callingIcons;
|
|
19
|
+
export interface CallingActionModel {
|
|
20
|
+
label: string;
|
|
21
|
+
visible: boolean;
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
selected: boolean;
|
|
24
|
+
busy: boolean;
|
|
25
|
+
icon?: Icon;
|
|
26
|
+
/** Answer/decline/end use a semantic button color. Other controls use the theme. */
|
|
27
|
+
color?: string;
|
|
28
|
+
/** Hidden and disabled actions are ignored; the controller remains authoritative. */
|
|
29
|
+
onPress(): void;
|
|
30
|
+
}
|
|
31
|
+
export interface CallingSectionProps {
|
|
32
|
+
style?: StyleProp<ViewStyle>;
|
|
33
|
+
}
|
|
34
|
+
export interface CallingLayoutProps extends CallingSectionProps {
|
|
35
|
+
children?: ReactNode;
|
|
36
|
+
contentContainerStyle?: StyleProp<ViewStyle>;
|
|
37
|
+
}
|
|
38
|
+
export interface CallingAvatarProps {
|
|
39
|
+
size?: number;
|
|
40
|
+
}
|
|
41
|
+
export interface CallingContactProps {
|
|
42
|
+
nameStyle?: StyleProp<TextStyle>;
|
|
43
|
+
descriptionStyle?: StyleProp<TextStyle>;
|
|
44
|
+
}
|
|
45
|
+
export interface CallingStatusProps {
|
|
46
|
+
style?: StyleProp<TextStyle>;
|
|
47
|
+
detailStyle?: StyleProp<TextStyle>;
|
|
48
|
+
}
|
|
49
|
+
export interface CallingActionButtonProps extends CallingSectionProps {
|
|
50
|
+
action: CallingAction;
|
|
51
|
+
iconStyle?: StyleProp<ViewStyle>;
|
|
52
|
+
labelStyle?: StyleProp<TextStyle>;
|
|
53
|
+
}
|
|
54
|
+
/** Replace only the sections you need. Define component types outside render. */
|
|
55
|
+
export interface CallingScreenComponents {
|
|
56
|
+
Layout?: ComponentType<CallingLayoutProps>;
|
|
57
|
+
Identity?: ComponentType<CallingSectionProps>;
|
|
58
|
+
Brand?: ComponentType<CallingSectionProps>;
|
|
59
|
+
Avatar?: ComponentType<CallingAvatarProps>;
|
|
60
|
+
Contact?: ComponentType<CallingContactProps>;
|
|
61
|
+
Video?: ComponentType<CallingSectionProps>;
|
|
62
|
+
Status?: ComponentType<CallingStatusProps>;
|
|
63
|
+
Controls?: ComponentType<CallingSectionProps>;
|
|
64
|
+
AudioControls?: ComponentType<CallingSectionProps>;
|
|
65
|
+
IncomingControls?: ComponentType<CallingSectionProps>;
|
|
66
|
+
ActionButton?: ComponentType<CallingActionButtonProps>;
|
|
67
|
+
}
|
|
68
|
+
export interface CallingScreenProps {
|
|
69
|
+
state: CallingState;
|
|
70
|
+
appearance?: CallingAppearance;
|
|
71
|
+
onScreenShare?(): void;
|
|
72
|
+
onCamera?(enabled: boolean): void;
|
|
73
|
+
onSwitchCamera?(): void;
|
|
74
|
+
/** Supplied by NativeCallingOverlay, or your platform's video renderer. */
|
|
75
|
+
renderVideo?(props: {
|
|
76
|
+
stream: MediaStream;
|
|
77
|
+
local: boolean;
|
|
78
|
+
screen?: boolean;
|
|
79
|
+
style: StyleProp<ViewStyle>;
|
|
80
|
+
}): ReactNode;
|
|
81
|
+
onResume?(): void;
|
|
82
|
+
onAnswer(): void;
|
|
83
|
+
onHangUp(): void;
|
|
84
|
+
onMute(value: boolean): void;
|
|
85
|
+
onSpeaker(value: boolean): void;
|
|
86
|
+
onClose(): void;
|
|
87
|
+
theme?: Partial<CallingTheme>;
|
|
88
|
+
labels?: Partial<CallingLabels>;
|
|
89
|
+
formatError?: (code: string) => string;
|
|
90
|
+
insets?: {
|
|
91
|
+
top: number;
|
|
92
|
+
bottom: number;
|
|
93
|
+
};
|
|
94
|
+
components?: CallingScreenComponents;
|
|
95
|
+
}
|
|
96
|
+
export interface CallingUIValue {
|
|
97
|
+
renderVideo?: CallingScreenProps['renderVideo'];
|
|
98
|
+
state: Readonly<CallingState>;
|
|
99
|
+
appearance?: CallingAppearance;
|
|
100
|
+
theme: CallingTheme;
|
|
101
|
+
labels: CallingLabels;
|
|
102
|
+
design: ReturnType<typeof resolveCallingDesign>;
|
|
103
|
+
insets: {
|
|
104
|
+
top: number;
|
|
105
|
+
bottom: number;
|
|
106
|
+
} | null;
|
|
107
|
+
components: CallingScreenComponents;
|
|
108
|
+
title: string;
|
|
109
|
+
status: string;
|
|
110
|
+
error: string | null;
|
|
111
|
+
actions: Readonly<Record<CallingAction, CallingActionModel>>;
|
|
112
|
+
typography(size: number): TextStyle;
|
|
113
|
+
}
|
|
114
|
+
/** Read the same state, labels and guarded actions used by the supplied components. */
|
|
115
|
+
export declare function useCallingUI(): CallingUIValue;
|
|
116
|
+
export interface CallingUIProviderProps extends CallingScreenProps {
|
|
117
|
+
children?: ReactNode;
|
|
118
|
+
}
|
|
119
|
+
/** Presentation only: does not create a client, request microphone access or own audio. */
|
|
120
|
+
export declare function CallingUIProvider({ children, ...props }: CallingUIProviderProps): React.JSX.Element | null;
|
|
121
|
+
/** Scrollable, safe-area-aware frame. Use it when composing your own layout. */
|
|
122
|
+
export declare function CallingLayout({ children, style, contentContainerStyle }: CallingLayoutProps): React.JSX.Element;
|
|
123
|
+
export declare function CallingBrand({ style }?: CallingSectionProps): React.JSX.Element | null;
|
|
124
|
+
export declare function CallingAvatar({ size }?: CallingAvatarProps): React.JSX.Element | null;
|
|
125
|
+
export declare function CallingContact({ nameStyle, descriptionStyle }?: CallingContactProps): React.JSX.Element;
|
|
126
|
+
export declare function CallingStatus({ style, detailStyle }?: CallingStatusProps): React.JSX.Element;
|
|
127
|
+
export declare function CallingIdentity({ style }?: CallingSectionProps): React.JSX.Element;
|
|
128
|
+
/** A state-aware button. Hidden actions render nothing; unavailable actions are disabled. */
|
|
129
|
+
export declare function CallingActionButton({ action, style, iconStyle, labelStyle }: CallingActionButtonProps): React.JSX.Element | null;
|
|
130
|
+
export declare function CallingAudioControls({ style }?: CallingSectionProps): React.JSX.Element | null;
|
|
131
|
+
export declare function CallingIncomingControls({ style }?: CallingSectionProps): React.JSX.Element | null;
|
|
132
|
+
export declare function CallingControls({ style }?: CallingSectionProps): React.JSX.Element;
|
|
133
|
+
/** Video uses the same SDK layout, labels and controls on native and web. */
|
|
134
|
+
export declare function CallingVideo({ style }?: CallingSectionProps): React.JSX.Element | null;
|
|
135
|
+
export {};
|