dependencies:
stream_video: ^latest
stream_video_flutter: ^latest
stream_video_push_notification: ^latest
stream_video_screen_sharing: ^latest
Installation
The Flutter SDK for Stream Video is distributed through pub.dev. The SDK contains four different packages: stream_video_flutter, stream_video, stream_video_push_notification and stream_video_screen_sharing. Releases and changes are published on the GitHub releases page.
Adding the SDK to your project
To add the Flutter SDK, you can add the latest dependencies for the SDK to your pubspec.yaml
file:
Additionally, you can also run the flutter pub add
command in the terminal to do this:
flutter pub add stream_video_flutter
flutter pub add stream_video
flutter pub add stream_video_push_notification
flutter pub add stream_video_screen_sharing
This command will automatically install the latest versions of the Stream SDK packages from pub.dev to the dependencies section of your pubspec.yaml
.
Permissions
Making video calls requires the usage of the device’s camera and microphone. Therefore, before you can make and answer calls, you need to request permission to use them within your application.
The following permissions must be granted for both Android and iOS:
- Internet Connectivity
- Camera
- Microphone (+ control audio settings to adjust audio level & switch between speaker & earpiece)
- Bluetooth (wireless headset)
iOS
For iOS, we recommend you add the following keys and values to your Info.plist
file at a minimum:
<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) needs access to your camera for video calls.</string>
<key>NSMicrophoneUsageDescription</key>
<string>$(PRODUCT_NAME) needs access to your microphone for voice and video calls.</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
</array>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>fetch</string>
<string>processing</string>
<string>remote-notification</string>
<string>voip</string>
</array>
Android
For Android, similar permissions are needed in <project root>/android/app/src/main/AndroidManifest.xml
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
With Android specifically, you will also need to add additional permission if you would like to use Bluetooth devices:
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
VoIP Calling
We also ship the stream_video_push_notification package to allow you to add integrations with native calling interfaces such as CallKit. Please check out our ringing guide for additional setup needed for integration.