You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
小赖
f2f646f075
|
4 years ago | |
---|---|---|
android | 4 years ago | |
assets | 4 years ago | |
example | 4 years ago | |
ios | 4 years ago | |
lib | 4 years ago | |
test | 4 years ago | |
CHANGELOG.md | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 4 years ago | |
pubspec.yaml | 4 years ago |
README.md
腾讯直播 Flutter插件
依赖
dependencies:
flutter:
sdk: flutter
tencent_live_fluttify: ^x.x.x
配置
Android
- 如果你的AndroidManifest.xml的application标签配置了
android:label
属性, 那么编译时会出错, 报错信息为:
/Users/xxx/AndroidManifest.xml:10:9-41 Error:
Attribute application@label value=(new_project_test) from AndroidManifest.xml:10:9-41
is also present at [com.tencent.liteavsdk:LiteAVSDK_Smart:7.2.8927] AndroidManifest.xml:30:9-41 value=(@string/app_name).
Suggestion: add 'tools:replace="android:label"' to <application> element at AndroidManifest.xml:8:5-46:19 to override.
FAILURE: Build failed with an exception.
你需要做的是按照错误提示, 添加tools:replace="android:label"
到application标签下, 注意tools:
命名空间需要另外导入.
完整的修改后的AndroidManifest.xml示例:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" <!--需要添加的代码-->
package="xxx">
<application
android:name="io.flutter.app.FlutterApplication"
android:label="xxx"
tools:replace="android:label" <!--需要添加的代码-->
android:icon="@mipmap/ic_launcher">
...
</application>
</manifest>
iOS
- 推流需要摄像头和麦克风权限, 并且需要配置为UiKitView使能, 在Info.plist中添加:
<key>NSMicrophoneUsageDescription</key>
<string>需要麦克风</string>
<key>NSCameraUsageDescription</key>
<string>需要相机</string>
<key>io.flutter.embedded_views_preview</key>
<string>YES</string>
- 腾讯直播的pod比较大, 有198M,
pod install
时间比较久, 请耐心等待,pod install --verbose
可以观察下载进度.
导入
import 'package:tencent_live_fluttify/tencent_live_fluttify.dart';
使用
参考wiki.
社区
QQ群 |
---|
社区版与专业版
推流 | 社区版 | 专业版 |
---|---|---|
预览 | ✅ | ✅ |
推流 | ✅ | ✅ |
暂停推流 | ✅ | ✅ |
停止推流 | ✅ | ✅ |
停止预览 | ✅ | ✅ |
切换前后摄像头 | ✅ | ✅ |
打开/关闭闪光灯 | ✅ | ✅ |
播放背景音乐 | ✅ | ✅ |
停止背景音乐 | ✅ | ✅ |
暂停背景音乐 | ✅ | ✅ |
恢复背景音乐 | ✅ | ✅ |
麦克风音量大小 | ✅ | ✅ |
背景音乐音量大小 | ✅ | ✅ |
背景音乐音调高低 | ✅ | ✅ |
事件处理 | ✅ | ✅ |
设置观众看到的画面清晰度 | ☑️ | ✅ |
美颜 | ☑️ | ✅ |
滤镜 | ☑️ | ✅ |
调整摄像头的焦距 | ☑️ | ✅ |
设置曝光比例 | ☑️ | ✅ |
观众端镜像效果 | ☑️ | ✅ |
横屏推流 | ☑️ | ✅ |
隐私模式(垫片推流) | ☑️ | ✅ |
设置混音效果 | ☑️ | ✅ |
设置变调效果 | ☑️ | ✅ |
设置 Logo 水印 | ☑️ | ✅ |
开始本地录制 | ☑️ | ✅ |
停止本地录制 | ☑️ | ✅ |
发送 SEI 消息 | ☑️ | ✅ |
拉流 | 社区版 | 专业版 |
---|---|---|
播放 | ✅ | ✅ |
恢复播放 | ✅ | ✅ |
恢复直播 | ✅ | ✅ |
是否在播放中 | ✅ | ✅ |
暂停播放 | ✅ | ✅ |
停止播放 | ✅ | ✅ |
事件处理 | ✅ | ✅ |
清晰度无缝切换 | ☑️ | ✅ |
画面调整 | ☑️ | ✅ |
LICENSE
Copyright (C) 2020 yohom
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.