alexmercerind / dart_vlc

Flutter bindings to libVLC.
GNU Lesser General Public License v2.1
512 stars 137 forks source link

LateError (LateInitializationError: Field 'dynamicLibrary' has not been initialized.) #362

Open greenonsil-dev opened 1 year ago

greenonsil-dev commented 1 year ago

Hi. I want to use your library. But I can't use it :(..

When I use your Library, I met this Error.

Can you tell me why I met this error?

Here is my code.

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

void main() {
  DartVLC.initialize();
  runApp(
    const MaterialApp(
      home: MyApp(),
    ) 
  );
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  Player player = Player(
    id: 69420,
    commandlineArguments: ['--no-video'],
  );

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

    player.open(
      Media.network('https://www.example.com/music.aac'),
      autoStart: true,
    );
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('CCTV 테스트~~'),
      ),

      body: Video(
        player: player,
        height: 1920.0,
        width: 1080.0,
        scale: 1.0,
        showControls: false,
      ),
    );
  }
}

image

greenonsil-dev commented 1 year ago

Oh.. I used my Android Phone.

When I changed platform. I worked.

but.. I want to use that Library in my Android Phone

Do you have plan that support Android or IOS