{"id":25254518,"url":"https://github.com/kaleyravideo/videocordovaplugin","last_synced_at":"2025-10-27T01:31:07.907Z","repository":{"id":179445691,"uuid":"662149582","full_name":"KaleyraVideo/VideoCordovaPlugin","owner":"KaleyraVideo","description":"Cordova plugin enabling video communication through Kaleyra Video SDKs","archived":false,"fork":false,"pushed_at":"2024-12-30T11:51:43.000Z","size":2287,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-30T13:36:41.881Z","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":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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-07-04T13:11:13.000Z","updated_at":"2024-12-30T11:51:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"c4f52bb4-0924-4ba5-9980-f84ac0ae11c0","html_url":"https://github.com/KaleyraVideo/VideoCordovaPlugin","commit_stats":null,"previous_names":["kaleyravideo/videocordovaplugin"],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaleyraVideo%2FVideoCordovaPlugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaleyraVideo%2FVideoCordovaPlugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaleyraVideo%2FVideoCordovaPlugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaleyraVideo%2FVideoCordovaPlugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KaleyraVideo","download_url":"https://codeload.github.com/KaleyraVideo/VideoCordovaPlugin/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:24.398Z","updated_at":"2025-10-27T01:31:01.683Z","avatar_url":"https://github.com/KaleyraVideo.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Kaleyra Logo](https://static.bandyer.com/corporate/iOS/logo/kaleyra-logo.png)\n\n# Kaleyra Video Cordova Plugin\n\n[![npm version](https://img.shields.io/npm/v/@kaleyra/video-cordova-plugin?color=brightgreen\u0026label=npm%20package)][LinkNpm]\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\nnpm i\ncd example\n# nano www/js/config.js use your own keys\nnpm i\ncordova platform add ios/android \ncordova run ios/android \n```\n\n## How to install the plugin:\n\nOpen the **terminal** in your Cordova-App folder and run the following commands\n\n```sh\ncordova plugin add @kaleyra/video-cordova-plugin\n```\n\n### Advanced installation options\n\nIn order to enable the broadcast screen sharing tool in your cordova app you must add the plugin providing some settings. For more information please take a look at [Kaleyra Video Broadcast Extension Cordova Plugin][BroadcastExtension] documentation.\n\n## How to link local plugin:\n\nLink the local plugin to the project\n\n```sh\n# cd to your application folder\ncordova plugin add ${path-to-local-plugin} --link\n```\n\n## How to remove the plugin:\n\n```sh\ncordova plugin remove @kaleyra/video-cordova-plugin\n```\n\n## Update the Cordova platforms\nEvery time you update the plugin remove the platforms 'android' and/or 'ios' and re add them to ensure that all modified plugins are copied to build folders\nremove platforms 'android' and/or 'ios' and re add them to ensure that all modified plugins are copied to build folders\n\n```bash\ncd {to your app root folder}\n# Add --nosave if you don't want to update your package.json file when executing the commands below\ncordova platforms remove android ios\ncordova platforms add android ios\n```\n\n## How to run the cordova app\n\n### iOS - device\n\n```sh\ncordova run ios\n```\n\n### Android\n\n```sh\ncordova run android\n```\n\n## How to use the plugin in your Cordova app\n\nYou can refer to the Kaleyra Video plugin in your React Native app via\n\n```javascript\nKaleyraVideo\n```\n\n## Plugin setup\n\nThe first thing you need to do is to configure the plugin specifying your keys and your options.\n\n##### Configure params\n\n```javascript\nvar kaleyraVideo = KaleyraVideo.configure({\n    environment: KaleyraVideo.environments.sandbox(), // production()\n    appID: 'mAppId_xxx', // your mobile appId\n    region: KaleyraVideo.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: KaleyraVideo.audioCallTypes.AUDIO, // AUDIO or AUDIO_UPGRADABLE\n                recordingType: KaleyraVideo.recordingTypes.NONE, // NONE, MANUAL or AUTOMATIC\n            },\n            videoCallOption: {\n                recordingType: KaleyraVideo.recordingTypes.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: KaleyraVideo.voipHandlingStrategies.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][BroadcastExtension] for the required additional setup.\n\n## Plugin 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.on(KaleyraVideo.events.callModuleStatusChanged, function (status) {});\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: KaleyraVideo.voipHandlingStrategies.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.on(KaleyraVideo.events.iOSVoipPushTokenUpdated, function (token) {\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## Plugin 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) =\u003e new Promise((success, error) =\u003e {\n        // get token for user_xxx and invoke success or error depending on the result\n        success(\"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: KaleyraVideo.callTypes.AUDIO_VIDEO, // AUDIO, AUDIO_UPGRADABLE or AUDIO_VIDEO - the type of the call you want to start\n    recordingType: KaleyraVideo.recordingTypes.NONE // NONE, MANUAL or AUTOMATIC\n});\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/user1image.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## 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 Notifications\nThe plugin 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\n## Android Notifications\nThe plugin supports only **on_call_incoming** and **on_message_sent** notification types\n\nYou may add the following configuration under platform android in your config.xml.\nThis will add our default notification handling which requires **payload** and **user_token** keys to be defined.\n```xml\n\u003cconfig-file parent=\"/manifest/application\" target=\"app/src/main/AndroidManifest.xml\"\u003e\n    \u003cservice android:name=\"com.kaleyra.video_hybrid_native_bridge.notifications.KaleyraVideoNotificationService\" android:enabled=\"true\" android:exported=\"false\" android:permission=\"android.permission.BIND_JOB_SERVICE\"\u003e\n        \u003cintent-filter\u003e\n            \u003caction android:name=\"com.kaleyra.VideoNotificationEvent\" /\u003e\n            \u003c!--//////// PATH to the object containing the payload, and user_token /////////--\u003e\n            \u003cdata android:path=\"message.kaleyra\" /\u003e\n        \u003c/intent-filter\u003e\n    \u003c/service\u003e\n\u003c/config-file\u003e\n```\n\nExample of acceptable payload\n```json\n{\n  \"google.delivered_priority\":\"high\",\n  \"content-available\":\"1\",\n  \"google.sent_time\":1663347601917,\n  \"google.ttl\":60,\n  \"google.original_priority\":\"high\",\n  \"from\":\"320\",\n  \"title\":\"\",\n  \"google.message_id\":\"0:1123%ac212d7bf9fd7ecd\",\n  \"message\":\"{\\\"kaleyra\\\":{\\\"payload\\\":{\\\"event\\\":\\\"on_call_incoming\\\",\\\"room_id\\\":\\\"room_b36f162\\\",\\\"data\\\":{\\\"initiator\\\":\\\"user1\\\",\\\"users\\\":[{\\\"user\\\":{\\\"userAlias\\\":\\\"user2\\\"},\\\"status\\\":\\\"invited\\\"},{\\\"user\\\":{\\\"userAlias\\\":\\\"user1\\\"},\\\"status\\\":\\\"invited\\\"}],\\\"roomAlias\\\":\\\"room_b37a64c6f162\\\",\\\"options\\\":{\\\"duration\\\":0,\\\"record\\\":true,\\\"recordingType\\\":\\\"manual\\\",\\\"recording\\\":\\\"manual\\\",\\\"creationDate\\\":\\\"2022-09-16T17:00:01.457Z\\\",\\\"callType\\\":\\\"audio_upgradable\\\",\\\"live\\\":true}}},\\\"user_token\\\":\\\"eyJhtokenksadfjoiasdjfoaidjfsoasidjfoi\\\"}}\",\n  \"google.c.sender.id\":\"320\"\n}\n```\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\n## TSDoc\n\nThe API documentation is available on the github pages link:\n[https://kaleyravideo.github.io/VideoCordovaPlugin][TSDoc]\n\n[LinkNpm]: https://www.npmjs.com/package/@kaleyra/video-cordova-plugin\n[BroadcastExtension]: https://github.com/KaleyraVideo/VideoCordovaBroadcastExtensionPlugin\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/VideoCordovaPlugin/enums/events.html\n[TSDoc]: https://kaleyravideo.github.io/VideoCordovaPlugin\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaleyravideo%2Fvideocordovaplugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaleyravideo%2Fvideocordovaplugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaleyravideo%2Fvideocordovaplugin/lists"}