aliyun_rtc_plugin 0.0.7 copy "aliyun_rtc_plugin: ^0.0.7" to clipboard
aliyun_rtc_plugin: ^0.0.7 copied to clipboard

flutter dart plugin for AliRtc implements at Android and iOS Platform.

aliyun_rtc_plugin #

A new Flutter plugin project.

Getting Started #

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Integrated #

get plugins from pub.dev #

aliyun_rtc_plugin: 0.0.6

use plugin Rtc Player At Project #

       late RtcPVPlayerController _controller;

       @override
       void initState() {
          super.initState();

          _controller = RtcPVPlayerController.instance();

          final dataSource = DataSource(
            appId: "xxxx",
            nonce: "xxxx",
            timestamp: 1675837679,
            token: "xxxxx",
            channelId: "xxxx",
            userId: "xxxx",
            userName: "xxxx",
            userHeaderImg: 'xxxx',
          );
          _controller.initialize(dataSource);
       }

       VideoPlayerPlatformView(
              controller: _controller,
              videoCall: false,
              stateChanged: (state) {
                if (state == VideoEventType.unknown ||
                    state == VideoEventType.disconnected) {
                  Navigator.of(buildContext).pop();
                  // SystemChannels.platform.invokeMethod('SystemNavigator.pop');
                }
              },
            );
          },
        )),

android integrate #

  • 需要在应用中申请打开摄像头权限, 录音权限, 以及存储权限,否则插件运行后会异常断开

iOS integrate #

  • add permission description to Info.plist
 <key>NSCameraUsageDescription</key>
	<string>Use Camera</string>
	<key>NSMicrophoneUsageDescription</key>
	<string>Use microphone</string>
	<key>UIRequiresPersistentWiFi</key>
	<true/>
	<key>io.flutter.embedded_views_preview</key>
	<true/>


2
likes
130
pub points
0%
popularity

Publisher

unverified uploader

flutter dart plugin for AliRtc implements at Android and iOS Platform.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on aliyun_rtc_plugin