@daily-co/react-native-daily-js 0.23.0 → 0.24.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.
@@ -72,7 +72,7 @@ public class DailyOngoingMeetingForegroundService extends Service {
72
72
  getPackageName());
73
73
 
74
74
  Intent notificationIntent = new Intent(this, activityClassToOpenFromNotification);
75
- PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0);
75
+ PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, PendingIntent.FLAG_IMMUTABLE);
76
76
 
77
77
  Notification notification = new NotificationCompat.Builder(this, NOTIFICATION_CHANNEL_ID)
78
78
  .setContentTitle(title)
package/dist/index.js CHANGED
@@ -92,7 +92,7 @@ function setupGlobals() {
92
92
  return react_native_background_timer_1.default.setTimeout(fn, ms);
93
93
  };
94
94
  }
95
- global.DailyNativeUtils = __assign(__assign({}, DailyNativeUtils), { setAudioMode: WebRTCModule.setDailyAudioMode, enableNoOpRecordingEnsuringBackgroundContinuity: WebRTCModule.enableNoOpRecordingEnsuringBackgroundContinuity, addAudioFocusChangeListener: function (listener) {
95
+ global.DailyNativeUtils = __assign(__assign({}, DailyNativeUtils), { setAudioMode: WebRTCModule.setDailyAudioMode, setAudioDevice: WebRTCModule.setAudioDevice, getAudioDevice: WebRTCModule.getAudioDevice, enableNoOpRecordingEnsuringBackgroundContinuity: WebRTCModule.enableNoOpRecordingEnsuringBackgroundContinuity, addAudioFocusChangeListener: function (listener) {
96
96
  audioFocusChangeListeners.add(listener);
97
97
  }, removeAudioFocusChangeListener: function (listener) {
98
98
  audioFocusChangeListeners.delete(listener);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daily-co/react-native-daily-js",
3
- "version": "0.23.0",
3
+ "version": "0.24.0",
4
4
  "description": "React Native library for making video calls using Daily",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -26,18 +26,18 @@
26
26
  "baseUrl": "https://github.com/daily-co/react-native-daily-js"
27
27
  },
28
28
  "dependencies": {
29
- "@daily-co/daily-js": "^0.25.0",
29
+ "@daily-co/daily-js": "^0.26.0",
30
30
  "@types/react-native-background-timer": "^2.0.0",
31
31
  "react-native-url-polyfill": "^1.1.2"
32
32
  },
33
33
  "//": "WHEN ONE OF THESE CHANGE, PLEASE UPDATE README.md INSTALL SNIPPET ACCORDINGLY",
34
34
  "peerDependencies": {
35
- "@daily-co/react-native-webrtc": "1.94.1-daily.2",
35
+ "@daily-co/react-native-webrtc": "1.94.1-daily.4",
36
36
  "@react-native-async-storage/async-storage": "^1.15.7",
37
37
  "react-native-background-timer": "^2.3.1"
38
38
  },
39
39
  "devDependencies": {
40
- "@daily-co/react-native-webrtc": "1.94.1-daily.2",
40
+ "@daily-co/react-native-webrtc": "1.94.1-daily.4",
41
41
  "@react-native-async-storage/async-storage": "^1.15.7",
42
42
  "react-native-background-timer": "^2.3.1",
43
43
  "typescript": "^3.8.3"
@@ -69,6 +69,7 @@ export type DailyEvent =
69
69
  | 'waiting-participant-added'
70
70
  | 'waiting-participant-updated'
71
71
  | 'waiting-participant-removed'
72
+ | 'available-devices-updated'
72
73
  | 'receive-settings-updated';
73
74
 
74
75
  export type DailyMeetingState =
@@ -233,6 +234,12 @@ export interface DailyVideoElementInfo {
233
234
  video_height: number;
234
235
  }
235
236
 
237
+ export interface DailyDeviceInfos {
238
+ camera: {} | MediaDeviceInfo;
239
+ mic: {} | MediaDeviceInfo;
240
+ speaker: {} | MediaDeviceInfo;
241
+ }
242
+
236
243
  export interface DailyNetworkStats {
237
244
  quality: number;
238
245
  stats: {
@@ -464,6 +471,11 @@ export interface DailyEventObjectReceiveSettingsUpdated {
464
471
  receiveSettings: DailyReceiveSettings;
465
472
  }
466
473
 
474
+ export interface DailyEventObjectAvailableDevicesUpdated {
475
+ action: Extract<DailyEvent, 'available-devices-updated'>;
476
+ availableDevices: MediaDeviceInfo[];
477
+ }
478
+
467
479
  export interface DailyEventObjectLiveStreamingStarted {
468
480
  action: Extract<DailyEvent, 'live-streaming-started'>;
469
481
  layout?: DailyStreamingLayoutConfig;
@@ -486,43 +498,44 @@ export interface DailyEventObjectRemoteMediaPlayerStopped {
486
498
  reason: DailyRemoteMediaPlayerStopReason;
487
499
  }
488
500
 
489
- export type DailyEventObject<
490
- T extends DailyEvent = any
491
- > = T extends DailyEventObjectAppMessage['action']
492
- ? DailyEventObjectAppMessage
493
- : T extends DailyEventObjectNoPayload['action']
494
- ? DailyEventObjectNoPayload
495
- : T extends DailyEventObjectFatalError['action']
496
- ? DailyEventObjectFatalError
497
- : T extends DailyEventObjectNonFatalError['action']
498
- ? DailyEventObjectNonFatalError
499
- : T extends DailyEventObjectGenericError['action']
500
- ? DailyEventObjectGenericError
501
- : T extends DailyEventObjectParticipants['action']
502
- ? DailyEventObjectParticipants
503
- : T extends DailyEventObjectParticipant['action']
504
- ? DailyEventObjectParticipant
505
- : T extends DailyEventObjectWaitingParticipant['action']
506
- ? DailyEventObjectWaitingParticipant
507
- : T extends DailyEventObjectAccessState['action']
508
- ? DailyEventObjectAccessState
509
- : T extends DailyEventObjectTrack['action']
510
- ? DailyEventObjectTrack
511
- : T extends DailyEventObjectRecordingStarted['action']
512
- ? DailyEventObjectRecordingStarted
513
- : T extends DailyEventObjectRemoteMediaPlayerUpdate['action']
514
- ? DailyEventObjectRemoteMediaPlayerUpdate
515
- : T extends DailyEventObjectRemoteMediaPlayerStopped['action']
516
- ? DailyEventObjectRemoteMediaPlayerStopped
517
- : T extends DailyEventObjectNetworkQualityEvent['action']
518
- ? DailyEventObjectNetworkQualityEvent
519
- : T extends DailyEventObjectNetworkConnectionEvent['action']
520
- ? DailyEventObjectNetworkConnectionEvent
521
- : T extends DailyEventObjectActiveSpeakerChange['action']
522
- ? DailyEventObjectActiveSpeakerChange
523
- : T extends DailyEventObjectReceiveSettingsUpdated['action']
524
- ? DailyEventObjectReceiveSettingsUpdated
525
- : any;
501
+ export type DailyEventObject<T extends DailyEvent = any> =
502
+ T extends DailyEventObjectAppMessage['action']
503
+ ? DailyEventObjectAppMessage
504
+ : T extends DailyEventObjectNoPayload['action']
505
+ ? DailyEventObjectNoPayload
506
+ : T extends DailyEventObjectFatalError['action']
507
+ ? DailyEventObjectFatalError
508
+ : T extends DailyEventObjectNonFatalError['action']
509
+ ? DailyEventObjectNonFatalError
510
+ : T extends DailyEventObjectGenericError['action']
511
+ ? DailyEventObjectGenericError
512
+ : T extends DailyEventObjectParticipants['action']
513
+ ? DailyEventObjectParticipants
514
+ : T extends DailyEventObjectParticipant['action']
515
+ ? DailyEventObjectParticipant
516
+ : T extends DailyEventObjectWaitingParticipant['action']
517
+ ? DailyEventObjectWaitingParticipant
518
+ : T extends DailyEventObjectAccessState['action']
519
+ ? DailyEventObjectAccessState
520
+ : T extends DailyEventObjectTrack['action']
521
+ ? DailyEventObjectTrack
522
+ : T extends DailyEventObjectRecordingStarted['action']
523
+ ? DailyEventObjectRecordingStarted
524
+ : T extends DailyEventObjectRemoteMediaPlayerUpdate['action']
525
+ ? DailyEventObjectRemoteMediaPlayerUpdate
526
+ : T extends DailyEventObjectRemoteMediaPlayerStopped['action']
527
+ ? DailyEventObjectRemoteMediaPlayerStopped
528
+ : T extends DailyEventObjectNetworkQualityEvent['action']
529
+ ? DailyEventObjectNetworkQualityEvent
530
+ : T extends DailyEventObjectNetworkConnectionEvent['action']
531
+ ? DailyEventObjectNetworkConnectionEvent
532
+ : T extends DailyEventObjectActiveSpeakerChange['action']
533
+ ? DailyEventObjectActiveSpeakerChange
534
+ : T extends DailyEventObjectReceiveSettingsUpdated['action']
535
+ ? DailyEventObjectReceiveSettingsUpdated
536
+ : T extends DailyEventObjectAvailableDevicesUpdated['action']
537
+ ? DailyEventObjectAvailableDevicesUpdated
538
+ : any;
526
539
 
527
540
  export type DailyNativeInCallAudioMode = 'video' | 'voice';
528
541
 
@@ -678,11 +691,18 @@ export interface DailyCall {
678
691
  cycleCamera(): Promise<{
679
692
  device: { facingMode: DailyCameraFacingMode } | null;
680
693
  }>;
694
+ setCamera(cameraDeviceId: string | number): Promise<{
695
+ device: { facingMode: DailyCameraFacingMode } | null;
696
+ }>;
697
+ setAudioDevice(deviceId: string): Promise<{
698
+ deviceId: String;
699
+ }>;
681
700
  getCameraFacingMode(): Promise<DailyCameraFacingMode | null>;
682
701
  nativeInCallAudioMode(): DailyNativeInCallAudioMode;
683
702
  setNativeInCallAudioMode(
684
703
  inCallAudioMode: DailyNativeInCallAudioMode
685
704
  ): DailyCall;
705
+ getInputDevices(): Promise<DailyDeviceInfos>;
686
706
  startLiveStreaming(options: DailyLiveStreamingOptions): void;
687
707
  updateLiveStreaming(options: { layout?: DailyStreamingLayoutConfig }): void;
688
708
  stopLiveStreaming(): void;