• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

neeko: Simple video player widget based on video_player. Neek supports more acti ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

neeko

开源软件地址:

https://gitee.com/OpenFlutter/neeko

开源软件介绍:

Neeko pub package

Simple video player widget based on video_player. Neek supports more actions such as timeline control, toggle fullscreen and so on.

Note: This plugin is still under development. Pull Requests are most welcome.

Installation

First, add neeko as a dependency in your pubspec.yaml file.

iOS

Warning: The video player is not functional on iOS simulators. An iOS device must be used during development/testing.

Add the following entry to your Info.plist file, located in <project root>/ios/Runner/Info.plist:

<key>NSAppTransportSecurity</key><dict>  <key>NSAllowsArbitraryLoads</key>  <true/></dict>

This entry allows your app to access video files by URL.

Android

Ensure the following permission is present in your Android Manifest file, located in <project root>/android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET"/>

The Flutter project template adds it, so it may already be there.

Example

class MyHomePage extends StatefulWidget {  MyHomePage({Key key, this.title}) : super(key: key);  final String title;  @override  _MyHomePageState createState() => _MyHomePageState();}class _MyHomePageState extends State<MyHomePage> {//  static const String beeUri = 'https://media.w3.org/2010/05/sintel/trailer.mp4';  static const String beeUri =      'http://vfx.mtime.cn/Video/2019/03/09/mp4/190309153658147087.mp4';  final VideoControllerWrapper videoControllerWrapper = VideoControllerWrapper(      DataSource.network(          'http://vfx.mtime.cn/Video/2019/03/09/mp4/190309153658147087.mp4',          displayName: "displayName"));  @override  void initState() {    super.initState();    SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.top]);  }  @override  void dispose() {    SystemChrome.restoreSystemUIOverlays();    super.dispose();  }    @override  Widget build(BuildContext context) {      return Scaffold(      body: NeekoPlayerWidget(        onSkipPrevious: () {          print("skip");          videoControllerWrapper.prepareDataSource(DataSource.network(              "http://vfx.mtime.cn/Video/2019/03/12/mp4/190312083533415853.mp4",              displayName: "This house is not for sale"));        },        videoControllerWrapper: videoControllerWrapper,        actions: <Widget>[          IconButton(              icon: Icon(                Icons.share,                color: Colors.white,              ),              onPressed: () {                print("share");              })        ],      ),    );  }}

Thanks

LICENSE


Copyright (c) 2019 Neeko ContributorsNeeko is licensed under the Mulan PSL v1.You can use this software according to the terms and conditions of the Mulan PSL v1.You may obtain a copy of Mulan PSL v1 at:  http://license.coscl.org.cn/MulanPSL  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULARPURPOSE.See the Mulan PSL v1 for more details.

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap