{"id":25254526,"url":"https://github.com/kaleyravideo/videoreactnativemodule","last_synced_at":"2026-01-07T13:17:38.586Z","repository":{"id":175883219,"uuid":"654649692","full_name":"KaleyraVideo/VideoReactNativeModule","owner":"KaleyraVideo","description":"React native module enabling video communication through Kaleyra Video SDKs","archived":false,"fork":false,"pushed_at":"2024-12-30T11:52:18.000Z","size":4162,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-04T21:01:53.341Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KaleyraVideo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-16T15:47:16.000Z","updated_at":"2024-12-30T11:52:21.000Z","dependencies_parsed_at":"2024-04-24T09:41:37.997Z","dependency_job_id":"df958468-42a5-4738-9906-3a7096fb5ee4","html_url":"https://github.com/KaleyraVideo/VideoReactNativeModule","commit_stats":{"total_commits":95,"total_committers":23,"mean_commits":4.130434782608695,"dds":0.6736842105263158,"last_synced_commit":"ca576b68cdaef4507d8cfb0428d11a08a9f0d7ac"},"previous_names":["kaleyravideo/videoreactnativemodule"],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaleyraVideo%2FVideoReactNativeModule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaleyraVideo%2FVideoReactNativeModule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaleyraVideo%2FVideoReactNativeModule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaleyraVideo%2FVideoReactNativeModule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KaleyraVideo","download_url":"https://codeload.github.com/KaleyraVideo/VideoReactNativeModule/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238418452,"owners_count":19468914,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-12T05:32:25.942Z","updated_at":"2025-10-27T01:31:01.561Z","avatar_url":"https://github.com/KaleyraVideo.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Kaleyra Logo](https://github.com/KaleyraVideo/VideoReactNativeModule/blob/main/doc/img/kaleyra-video.png)\n\n# Kaleyra Video React Native Module\n\n[![npm version](https://img.shields.io/npm/v/@kaleyra/video-react-native-module?color=brightgreen\u0026label=npm%20package)][LinkNpm]\n\n## Our machine development setup\n\n```\nruby = 2.7.6\nnode \u003e= v18\nreact-native \u003e= 0.74.x\nyarn \u003e= 1.22.17\n```\n\n## Minimum requirements\n- Android 21+, gradle 8+, kotlin 1.9+\n- iOS 15+, swift 5.x\n\n## How to run the example\n\nExecute the following commands from the repository root folder\n\n```shell\nyarn\nyarn prepack\nyarn link\ncd example\n# nano .env use your own keys\nyarn\nyarn link @kaleyra/video-react-native-module\nyarn pods\nyarn start\nyarn ios\nyarn android\n```\n\n### Reset react native build cache\n```shell\nreact-native start --reset-cache\n```\n\n## How to install the module:\n\nOpen the **terminal** in your React-Native-App folder and run the following commands\n\n```shell\nnpm install @kaleyra/video-react-native-module\n```\n\n# Android additional configuration may be required (depends on your integration)\n -  add tools:replace=\"android:allowBackup\" to AndroidManifest.xml. See here for an [example](https://github.com/KaleyraVideo/VideoReactNativeModule/blob/main/example/android/app/src/main/AndroidManifest.xml#L8)\n -  add maven { url 'https://maven.bandyer.com/releases' } in build.gradle. See here for an [example](https://github.com/KaleyraVideo/VideoReactNativeModule/blob/1599d0f355e4a699a92404c450102e519cfe2866/example/android/build.gradle#L32)\n\n### Standalone iOS framework\n\nIn case your application already provides the WebRTC framework in a third party module, a conflict may arise when trying to install the dependencies through Cocoapods.\nIn order to resolve the conflict you can download and install the Kaleyra Video iOS framework as a standalone package.\nTo enable the standalone framework you must change your application's Podfile declaring the `$KaleyraNoWebRTC` variable before the first target definition. You can give whatever value you want to the variable as long as it is defined before the target definitions.\n\n```ruby\nplatform :ios, min_ios_version_supported\nprepare_react_native_project!\n\n$KaleyraNoWebRTC = ''\n\ntarget 'KaleyraVideoReact' do\n  config = use_native_modules!\n\n  # Flags change depending on the env values.\n  flags = get_default_flags()\n[...]\nend\n```\n\n\u003e [!CAUTION]\n\u003e Use the standalone framework only as a last resort in case you have a WebRTC framework conflict. Because we cannot guarantee that the WebRTC framework you are using is compatible with our SDK, you are responsible for assess the compatibility with our module. However, WebRTC versions greater than or equal to M100 should work fine.\n\n## How to remove the module:\n\n```shell\nnpm uninstall @kaleyra/video-react-native-module\n```\n\n## How to use the Kaleyra Video module in your React Native app\n\nYou can refer to the Kaleyra Video module in your React Native app via\n\n```javascript\nKaleyraVideo\n```\n\n## Module setup\n\nThe first thing you need to do is to configure the module specifying your keys and your options.\n\n##### Configure params\n\n```javascript\nvar kaleyraVideo = KaleyraVideo.configure({\n    environment: Environments.sandbox(), // production()\n    appID: 'mAppId_xxx', // your mobile appId\n    region: Regions.europe(), // india(), us()\n    logEnabled: true, // enable the logger\n    tools: { // by default no tools will be set\n        chat: {\n            audioCallOption: {\n                type: AudioCallType.AUDIO, // AUDIO or AUDIO_UPGRADABLE\n                recordingType: RecordingType.NONE, // NONE, MANUAL or AUTOMATIC\n            },\n            videoCallOption: {\n                recordingType: RecordingType.NONE, // NONE, MANUAL or AUTOMATIC\n            }\n        },\n        fileShare: true,\n        whiteboard: true,\n        screenShare: {\n            inApp: true, // screenshare only the app\n            wholeDevice: true // screenshare the whole device\n        },\n        feedback: true\n    },\n\n    // optional you can set one or more of the following capabilities, by default callkit is enabled\n    iosConfig: {\n        voipHandlingStrategy: VoipHandlingStrategy.AUTOMATIC, // implement to be able to receive voips\n        callkit: {\n            enabled: true, // enable callkit on iOS 10+\n            appIconName: \"logo_transparent\", // optional but recommended\n            ringtoneSoundName: \"custom_ringtone.mp3\" // optional\n        }\n    }\n});\n```\n\nIf screenShare.wholeDevice is set to true look [here][BroadcastAchor] for the required additional setup.\n\n## Module listen for errors/events\n\nTo listen for events and/or errors register\nCheck the documentation [here][EventsDoc] for a complete list.\n\nExample:\n\n```javascript\nkaleyraVideo.events.onCallModuleStatusChanged = (status: String) =\u003e {};\n```\n\n## iOS - VoIP Notifications\n\n### Setup required for VoIP notifications\n\nIf you desire to use VoIP notifications on iOS platform as first thing you should configure kaleyraVideo passing a config object as follow:\n\n```javascript\nvar kaleyraVideo = KaleyraVideo.configure({\n    [...]\n    iosConfig: {\n        voipHandlingStrategy: VoipHandlingStrategy.AUTOMATIC,\n        [...]\n    }\n});\n```\n\nThe iOS project requires a little setup for use VoIP notifications. [Here][iOSProjectSetup] you can find a description of how the project should be configured.\n\n### Listening for VoIP push token\nIn order to get your device push token, you must listen for the **KaleyraVideo.events.iOSVoipPushTokenUpdated** event registering a callback as follows:\n\n```javascript\n// The token is received in this listener only after calling kaleyraVideo.connect(_)\nkaleyraVideo.events.oniOSVoipPushTokenUpdated = (token: string) =\u003e {\n    // register the VoIP push token on your server\n};\n```\n**Warning:** Make sure this listener is attached before calling kaleyraVideo.connect(_), otherwise the event reporting the device token could be missed.\n\nThe token provided in the callback is the **string** representation of your device token.\nHere's an example of a device token: **dec105f879924349fd2fa9aa8bb8b70431d5f41d57bfa8e31a5d80a629774fd9**\n\n### VoIP notification payload\n\n[Here][iOSVoIPPayload] you can find an example of how your VoIP notifications payload should be structured.\n\n\n## Module connect\n\nTo connect the plugin to the Kaleyra Video system you will need to provide a Session object.\nThe session needs a userID and a function returning a promise with the access token for that user.\n\n\u003e [!IMPORTANT]\n\u003e - The *userID* should aready exists in our service. Your backend needs to create it by invoking this api [create_user](https://developers.kaleyra.io/reference/video-v2-user-post)\n\u003e - The *accessToken* should be generated from your backend by invoking this api [get_credentials](https://developers.kaleyra.io/reference/video-v2-sdk-post). Be aware that it expires. The callback will be called multiple times every time a new token is needed to refresh the user session.\n\n```javascript\nkaleyraVideo.connect({\n    userID: \"usr_xxx\",\n    accessTokenProvider(userId: string): Promise\u003cstring\u003e {\n        // get token for user_xxx and invoke success or error depending on the result\n        return Promise.resolve(\"jwt_xxx\");\n    },\n});\n```\n\n## Start a call\n\nTo make a call you need to specify some params.\n\n##### Start call params\n\n```javascript\nkaleyraVideo.startCall({\n    callees: ['usr_yyy','usr_zzz'], //  an array of user ids of the users you want to call\n    callType: CallType.AUDIO_VIDEO, // AUDIO, AUDIO_UPGRADABLE or AUDIO_VIDEO - the type of the call you want to start\n    recordingType: RecordingType.NONE // NONE, MANUAL or AUTOMATIC\n});\n```\n\n##### Start call with URL\n\n```javascript\nkaleyraVideo.startCallFrom(\"https://\");\n```\n\n## Start a chat\n\nTo make a chat you need to specify some params.\n\n##### Start chat params\n\n```javascript\nkaleyraVideo.startChat('usr_yyy');// the user_id of the user you want to create a chat with\n```\n\n## Set user details\n\nThis method will allow you to set your user details DB from which the sdk will read when needed to show the information.\n\u003e Be sure to have this always up to date, otherwise if an incoming call is received and the user is missing in this set the user ids will be printed on the UI.\n\n```javascript\nkaleyraVideo.addUsersDetails([\n    {userID: \"usr_yyy\", name: \"User1Name\", imageUrl: \"https://www.example.com/user1image.png\"},\n    {userID: \"usr_zzz\", name: \"User2Name\", imageUrl: \"https://www.example.com/user2image.png\"},\n]);\n```\n\n## Remove all user details\n\nThis method will allow you to remove all the user info from the local app DB.\n\n```javascript\nkaleyraVideo.removeUsersDetails();\n```\n\n\n## Remove all the cached info in preferences and DBs\n\n```javascript\nkaleyraVideo.clearUserCache();\n```\n\n## Android change display mode\n\nThis method is useful for use-cases where you need to show a prompt and don't want it to be invalidated by the call going into pip.\nFor example: if you wish to show fingerprint dialog you should first put the current call in background, execute the fingerprint validation and then put back the call in foreground.\n\n```javascript\nkaleyraVideo.setDisplayModeForCurrentCall(CallDisplayMode.FOREGROUND); // FOREGROUND, FOREGROUND_PICTURE_IN_PICTURE or CallDisplayMode.BACKGROUND\n```\n\n## iOS Broadcast Screen sharing\n\nTo enable whole device screen share is required and additional setup.\nOpen the iOS Xcode project of your React Native application and follow [this guide][BroadcastSceenSharing].\nAfter completing the procedure described in the guide above you need to add to your Podfile this lines:\n\n```ruby\n\ntarget 'KaleyraVideoReact' do\n  pod 'BandyerBroadcastExtension'\n  ...\nend\n\ntarget 'BroadcastExtension' do\n  pod 'BandyerBroadcastExtension'\nend\n```\n\nFurthermore, to allow a correct configuration of the SDK it is necessary to:\n - create a file called \"KaleyraVideoConfig.plist\"\n - add it to the same target of the application. (and NOT to the Extension)\n - set Extension Minimum Deployments to match the version of the Application\n\nThis file must have the following content:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003c!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"\u003e\n\u003cplist version=\"1.0\"\u003e\n\u003cdict\u003e\n\t\u003ckey\u003ebroadcast\u003c/key\u003e\n\t\u003cdict\u003e\n\t\t\u003ckey\u003eappGroupIdentifier\u003c/key\u003e\n\t\t\u003cstring\u003e\u003c!-- PUT HERE THE BUNDLE ID OF YOUR APP GROUP --\u003e\u003c/string\u003e\n\t\t\u003ckey\u003eextensionBundleIdentifier\u003c/key\u003e\n\t\t\u003cstring\u003e\u003c!-- PUT HERE THE BUNDLE ID OF YOUR BROADCAST EXTENSION --\u003e\u003c/string\u003e\n\t\u003c/dict\u003e\n\u003c/dict\u003e\n\u003c/plist\u003e\n```\n\n## iOS Notifications\nThe module supports **on_call_incoming** notification.\nYou will need to set the **voipHandlingStrategy** and subscribe to **iOSVoipPushTokenUpdated** event to receive the voip token to use on your backend to notify the plugin.\n \u003e Be aware that notifications VOIP notifications are different compared to push. They must be always handled by ensuring the invocation of the configure and connect methods in index.js or App.js.\n\n## Android Notifications\nWhen recevied a **on_call_incoming** or **on_message_sent** notification you just need to configure and connect the plugin and it will automatically show the notification.\n\n## Proguard\n```groovy\n# Bandyer now Kaleyra proprietary SDK\n-keep class com.bandyer.** { *; }\n-keep interface com.bandyer.** { *; }\n-keep enum com.bandyer.** { *; }\n\n-keep class com.kaleyra.** { *; }\n-keep interface com.kaleyra.** { *; }\n-keep enum com.kaleyra.** { *; }\n```\n\n## TSDoc\n\nThe API documentation is available on the github pages link:\n[https://kaleyravideo.github.io/VideoReactNativeModule/][TSDoc]\n\n[LinkNpm]: https://www.npmjs.com/package/@kaleyra/video-react-native-module\n[BroadcastAchor]: #ios-broadcast-screen-sharing\n[BroadcastSceenSharing]: https://github.com/Bandyer/Bandyer-iOS-SDK/wiki/Screen-sharing#broadcast-screen-sharing\n[iOSProjectSetup]: https://github.com/Bandyer/Bandyer-iOS-SDK/wiki/VOIP-notifications#project-setup\n[iOSVoIPPayload]: https://github.com/Bandyer/Bandyer-iOS-SDK/wiki/VOIP-notifications#notification-payload-key-path\n[EventsDoc]: https://kaleyravideo.github.io/VideoReactNativeModule/interfaces/src_events_Events.Events.html\n[TSDoc]: https://kaleyravideo.github.io/VideoReactNativeModule/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaleyravideo%2Fvideoreactnativemodule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaleyravideo%2Fvideoreactnativemodule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaleyravideo%2Fvideoreactnativemodule/lists"}