All Projects → solid-software → Flutter_vlc_player

solid-software / Flutter_vlc_player

Licence: bsd-3-clause
📺 Flutter VLC powered video player.

Programming Languages

dart
5743 projects

Projects that are alternatives of or similar to Flutter vlc player

Libvlcsharp
Cross-platform .NET/Mono bindings for LibVLC
Stars: ✭ 752 (+249.77%)
Mutual labels:  vlc
Simple Vlc Player
An Android media player library powered by LibVLC and Open Subtitles.
Stars: ✭ 103 (-52.09%)
Mutual labels:  vlc
Vlc Example Streamplayer
Example code how to play a stream with VLC
Stars: ✭ 158 (-26.51%)
Mutual labels:  vlc
Cordova Plugin Rtsp Vlc
PhoneGap/Cordova VLC RTSP Player Plugin
Stars: ✭ 21 (-90.23%)
Mutual labels:  vlc
Playerctl
🎧 mpris media player command-line controller for vlc, mpv, RhythmBox, web browsers, cmus, mpd, spotify and others.
Stars: ✭ 1,365 (+534.88%)
Mutual labels:  vlc
Vlc Discord Rpc
Discord rich presence for VLC media player.
Stars: ✭ 114 (-46.98%)
Mutual labels:  vlc
Countries
Free legally receivable IPTV channels as .m3u for Kodi. :-)
Stars: ✭ 657 (+205.58%)
Mutual labels:  vlc
Libvlc Go
Go bindings for libVLC and high-level media player interface
Stars: ✭ 188 (-12.56%)
Mutual labels:  vlc
Simple Video Cutter
Windows-based tool for efficient browsing and cutting video footage
Stars: ✭ 102 (-52.56%)
Mutual labels:  vlc
Dmskin Wallpaper Maker
Windows 桌面动态壁纸 视频壁纸
Stars: ✭ 151 (-29.77%)
Mutual labels:  vlc
Py Vlcclient
A simple python library to control VLC
Stars: ✭ 32 (-85.12%)
Mutual labels:  vlc
Docker Acestream Server
Ace Stream server Docker image and playback CLI for media players.
Stars: ✭ 88 (-59.07%)
Mutual labels:  vlc
React Native Vlc Player
VLC Player for react-native
Stars: ✭ 126 (-41.4%)
Mutual labels:  vlc
Vlc.dotnet
.NET control that hosts the audio/video capabilities of the VLC libraries
Stars: ✭ 826 (+284.19%)
Mutual labels:  vlc
Clay
Awesome standalone command line player for Google Play Music.
Stars: ✭ 160 (-25.58%)
Mutual labels:  vlc
Streamlink
Streamlink is a CLI utility which pipes video streams from various services into a video player
Stars: ✭ 6,883 (+3101.4%)
Mutual labels:  vlc
Twitchpotplayer
Extensions for PotPlayer to watch Twitch streams without streamlinks or any crap.
Stars: ✭ 112 (-47.91%)
Mutual labels:  vlc
Vlc Bittorrent
A bittorrent plugin for VLC.
Stars: ✭ 198 (-7.91%)
Mutual labels:  vlc
Spotifylyrics
Fetches and displays lyrics to currently playing song in Spotify, Tidal and VLC.
Stars: ✭ 171 (-20.47%)
Mutual labels:  vlc
React Native Yz Vlcplayer
VLC Player for react-native
Stars: ✭ 136 (-36.74%)
Mutual labels:  vlc

Flutter VLC Player Plugin

Join the chat at https://discord.gg/mNY4fjVk

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}"

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()),
        ),
      ),
    );
  }
}

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.


Current issues

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].