{"id":25254513,"url":"https://github.com/kaleyravideo/videoflutterplugin","last_synced_at":"2025-04-05T23:14:35.383Z","repository":{"id":178232480,"uuid":"660211872","full_name":"KaleyraVideo/VideoFlutterPlugin","owner":"KaleyraVideo","description":"Flutter plugin enabling video communication through Kaleyra Video SDKs","archived":false,"fork":false,"pushed_at":"2025-03-28T12:13:52.000Z","size":921,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-28T13:25:26.311Z","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-06-29T13:49:58.000Z","updated_at":"2025-03-28T12:13:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"55b8dcef-023b-4412-8089-8182e60540d1","html_url":"https://github.com/KaleyraVideo/VideoFlutterPlugin","commit_stats":null,"previous_names":["kaleyravideo/videoflutterplugin"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaleyraVideo%2FVideoFlutterPlugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaleyraVideo%2FVideoFlutterPlugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaleyraVideo%2FVideoFlutterPlugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaleyraVideo%2FVideoFlutterPlugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KaleyraVideo","download_url":"https://codeload.github.com/KaleyraVideo/VideoFlutterPlugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411238,"owners_count":20934654,"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:23.826Z","updated_at":"2025-04-05T23:14:35.363Z","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 Flutter Plugin\n\n[![pub version](https://img.shields.io/pub/v/kaleyra_video_flutter_plugin)][PubLink]\n\n## How to run the example\n\nExecute the following commands from the repository root folder\n\n```shell\ncd example\n# nano .env use your own keys\nflutter pub get\ncd ios\npod install\n```\n\n## How to install the plugin\n\nOpen the **terminal** in your Flutter-App folder and run the following commands\n\n```shell\nflutter pub add kaleyra_video_flutter_plugin\n```\n\n## Minimum requirements\n- Android 21+, gradle 8+, kotlin 1.9+\n- iOS 15+, swift 5.x\n\n## How to remove the plugin\n\n```shell\nflutter pub remove kaleyra_video_flutter_plugin\n```\n\n## How to use the Kaleyra Video plugin in your Flutter app\n\nYou can refer to the Kaleyra Video plugin in your Flutter app via\n\n```dart\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```dart\nvar configuration = Configuration(\n      appID: \"mAppId_xxx\", // your mobile appId\n      environment: Environment.sandbox(), // production()\n      region: Region.europe(), // india(), us()\n      logEnabled: true, // enable the logger\n      tools: Tools(\n          // by default no tools will be set\n          chat: ChatToolConfiguration(\n              audioCallOption: AudioCallOptions(\n                  type: AudioCallType.audio, // audio or audioUpgradable\n                  recordingType:\n                      RecordingType.none), // none, manual or automatic\n              videoCallOption: CallOptions(\n                  recordingType:\n                      RecordingType.none)), // none, manual or automatic\n          feedback: true,\n          fileShare: true,\n          whiteboard: true,\n          screenShare: ScreenShareToolConfiguration(\n              inApp: true, // screenshare only the app\n              wholeDevice: true)), // screenshare the whole device\n      // optional you can set one or more of the following capabilities, by default callkit is enabled\n      iosConfig: IosConfiguration(\n          voipHandlingStrategy: VoipHandlingStrategy.automatic, // implement to be able to receive VoIPs\n          callkit: CallKitConfiguration(\n              enabled: true, // enable CallKit on iOS 10+\n              appIconName: \"logo_transparent\", // optional but recommended\n              ringtoneSoundName: \"custom_ringtone.mp3\"))); // optional\n\nvar kaleyraVideo = await KaleyraVideo.configure(configuration);\n```\n\nIf screenShare.wholeDevice is set to true look [here][BroadcastAchor] 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```dart\nkaleyraVideo.events.onCallModuleStatusChanged = (status) =\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```dart\nvar configuration = Configuration(\n      [...]\n      iosConfig: IosConfiguration(\n          voipHandlingStrategy: VoipHandlingStrategy.automatic, \n          [...]\n\nvar kaleyraVideo = await KaleyraVideo.configure(configuration);\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\n\nIn order to get your device push token, you must listen for the **KaleyraVideo.events.iOSVoipPushTokenUpdated** event registering a callback as follows:\n\n```dart\n// The token is received in this listener only after calling kaleyraVideo.connect(_)\nkaleyraVideo.events.oniOSVoipPushTokenUpdated = (token) =\u003e {\n    // register the VoIP push token on your server\n};\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 Future\u003cString\u003e 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```dart\nkaleyraVideo.connect(Session(\"usr_xxx\", (userId) async {\n    // get token for user_xxx\n    return \"jwt_xxx\";\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```dart\nkaleyraVideo.startCall(CreateCallOptions(\n    callees: [\"usr_yyy\", \"usr_zzz\"], //  an array of user ids of the users you want to call\n    callType: CallType.audioVideo, // audio, audioUpgradable or audioVideo - the type of the call you want to start\n    recordingType: RecordingType.none)); // none, manual or automatic\n```\n\n## Start a chat\n\nTo make a chat you need to specify some params.\n\n##### Start chat params\n\n```dart\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```dart\nkaleyraVideo.addUsersDetails([\n    UserDetails(userID: \"usr_yyy\", name: \"User1Name\", imageUrl: \"https://www.example.com/user1image.png\"),\n    UserDetails(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```dart\nkaleyraVideo.removeUsersDetails();\n```\n\n## Remove all the cached info in preferences and DBs\n\n```dart\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```dart\nkaleyraVideo.setDisplayModeForCurrentCall(CallDisplayMode.background); // .foreground, .foregroundPictureInPicture or .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 Flutter 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\ntarget 'BroadcastExtension' do\n  use_frameworks!\n\n  pod 'BandyerBroadcastExtension'\nend\n```\n\nFurthermore, to allow a correct configuration of the SDK it is necessary to create a file called \"KaleyraVideoConfig.plist\" and add it to the same target of the application. This 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 \u003ckey\u003ebroadcast\u003c/key\u003e\n \u003cdict\u003e\n  \u003ckey\u003eappGroupIdentifier\u003c/key\u003e\n  \u003cstring\u003e\u003c!-- PUT HERE THE BUNDLE ID OF YOUR APP GROUP --\u003e\u003c/string\u003e\n  \u003ckey\u003eextensionBundleIdentifier\u003c/key\u003e\n  \u003cstring\u003e\u003c!-- PUT HERE THE BUNDLE ID OF YOUR BROADCAST EXTENSION --\u003e\u003c/string\u003e\n \u003c/dict\u003e\n\u003c/dict\u003e\n\u003c/plist\u003e\n```\n\n## iOS Notifications\n\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\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## Documentation\n\nThe API documentation is available on the link:\n[https://pub.dev/documentation/kaleyra_video_flutter_plugin/latest/][Doc]\n\n[PubLink]: https://pub.dev/packages/kaleyra_video_flutter_plugin\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://pub.dev/documentation/kaleyra_video_flutter_plugin/latest/kaleyra_video_flutter_plugin/Events-class.html\n[Doc]: https://pub.dev/documentation/kaleyra_video_flutter_plugin/latest/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaleyravideo%2Fvideoflutterplugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaleyravideo%2Fvideoflutterplugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaleyravideo%2Fvideoflutterplugin/lists"}