Git Product home page Git Product logo

flutter_vlc_player's Introduction

Flutter VLC Player Plugin

Join the chat at https://discord.gg/mNY4fjVk Support me on Patreon flutter_vlc_player

A VLC-powered alternative to Flutter's video_player that supports iOS and Android.


Installation

iOS

If you're unable to view media loaded from an external source, you should also add the following:

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

For more information, or for more granular control over your App Transport Security (ATS) restrictions, you should read Apple's documentation.

Make sure that following line in <project root>/ios/Podfile uncommented:

platform :ios, '9.0'

NOTE: While the Flutter video_player is not functional on iOS Simulators, this package (flutter_vlc_player) is fully functional on iOS simulators.

To enable vlc cast functionality for external displays (chromecast), you should also add the following:

<key>NSLocalNetworkUsageDescription</key>
<string>Used to search for chromecast devices</string>
<key>NSBonjourServices</key>
<array>
  <string>_googlecast._tcp</string>
</array>

Android

To load media/subitle from an internet source, your app will need the INTERNET permission.
This is done by ensuring your <project root>/android/app/src/main/AndroidManifest.xml file contains a uses-permission declaration for android.permission.INTERNET:

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

As Flutter includes this permission by default, the permission is likely already declared in the file.

Note that if you got "Cleartext HTTP traffic to * is not permitted" you need to add the android:usesClearTextTraffic="true" flag in the AndroidManifest.xml file, or define a new "Network Security Configuration" file. For more information, check https://developer.android.com/training/articles/security-config


In order to load media/subtitle from internal device storage, you should put the storage permissions as follows:

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

In some cases you also need to add the android:requestLegacyExternalStorage="true" flag to the Application tag in AndroidManifest.xml file to avoid acess denied errors. Android 10 apps can't acess storage without that flag. reference

After that you can access the media/subtitle file by

"/storage/emulated/0/{FilePath}"
"/sdcard/{FilePath}"

Android build configuration

  1. In android/app/build.gradle:
android {
    packagingOptions {
       // Fixes duplicate libraries build issue, 
       // when your project uses more than one plugin that depend on C++ libs.
        pickFirst 'lib/**/libc++_shared.so'
    }
   
   buildTypes {
      release {
         minifyEnabled true
         proguardFiles getDefaultProguardFile(
                 'proguard-android-optimize.txt'),
                 'proguard-rules.pro'
      }
   }
}
  1. Create android/app/proguard-rules.pro, add the following lines:
-keep class org.videolan.libvlc.** { *; }

Quick Start

To start using the plugin, copy this code or follow the example project in 'flutter_vlc_player/example'

import 'package:flutter/material.dart';
import 'package:flutter_vlc_player/flutter_vlc_player.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key}) : super(key: key);

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  VlcPlayerController _videoPlayerController;

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

    _videoPlayerController = VlcPlayerController.network(
      'https://media.w3.org/2010/05/sintel/trailer.mp4',
      hwAcc: HwAcc.full,
      autoPlay: false,
      options: VlcPlayerOptions(),
    );
  }

  @override
  void dispose() async {
    super.dispose();
    await _videoPlayerController.stopRendererScanning();
    await _videoPlayerController.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: Center(
        child: VlcPlayer(
          controller: _videoPlayerController,
          aspectRatio: 16 / 9,
          placeholder: Center(child: CircularProgressIndicator()),
        ),
      ),
    );
  }
}

Recording feature

To start/stop video recording, you have to call the startRecording(String saveDirectory) and stopRecording() methods, respectively. By calling the stop method you can get the path of recorded file from vlcPlayerController.value.recordPath.


Upgrade instructions

Version 5.0 Upgrade For Existing Apps

To upgrade to version 5.0 first you need to migrate the existing project to swift.

  1. Clean the repo:

    git clean -xdf

  2. Delete existing ios folder from root of flutter project. If you have some custom changes made to the iOS app - rename it or copy somewhere outside the project.

  3. Re-create the iOS app: This command will create only ios directory with swift support. See https://stackoverflow.com/questions/52244346/how-to-enable-swift-support-for-existing-project-in-flutter

    flutter create -i swift .

  4. Make sure to update the project according to warnings shown by the flutter tools. (Update Info.plist, Podfile).

If you have some changes made to the iOS app, recreate the app using above method and copy in the changed files.

Be sure to follow instructions above after


Breaking Changes (from V4 to V5)

Entire platform has been refactored in v5. It will require a refactor of your app to follow v5.


Known Issues

1) The video recording feature is problematic in iOS/Android: if the video reaches its end while you're recording it, the underlying vlckit/libvlc library fails to finalize the recording process, and we cannot retrieve the recorded file. The issue is reported and tracked here:
https://code.videolan.org/videolan/VLCKit/-/issues/394 (see last comment from September 22, 2020)


Current issues

Current issues list is here.
Found a bug? Open the issue.

flutter_vlc_player's People

Contributors

afriza avatar alr2413 avatar antonimo avatar autokaka avatar graysuit avatar guillermodlco avatar ianmaciel avatar illia-romanenko avatar ja2375 avatar kostov avatar kraigspear avatar mfkl avatar mitchross avatar mrvancor avatar msal4 avatar pinpong avatar rikaweb avatar romaingyh avatar solid-danylokhvan avatar solid-oleksandrhordiienko avatar solid-pavloprykhodko avatar solid-software-hq avatar solid-vovabeloded avatar solid-yuriiprykhodko avatar sscsps avatar thearaks avatar virczz avatar xuantung95 avatar yangsfang avatar yu-pri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flutter_vlc_player's Issues

Seek to position

Hi, special thanks for providing this package.

I want to know how can I seek to specific position of video? I used the provided setTime method for this purpose, but it's not working (I don't know why).

no subtitle support for ios?

i tried the plugin on android and had .srt playback when using an mkv container with the included video,audio and srt file inside.

im trying out on ios the same file but no subtitles show up. any advice?

Something wrong in iOS and Android

When I run the examples code on iOS simulator, all the log is

[VERBOSE-2:platform_view_layer.cc(19)] Trying to embed a platform view but the PrerollContext does not support embedding
[VERBOSE-2:platform_view_layer.cc(28)] Trying to embed a platform view but the PaintContext does not support embedding
...(and repeats)

When it's on Android 8.0.0 (MI 6), the test URL is ok to play. But my camera rtsp will stop after 10 seconds.

What happens??

Beg for your reply.

Flutter Plugin Does Not Support Swift

Steps

  1. Initialize the Hello World getting started Flutter Project. https://flutter.dev/docs/get-started/install
    1.b iOS code is by default swift.
  2. run flutter run
  3. Validate ios app runs
  4. Add VLC plugin to pubspec
  5. run flutter run
  6. Build fails

mitchross@Mitchs-Air my_app % flutter run

Launching lib/main.dart on Mitch’s iPad in debug mode...

Automatically signing iOS for device deployment using specified development team
in Xcode project: XXXXXX

Running pod install... 11.5s
Running Xcode build...

├─Assembling Flutter resources... 20.4s
└─Compiling, linking and signing... 8.9s
Xcode build done. 39.8s
Failed to build iOS app
Error output from Xcode build:

2020-02-10 20:40:23.116 xcodebuild[16074:3753897] DTDeviceKit: deviceType
from aa6d46b7ec57d2a1f7efe9485ad107a238488129 was NULL
** BUILD FAILED **

Xcode's output:

/Users/mitchross/.pub-cache/hosted/pub.dartlang.org/flutter_vlc_player-0.0.2
/ios/Classes/FlutterVlcPlayerPlugin.m:110:19: warning: incompatible pointer
types initializing 'NSNumber *' with an expression of type 'NSString *
_Nonnull' [-Wincompatible-pointer-types]
NSNumber *_aspectRatio = [NSString stringWithFormat:@"%s",
_aspectRatioChar];
^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In module 'Foundation' imported from
/Users/mitchross/Documents/Programming/flutter/my_app/ios/Pods/MobileVLCKit/
MobileVLCKit.framework/Headers/VLCAudio.h:25:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Devel
oper/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/Foundation.framework/He
aders/NSString.h:381:1: note: class method 'stringWithFormat:' is assumed to
return an instance of its receiver type ('NSString * _Nonnull')
+ (instancetype)stringWithFormat:(NSString *)format, ...
NS_FORMAT_FUNCTION(1,2);
^
1 warning generated.
While building module 'flutter_vlc_player' imported from
/Users/mitchross/Documents/Programming/flutter/my_app/ios/Runner/GeneratedPl
uginRegistrant.m:8:
In file included from :1:
In file included from
/Users/mitchross/Documents/Programming/flutter/my_app/build/ios/Debug-iphone
os/flutter_vlc_player/flutter_vlc_player.framework/Headers/flutter_vlc_playe
r-umbrella.h:13:
/Users/mitchross/Documents/Programming/flutter/my_app/build/ios/Debug-iphone
os/flutter_vlc_player/flutter_vlc_player.framework/Headers/FlutterVlcPlayerP
lugin.h:2:9: error: include of non-modular header inside framework module
'flutter_vlc_player.FlutterVlcPlayerPlugin':
'/Users/mitchross/Documents/Programming/flutter/my_app/ios/Pods/MobileVLCKit
/MobileVLCKit.framework/Headers/MobileVLCKit.h'
[-Werror,-Wnon-modular-include-in-framework-module]
#import <MobileVLCKit/MobileVLCKit.h>
^
1 error generated.
/Users/mitchross/Documents/Programming/flutter/my_app/ios/Runner/GeneratedPl
uginRegistrant.m:8:9: fatal error: could not build module
'flutter_vlc_player'
#import <flutter_vlc_player/FlutterVlcPlayerPlugin.h>
~~~~~~~^
2 errors generated.
note: Using new build system
note: Planning build
note: Constructing build description

Could not build the precompiled application for the device

Cant Play mp4 videos of 11 hrs long

Is this a real libvlc implemented video player for flutter ? because i am unable to play long mp4 video files, one of the video file was like 11 hrs long and it wont load. Also not all formats are supported by this player. why ?

When I run it says

Note: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_vlc_player-0.0.2\android\src\main\java\software\solid\fluttervlcplayer\FlutterVideoView.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

Doesn't work on Android (or I'm missing something)

The player worked just fine on iOS Simulator, haven't tested on real device yet.

But I got this error on Android (Nexus 4 - API 27) while playing this URL: https://dev4.digitop.vn/begreater/apps/videos/trailer.mp4

Not sure if Unsupported profile 4 for video/mp4v-es mean MP4 is not supported at the momment?

D/        (13212): HostConnection::get() New Host Connection established 0xc85ff340, tid 13227
D/EGL_emulation(13212): eglMakeCurrent: 0xe7f05a20: ver 3 0 (tinfo 0xe7f03c00)
I/VideoCapabilities(13212): **Unsupported profile 4 for video/mp4v-es**
E/VLC     (13212): [c83fd4b0/33d9] filesystem stream: cannot open file /system/etc/system_fonts.xml (No such file or directory)
E/VLC     (13212): [c83fd4b0/33d9] core stream: File reading failed
E/VLC     (13212): [c83fd4b0/33d9] core stream: VLC could not open the file "/system/etc/system_fonts.xml" (No such file or directory).
E/VLC     (13212): [d348f930/33d9] core spu text: no suitable access module for `file:///system/etc/system_fonts.xml'
E/VLC     (13212): [c83fd4b0/33d9] filesystem stream: cannot open file /system/etc/fallback_fonts.xml (No such file or directory)
E/VLC     (13212): [c83fd4b0/33d9] core stream: File reading failed
E/VLC     (13212): [c83fd4b0/33d9] core stream: VLC could not open the file "/system/etc/fallback_fonts.xml" (No such file or directory).
E/VLC     (13212): [d348f930/33d9] core spu text: no suitable access module for `file:///system/etc/fallback_fonts.xml'
E/VLC     (13212): [c83fd4b0/33d9] filesystem stream: cannot open file /vendor/etc/fallback_fonts.xml (No such file or directory)
E/VLC     (13212): [c83fd4b0/33d9] core stream: File reading failed
E/VLC     (13212): [c83fd4b0/33d9] core stream: VLC could not open the file "/vendor/etc/fallback_fonts.xml" (No such file or directory).
E/VLC     (13212): [d348f930/33d9] core spu text: no suitable access module for `file:///vendor/etc/fallback_fonts.xml'
E/VLC     (13212): [d366aa30/33e0] android_window window: request 1 not implemented
D/        (13212): HostConnection::get() New Host Connection established 0xceec3140, tid 13280
D/EGL_emulation(13212): eglCreateContext: 0xcfb5c5c0: maj 3 min 0 rcv 3
D/EGL_emulation(13212): eglMakeCurrent: 0xcfb5c5c0: ver 3 0 (tinfo 0xd58a4a10)
D/AudioTrack(13212): Client defaulted notificationFrames to 2308 for frameCount 4616

Thanks,

The example does not work on Android

Hi, I try to use your sample on my emulator device but it doesn't work for me, please help me. I created a list view with a title and open the camera page when tapping on it
My camera_view.dart code is

import 'package:flutter/material.dart';
import 'package:flutter_vlc_player/flutter_vlc_player.dart';

class MenuCameraView extends StatefulWidget {
  @override
  _MenuCameraViewState createState() => _MenuCameraViewState();
}

class _MenuCameraViewState extends State<MenuCameraView> {
  final String urlToStreamVideo = 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerJoyrides.mp4';
  static final VlcPlayerController controller = VlcPlayerController(
      // Start playing as soon as the video is loaded.
      onInit: () {
    controller.play();
  });
  final double playerWidth = 360;
  final double playerHeight = 240;

  @override
  void dispose() {
    controller.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Container(
          height: playerHeight,
          width: playerWidth,
          child: VlcPlayer(
            aspectRatio: 16 / 9,
            url: urlToStreamVideo,
            controller: controller,
            placeholder: Center(child: CircularProgressIndicator()),
          ),
        ),
      ),
    );
  }
}

My pubspec.yaml

name: relife_mobile_app
description: An app mobile for smarthome.

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1

environment:
  sdk: ">=2.2.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.2
  flutter_webview_plugin: ^0.3.10+1
  http: ^0.12.0+4
  mqtt_client: ^6.0.0
  flutter_launcher_icons: ^0.7.4
  provider: ^4.0.4
  shared_preferences: ^0.5.6+3
  sqflite: ^1.3.0
  device_id: ^0.2.0
  auto_size_text: ^2.1.0
  flutter_vlc_player: ^2.0.0

flutter_icons:
  image_path: "assets/logos/app_logo.png" 
  android: true
  ios: true


dev_dependencies:
  flutter_test:
    sdk: flutter


# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  assets:
    - assets/images/roundwave_logo.png
    - assets/images/devices/rts_1x33_white.non-shadow.gif
    - assets/images/devices/rmo_110_white.non-shadow.gif
    - assets/images/VN-Flag-icon.png
    - assets/images/USA-Flag-icon.jpg
    - assets/i18n/en.json
    - assets/i18n/vi.json

  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware.

  # For details regarding adding assets from package dependencies, see
  # https://flutter.dev/assets-and-images/#from-packages

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  fonts:
    - family: Microsoft Sans Serif
      fonts:
        - asset: assets/fonts/Microsoft_Sans_Serif.ttf
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages

My AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.relife_mobile_app">
    <!-- The INTERNET permission is required for development. Specifically,
         flutter needs it to communicate with the running application
         to allow setting breakpoints, to provide hot reload, etc.
    -->
    <uses-permission android:name="android.permission.INTERNET"/>
    <!-- io.flutter.app.FlutterApplication is an android.app.Application that
         calls FlutterMain.startInitialization(this); in its onCreate method.
         In most cases you can leave this as-is, but you if you want to provide
         additional functionality it is fine to subclass or reimplement
         FlutterApplication and put your custom class here. -->
    <application
        android:name="io.flutter.app.FlutterApplication"
        android:label="Relife"
        android:icon="@mipmap/ic_launcher">
        <activity
            android:name=".MainActivity"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustResize">
            <!-- This keeps the window background of the activity showing
                 until Flutter renders its first frame. It can be removed if
                 there is no splash screen (such as the default splash screen
                 defined in @style/LaunchTheme). -->
            <meta-data
                android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
                android:value="true" />
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <!-- Don't delete the meta-data below.
             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
        <meta-data
            android:name="flutterEmbedding"
            android:value="2" />
    </application>
</manifest>

My error is

I/flutter ( 6841): Go to Camera page
E/flutter ( 6841): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(error, java.lang.IllegalStateException: Trying to create a platform view of unregistered type: flutter_video_plugin/getVideoView
E/flutter ( 6841): at io.flutter.plugin.platform.PlatformViewsController$1.createPlatformView(PlatformViewsController.java:91)
E/flutter ( 6841): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:96)
E/flutter ( 6841): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:60)
E/flutter ( 6841): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:231)
E/flutter ( 6841): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:93)
E/flutter ( 6841): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:642)
E/flutter ( 6841): at android.os.MessageQueue.nativePollOnce(Native Method)
E/flutter ( 6841): at android.os.MessageQueue.next(MessageQueue.java:326)
E/flutter ( 6841): at android.os.Looper.loop(Looper.java:160)
E/flutter ( 6841): at android.app.ActivityThread.main(ActivityThread.java:6669)
E/flutter ( 6841): at java.lang.reflect.Method.invoke(Native Method)
E/flutter ( 6841): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/flutter ( 6841): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
E/flutter ( 6841): , null)
�[38;5;244mE/flutter ( 6841): #0 StandardMethodCodec.decodeEnvelope�[39;49m
�[38;5;244mE/flutter ( 6841): #1 MethodChannel.invokeMethod�[39;49m
E/flutter ( 6841):
�[38;5;244mE/flutter ( 6841): #2 AndroidViewController._create�[39;49m
�[38;5;244mE/flutter ( 6841): #3 AndroidViewController.setSize�[39;49m
�[38;5;244mE/flutter ( 6841): #4 RenderAndroidView._sizePlatformView�[39;49m
�[38;5;244mE/flutter ( 6841): #5 RenderAndroidView.performResize�[39;49m
�[38;5;244mE/flutter ( 6841): #6 RenderObject.layout�[39;49m
�[38;5;244mE/flutter ( 6841): #7 RenderProxyBoxMixin.performLayout�[39;49m
�[38;5;244mE/flutter ( 6841): #8 RenderObject.layout�[39;49m
�[38;5;244mE/flutter ( 6841): #9 RenderOffstage.performLayout�[39;49m
�[38;5;244mE/flutter ( 6841): #10 RenderObject.layout�[39;49m
�[38;5;244mE/flutter ( 6841): #11 RenderStack.performLayout�[39;49m
�[38;5;244mE/flutter ( 6841): #12 RenderObject.layout�[39;49m
�[38;5;244mE/flutter ( 6841): #13 RenderAspectRatio.performLayout�[39;49m
�[38;5;244mE/flutter ( 6841): #14 RenderObject.layout�[39;49m
�[38;5;244mE/flutter ( 6841): #15 RenderConstrainedBox.performLayout�[39;49m
�[38;5;244mE/flutter ( 6841): #16 RenderObject.layout�[39;49m
�[38;5;244mE/flutter ( 6841): #17 RenderPositionedBox.performLayout�[39;49m
�[38;5;244mE/flutter ( 6841): #18 RenderObject.layout�[39;49m
�[38;5;244mE/flutter ( 6841): #19 MultiChildLayoutDelegate.layoutChild�[39;49m
�[38;5;244mE/flutter ( 6841): #20 _ScaffoldLayout.performLayout�[39;49m
�[38;5;244mE/flutter ( 6841): #21 MultiChildLayoutDelegate._callPerformLayout�[39;49m
�[38;5;244mE/flutter ( 6841): #22 RenderCustomMultiChildLayoutBox.performLayout�[39;49m
�[38;5;244mE/flutter ( 6841): #23 RenderObject.layout�[39;49m
�[38;5;244mE/flutter ( 6841): #24 RenderProxyBoxMixin.performLayout�[39;49m
�[38;5;244mE/flutter ( 6841): #25 RenderObject.layout�[39;49m
�[38;5;244mE/flutter ( 6841): #26 RenderProxyBoxMixin.performLayout�[39;49m
�[38;5;244mE/flutter ( 6841): #27 _RenderCustomClip.performLayout�[39;49m
�[38;5;244mE/flutter ( 6841): #28 RenderObject.layout�[39;49m
�[38;5;244mE/flutter ( 6841): #29 RenderProxyBoxMixin.performLayout�[39;49m
E/flutter ( 6841): #30 RenderObject.layout (package:flutt

The

flutter doctor -v

[√] Flutter (Channel stable, v1.12.13+hotfix.9, on Microsoft Windows [Version 10.0.17763.1098], locale en-US)
    • Flutter version 1.12.13+hotfix.9 at C:\src\flutter
    • Framework revision f139b11009 (13 days ago), 2020-03-30 13:57:30 -0700
    • Engine revision af51afceb8
    • Dart version 2.7.2


[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at C:\Users\MarcusPC\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
    • All Android licenses accepted.

[!] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android Studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] VS Code, 32-bit edition (version 1.43.2)
    • VS Code at C:\Program Files (x86)\Microsoft VS Code
    • Flutter extension version 3.9.1

[√] Connected device (1 available)
    • AOSP on IA Emulator • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)

! Doctor found issues in 1 category.

Thanks!

Subtitle/Audio support?

Hi, been using the library for a long time, thanks for the work!

But since I'm digging into more advanced stuff, is there anyways to show the embedded subtitles of a video file, if else any way to a pass a subtitle file (.srt)?

Secondarily, is there any method for switching audio provided by the video? Some videos have dual audios and switching audio at will might be great!

Cheers.

Change url on setState

Hi, Is it possible to change the url on setState?
For example, if I have two files to stream, on Init, first file will start playing, how do I start playing the second file with the same VLC instance?

Thanks!

VlcPlayer widget functions as expected on Android <10, but crashes the application on Android 10

A VlcPlayer widget when playing a static .mkv video from a URL (it works with a live stream) crashes on Android 10 but not on lower versions. The following is the output from the console when running on my Android 10 device (OnePlus 7T):

signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
Abort message: 'FORTIFY: %n not allowed on Android'
    x0  0000000000000000  x1  000000000000654a  x2  0000000000000006  x3  00000076d46fcc20
    x4  0000000000000000  x5  0000000000000000  x6  0000000000000000  x7  0000000000000018
    x8  00000000000000f0  x9  c981a93a198d992f  x10 0000000000000001  x11 0000000000000000
    x12 fffffff0fffffbdf  x13 000000005e9ebbec  x14 00243e5a95c1d1e9  x15 0000a6545ce99a27
    x16 00000077ec963738  x17 00000077ec941be0  x18 0000000000000000  x19 0000000000006469
    x20 000000000000654a  x21 00000000ffffffff  x22 00000000ffffffff  x23 00000076d46fd7e4
    x24 00000076d46fd000  x25 000000000000001d  x26 000000000000006e  x27 0000000000000000
    x28 00000076d46ff008  x29 00000076d46fccc0
    sp  00000076d46fcc00  lr  00000077ec8f3404  pc  00000077ec8f3430
backtrace:
      #00 pc 0000000000073430  /apex/com.android.runtime/lib64/bionic/libc.so (abort+160) (BuildId: a2584ee8458a61d422edf24b4cd23b78)
      #01 pc 00000000000b4b00  /apex/com.android.runtime/lib64/bionic/libc.so (__fortify_fatal(char const*, ...)+120) (BuildId: a2584ee8458a61d422edf24b4cd23b78)
      #02 pc 00000000000b40b4  /apex/com.android.runtime/lib64/bionic/libc.so (__vfprintf+10956) (BuildId: a2584ee8458a61d422edf24b4cd23b78)
      #03 pc 00000000000d189c  /apex/com.android.runtime/lib64/bionic/libc.so (snprintf+232) (BuildId: a2584ee8458a61d422edf24b4cd23b78)

live stream crashes but recorded file plays (PR #7 Test)

after testing #7 I found that attempting to open a live stream results in the app crashing. No error is shown in the flutter console.

Recorded files play fine. I just need to figure out how to manage video controls in the UI.

iOS 13.1.3, iPhone XS Max

Let me know if any other information is required, thanks!

Can not run on ios

I add <key>io.flutter.embedded_views_preview</key> <true/> into ios/Runner/Info.plist first, but still got the error.
image

Is it possible to preload next video?

I have a PageView where I would like to preload next video in the list while current video is playing. Is that possible? I tried to have another VlcPlayerController and VlcPlayer widget but even then, when I want to switch to the next page and assign second VlcPlayerController with next url to the first one, it doesn't load it any quicker.

Something similar is possible with video_player but video_player can't play rtsp stream which is necessary in my case.

Is there any way to get a connection refused error?

Hi!
First, Thank you for making this plugin.
I use this plugin with ffserver&ffmpeg to stream live video.
This is my frist time to write an issue, so please excuse me even if there is a mistake.

Anyway, I wonder how can I get an error event from vlc player when the connection was refused,
because I want to make vlc-player try re-connection if it is refused to enter the server.

If the server is not working, it shows an error message(something like "refused!") in the log screen(?),
but I cannot get the error by try,catch. (it might be printed from native code)
At the same time, vlc-player is stuck in this method.
await _controller.setStreamUrl(widget.url, widget.defaultHeight, widget.defaultWidth)

So, now I'm using this by modifying as below.
await Future.value( _controller.setStreamUrl(widget.url, widget.defaultHeight, widget.defaultWidth) ).timeout(const Duration(seconds: 1), onTimeout: () => SubTreeBlocProvider.of<MapViewerBloc>(context).setIsMapConnected(false));

If the timeout is executed, it sends the event to the outside of vlcplayer and reloads widget.

As I know, there is no flag to announce that the connection is refused or not.
bool readyToShow is for VlcPlayerState which is private widget.

Is there any other way than modifying plugin to get the error event from outside ?

Thank you for reading.

Is there a way to spawn multiple VLC players?

I am making a client for my CCTV app and am trying to display multiple streams at the same time. Whenever I do though, only the second (or last) one actually loads. The first one just continues to show the placeholder (in this case a loading spinner).

any help would be greatly appreciated, thank you!

faa36933-3f5a-4c35-861f-f509ae0d3dfa

this is the function i use to create my widget

vlcWidget() {
  final _videoViewController = VlcPlayerController();
  return VlcPlayer(
    url: loginEndpoint + _activeStreamUrl,
    controller: _videoViewController,
    placeholder: Center(child: CircularProgressIndicator()),
  );
}

How to change itemcount of Gridview without play vlc player again

Hi everyone,

I am using the vlc player to show multiple videos in a GridView, it works fine however I have a small problem when changing the itemcount of gridview, if the vlc player is stopping it would automatically play again. I want to keep the playingState when changing the itemCount.

Here is my code

Widget build(BuildContext context) {
    return Scaffold(
      resizeToAvoidBottomPadding: false,
      backgroundColor: Theme.of(context).primaryColor,
      appBar: appBarLayout(context),
      body: ChangeNotifierProvider<MenuCameraViewModel>.value(
        value: _viewModel,
        child: Consumer<MenuCameraViewModel>(
          builder: (context, model, _) => GridView.builder(
            itemCount: model.getItemCount() + 1,
            padding: EdgeInsets.all(5),
            gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
              crossAxisCount: model.viewMode ? 1 : 2,
              childAspectRatio: 16 / 11,
            ),
            itemBuilder: (context, int index) {
              return GestureDetector(
                child: Container(
                  margin: EdgeInsets.all(5),
                  color: Colors.black.withOpacity(0.5),
                  child: VlcPlayer(
                    aspectRatio: 16 / 9,
                    url: model.getUrl(index),
                    controller: model.getController(index),
                    placeholder: Center(child: CircularProgressIndicator()),
                  ),
                ),
                onTap: () {
                  model.tap(index);
                },
              );
            },
          ),
        ),
      ),
    );
  }

Thanks!

VLC is unable to open the MRL

Logs with -vvv

D/VLC     ( 8830): [00000074e06ade50/6e697274535f676e] libvlc libvlc: VLC media player - 3.0.7.1 Vetinari
D/VLC     ( 8830): [00000074e06ade50/6e697274535f676e] libvlc libvlc: Copyright © 1996-2019 the VideoLAN team
D/VLC     ( 8830): [00000074e06ade50/0] libvlc libvlc: revision 3.0.7.1-1-10-g38eb7b4866
D/VLC     ( 8830): [00000074e06ade50/0] libvlc libvlc: configured with ../configure  '--host=aarch64-linux-android' '--build=x86_64-unknown-linux' '--with-contrib=/mnt/ssd/build-avlc/vlc/contrib/aarch64-linux-android' '--prefix=/mnt/ssd/build-avlc/vlc/build-android-aarch64-linux-android/install/' '--disable-nls' '--enable-live555' '--enable-realrtsp' '--enable-avformat' '--enable-swscale' '--enable-avcodec' '--enable-opus' '--enable-opensles' '--enable-matroska' '--enable-taglib' '--enable-dvbpsi' '--disable-vlc' '--disable-shared' '--disable-update-check' '--disable-vlm' '--disable-dbus' '--enable-lua' '--disable-vcd' '--disable-v4l2' '--enable-dvdread' '--enable-dvdnav' '--disable-bluray' '--disable-linsys' '--disable-decklink' '--disable-libva' '--disable-dv1394' '--enable-mod' '--disable-sid' '--disable-gme' '--disable-tremor' '--disable-mad' '--enable-mpg123' '--disable-dca' '--disable-sdl-image' '--enable-zvbi' '--disable-fluidsynth' '--enable-fluidlite' '--disable-jack' '--disable-pulse' '--disable-alsa' '--disable-samp
D/VLC     ( 8830): [00000074e06ade50/74db5d4af0] libvlc libvlc: plug-ins loaded: 361 modules
D/VLC     ( 8830): [00000074e06af390/0] libvlc logger: looking for logger module matching "any": 4 candidates
D/VLC     ( 8830): [00000074e06af390/0] libvlc logger: using logger module "android_logger"
D/VLC     ( 8830): [00000074e06ade50/227e] libvlc libvlc: translation test: code is "C"
D/VLC     ( 8830): [00000074def74170/227e] libvlc keystore: looking for keystore module matching "memory": 3 candidates
D/VLC     ( 8830): [00000074def74170/227e] libvlc keystore: using keystore module "memory"
D/VLC     ( 8830): [00000074e06ade50/227e] libvlc libvlc: CPU has capabilities FPU
D/VLC     ( 8830): [00000074e07463d0/227e] libvlc generic: creating audio output
D/VLC     ( 8830): [00000074e0799590/227e] libvlc audio output: looking for audio output module matching "android_audiotrack": 4 candidates
D/VLC     ( 8830): [00000074e0799590/227e] libvlc audio output: using audio output module "android_audiotrack"
D/VLC     ( 8830): [00000074e07463d0/227e] libvlc generic: keeping audio output
D/VLC     ( 8830): [00000074dea4f690/227e] libvlc input: Creating an input for 'Avengers.Endgame.2019.1080p.BluRay.x264-[YTS.LT].mp4'
D/VLC     ( 8830): [00000074dea4f690/2323] libvlc input: using timeshift granularity of 50 MiB
D/VLC     ( 8830): [00000074dea4f690/2323] libvlc input: using default timeshift path
D/VLC     ( 8830): [00000074dea4f690/2323] libvlc input: `https://bluefroghunter-sto.energycdn.com/dl/G4uN2ybB-j8ejCxF3Tl1bw/1590563460/694180459/5d433107eb3497.45506594/Avengers.Endgame.2019.1080p.BluRay.x264-[YTS.LT].mp4' gives access `https' demux `any' path `bluefroghunter-sto.energycdn.com/dl/G4uN2ybB-j8ejCxF3Tl1bw/1590563460/694180459/5d433107eb3497.45506594/Avengers.Endgame.2019.1080p.BluRay.x264-[YTS.LT].mp4'
D/VLC     ( 8830): [00000074e0789d10/2323] libvlc input source: creating demux: access='https' demux='any' location='bluefroghunter-sto.energycdn.com/dl/G4uN2ybB-j8ejCxF3Tl1bw/1590563460/694180459/5d433107eb3497.45506594/Avengers.Endgame.2019.1080p.BluRay.x264-[YTS.LT].mp4' file='(null)'
D/VLC     ( 8830): [00000074e0789e50/2323] libvlc demux: looking for access_demux module matching "https": 6 candidates
D/VLC     ( 8830): [00000074e0789e50/2323] libvlc demux: no access_demux modules matched
D/VLC     ( 8830): [00000074def4b690/2323] libvlc stream: creating access: https://bluefroghunter-sto.energycdn.com/dl/G4uN2ybB-j8ejCxF3Tl1bw/1590563460/694180459/5d433107eb3497.45506594/Avengers.Endgame.2019.1080p.BluRay.x264-[YTS.LT].mp4
D/VLC     ( 8830): [00000074def4b690/2323] libvlc stream: looking for access module matching "https": 23 candidates
D/VLC     ( 8830): [00000074def4b690/2323] libvlc stream: no access modules matched
E/VLC     ( 8830): [00000074dea4f690/2323] libvlc input: Your input can't be opened
E/VLC     ( 8830): [00000074dea4f690/2323] libvlc input: VLC is unable to open the MRL 'https://bluefroghunter-sto.energycdn.com/dl/G4uN2ybB-j8ejCxF3Tl1bw/1590563460/694180459/5d433107eb3497.45506594/Avengers.Endgame.2019.1080p.BluRay.x264-[YTS.LT].mp4'. Check the log for details.
W/System.err( 8830): (flutter_vlc_plugin) A VLC error occurred.

Problems to build on iOS and some package issues

I was looking for a Flutter package that supports RSTP for my personal project and I found this flutter_vlc_player package on pub.dev.

So, I did install the package on my project, and it worked very well on my Android simulator, but didn't worked on iOS because of some problems during the project compilation.

Then, I went into this github page and I saw a specific note that says about using the flutter_vlc_player class instead of vlc_player (like it was previously showed in pub.dev).

I followed this example on the main page but I think the code is outdated.

import 'package:flutter/material.dart';
import 'package:flutter_vlc_player/flutter_vlc_player.dart';

class ExampleVideo extends StatefulWidget {
  @override
  _ExampleVideoState createState() => _ExampleVideoState();
}

class _ExampleVideoState extends State<ExampleVideo> {
  final String urlToStreamVideo = 'http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_60fps_normal.mp4';
  final VlcPlayerController controller = new VlcPlayerController(
      // Start playing as soon as the video is loaded.
      onInit: (){
          controller.play();
      }  
   
// you need to instantiate the controller inside the of the initState life-cycle method

  );
  final int playerWidth = 640; // this variable should be double, not int
  final int playerHeight = 360; // this variable should be double, not int

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        body: SizedBox(
            height: playerHeight,
            width: playerWidth,
            child: new VlcPlayer(
                aspectRatio: 16 / 9,
                url: urlToStreamVideo,
                controller: controller,
                placeholder: Center(child: CircularProgressIndicator()),
            )
        )
    );
  }
}

If you copy and paste the code you’ll need to fix some issues to compile the project without errors, but still will not work neither on Android or iOS.

Finally, I did a clone of the example repository and thankfully the project worked on Android and iOS. The first difference that I saw was into the pubspec.yaml file

flutter_vlc_player:
    path: ../

As we can see, it is referring a path, not a package version. If we change the code to reference the package version (^1.0.0), the project will build without errors, but will show the spinning circle Widget like a infinite loop.

The second difference in the example code that I saw, was into the Podfile on ios folder. Like I said at the beginning, my personal project fails to compile on iOS. Here is my Podfile.

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def parse_KV_file(file, separator='=')
  file_abs_path = File.expand_path(file)
  if !File.exists? file_abs_path
    return [];
  end
  generated_key_values = {}
  skip_line_start_symbols = ["#", "/"]
  File.foreach(file_abs_path) do |line|
    next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
    plugin = line.split(pattern=separator)
    if plugin.length == 2
      podname = plugin[0].strip()
      path = plugin[1].strip()
      podpath = File.expand_path("#{path}", file_abs_path)
      generated_key_values[podname] = podpath
    else
      puts "Invalid plugin specification: #{line}"
    end
  end
  generated_key_values
end

target 'Runner' do
  use_frameworks! #my personal project have this line
  use_modular_headers! #and also this line

  # Flutter Pod

  copied_flutter_dir = File.join(__dir__, 'Flutter')
  copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
  copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
  unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
    # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
    # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
    # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.

    generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
    unless File.exist?(generated_xcode_build_settings_path)
      raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
    end
    generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
    cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];

    unless File.exist?(copied_framework_path)
      FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
    end
    unless File.exist?(copied_podspec_path)
      FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
    end
  end

  # Keep pod path relative so it can be checked into Podfile.lock.
  pod 'Flutter', :path => 'Flutter'

  # Plugin Pods

  # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
  # referring to absolute paths on developers' machines.
  system('rm -rf .symlinks')
  system('mkdir -p .symlinks/plugins')
  plugin_pods = parse_KV_file('../.flutter-plugins')
  plugin_pods.each do |name, path|
    symlink = File.join('.symlinks', 'plugins', name)
    File.symlink(path, symlink)
    pod name, :path => File.join(symlink, 'ios')
  end
end

# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
install! 'cocoapods', :disable_input_output_paths => true

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end
  end
end

If I comment the use_framewoks! and use_modular_headers! lines my code runs perfectly on iOS.

In resume:

  • The example code on pub.dev can work in iOS if you modify the Podfile, but I don’t know if doing this can cause problems to other packages inside the project or performance issues.

  • The example code on github will not work if you change the reference for the flutter_vlc_player package.

  • It is an amazing project but I think the examples could be improved. Besides the fact that my project is working, I'm not sure if what I did is the best solution. It's okay if you need extra configuration on Android and iOS files, but this configuration needs to be very clear.

ios build failed with codemagic

Hi alls,
I try to build my project with codemagic , android version was build well, I got error for ios

While building module 'flutter_vlc_player' imported from /Users/builder/clone/ios/Runner/GeneratedPluginRegistrant.m:8: In file included from <module-includes>:1: In file included from /Users/builder/clone/build/ios/Debug-iphoneos/flutter_vlc_player/flutter_vlc_player.framework/Headers/flutter_vlc_player-umbrella.h:13: /Users/builder/clone/build/ios/Debug-iphoneos/flutter_vlc_player/flutter_vlc_player.framework/Headers/FlutterVlcPlayerPlugin.h:2:9: error: include of non-modular header inside framework module 'flutter_vlc_player.FlutterVlcPlayerPlugin': '/Users/builder/clone/ios/Pods/MobileVLCKit/MobileVLCKit.framework/Headers/MobileVLCKit.h' [-Werror,-Wnon-modular-include-in-framework-module] #import <MobileVLCKit/MobileVLCKit.h> ^ 1 error generated. /Users/builder/clone/ios/Runner/GeneratedPluginRegistrant.m:8:9: fatal error: could not build module 'flutter_vlc_player' #import <flutter_vlc_player/FlutterVlcPlayerPlugin.h> ~~~~~~~^ 2 errors generated. note: Using new build system note: Planning build note: Constructing build description

Any idea ?
Thank

IOS bug

hello
after add the plugin when i try to run on ios smlutor this error show to me (Could not build module 'flutter_vlc_player')
any help ?

play/pause video

Hi ,
I use this plugin for playing rtsp live camera video end mp4 video and it works good.

I look for how implement play/stop function .

Looked inside of FlutterVideoView(Android) and found "onTap" into onMethodCall

Can you give me your advise how this function can be implemented ?
Thank

Use SRT-Protocol for streaming

I would like to use srt streaming data.
On my local vlc-player I can pass the following url : "srt:127.0.0.1:9999" but it is not working if I pass it as url to the flutter-vlc-player.

set defaultWidth and defaultHight don't work

final int playerWidth = window.physicalSize.width.toInt();
final int playerHeight = window.physicalSize.height.toInt();

print(playerWidth.toString());//1080
print(playerHeight.toString());//1920

number is right ,but textureView's size allways 640x360

D8: Program type already present: android.support.v4.media.MediaBrowserCompat$CallbackHandler

dependencies:
  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.2

  web_socket_channel:
  flutter_redux:
  redux:
  uuid:
  shared_preferences:
  simple_animations:
  path_provider:
  flutter_svg:
  flutter_webrtc:
  firebase_messaging:
  device_info:
  connectivity:
  crypto:
  curve25519:
  flutter_vlc_player:

enable looping

Hi,

thanks for the time and effort you put into this awesome plugin.
It would be great if you could implement a "setLoop" parameter to enable start playing from the beginning once the video has ended.

Any chance? :)

Run in Android 10 but error in android 6

I have tried and error in android 6 as follows:

E/VLC (28440): [9604cdf0/7165] libvlc demux: Nothing to play for rtsp://..../Streaming/Channels/101/
E/VLC (28440): [9482f630/7165] libvlc stream: Failed to setup RTSP session
E/VLC (28440): [919b7830/7165] libvlc input: Your input can't be opened
E/VLC (28440): [919b7830/7165] libvlc input: VLC is unable to open the MRL 'rtsp://..../Streaming/Channels/101/'. Check the log for details.

Videos are laggy

Good job with the player. It actually plays video on my Firestick 4k without any green artefacts unlike exoplayer and FFmpeg.

But every video that it plays, lags. Unfortunately there are no errors in the log that I can share. Also video doesn't show loading indicator even after adding the placeholder. A

Any idea what could be it? Btw I'm just running the example code with different video url.

Have you tried texture?

        libvlc = new LibVLC(context, options);
        mediaPlayer = new MediaPlayer(libvlc);
        IVLCVout ivlcVout = mediaPlayer.getVLCVout();
        surface = new Surface(textureEntry.surfaceTexture());
        ivlcVout.setVideoSurface(surface, null);
        ivlcVout.attachViews();
        final Media media = new Media(libvlc, path);
        mediaPlayer.setMedia(media);
        media.release();

I tried but it doesn't show the video in android

Black screen when update

Whenever I update the app (like a hot reload, screen rotation, fullscreen mode, etc), the video turns to a black screen but the audio continues running...

I tried to send the url again to create another instance of the video when I get the screen rotated, but I only get 2 playbacks running simultaneously with no video. I can even see the rotating animation rendering the first frame in the new square but then, it turns to a black screen again

sdk: ">=2.1.0 <3.0.0" error

flutter sdk: ">=2.1.0 <3.0.0" after installed error project :
Execution failed for task ':app:processDebugResources'.

Android resource linking failed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.