flutter_nimplayer 0.1.0 copy "flutter_nimplayer: ^0.1.0" to clipboard
flutter_nimplayer: ^0.1.0 copied to clipboard

A Flutter plugin for netease yunxin vod player. (网易云信点播播放器 SDK)

flutter_nimplayer #

Flutter 版的网易云信点播播放器 SDK,支持 Android & iOS。

pub package

开始使用 #

添加依赖:

dependencies:
  flutter_nimplayer: ^{latest_version}

用法 #

第一步,创建播放器:

player = FlutterNimplayerFactory.createPlayer();

第二步,添加播放器视图:

NimplayerView(
  onCreated: (viewId) {
    initAndPlay(viewId);
  },
  x: 0,
  y: 0,
  width: viewWidth,
  height: viewHeight,
);

第三步,设置播放源并播放:

void initAndPlay(int viewId) {
  // 建立连接
  player?.setPlayerView(viewId);
  // 设置播放链接
  player?.setUrl(url);
  // 准备播放
  player?.prepare();
}

具体示例请移步项目下的 example 文件夹,更多播放器接口以及播放回调请查看项目源码。

欢迎提交 issue 和 PR 帮助完善该项目。

2
likes
150
pub points
0%
popularity

Publisher

verified publisherajiew.me

A Flutter plugin for netease yunxin vod player. (网易云信点播播放器 SDK)

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on flutter_nimplayer