You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
More on Dart CLI implementation [here](./ffi/README.md).
16
28
17
29
18
30
## Support
@@ -21,26 +33,44 @@ Consider supporting the project by starring the repository or buying me a coffee
21
33
22
34
<a href="https://www.buymeacoffee.com/alexmercerind"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=alexmercerind&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff"></a>
23
35
36
+
**Donate in Crypto**
37
+
38
+
- ETH (Ethereum)
39
+
- `0x92f92BC204cDFDAB655e6A69e5Aa4bA5476D7661`
40
+
- BTC (Bitcoin)
41
+
- `1M3DNwnX1GDauPoPr7VywojMRWygje8ctq`
42
+
43
+
Thanks a lot for your support.
44
+
24
45
Looking for contributors for macOS port.
25
46
26
47
## Documentation
27
48
49
+
#### Initialize the library
50
+
51
+
```dart
52
+
void main() {
53
+
DartVLC.initialize();
54
+
runApp(MyApp());
55
+
}
56
+
```
57
+
28
58
#### Create a new player instance.
29
59
```dart
30
60
Player player = new Player(id: 69420);
31
61
```
32
62
33
63
#### Create a media for playback.
34
64
```dart
35
-
Media media0 = await Media.file(
65
+
Media media0 = Media.file(
36
66
new File('C:/music.mp3')
37
67
);
38
68
39
-
Media media1 = await Media.network(
69
+
Media media1 = Media.network(
40
70
'https://www.example.com/music.aac'
41
71
);
42
72
43
-
Media media2 = await Media.asset(
73
+
Media media2 = Media.asset(
44
74
'assets/music.ogg'
45
75
);
46
76
```
@@ -49,24 +79,32 @@ Media media2 = await Media.asset(
The repository contains a [C++ wrapper](https://github.com/alexmercerind/dart_vlc/tree/master/dartvlc) based on libVLC++. This makes handling of events and controls a lot easier & has additional features in it.
340
+
I preferred to do majority of handling in C++ itself, thus Dart code is minimal & very slight mapping to it.
301
341
302
-
The internal wrapper used in the plugin is [here](https://github.com/alexmercerind/dart_vlc/tree/master/dartvlc) in the repository (Based on libVLC++). It makes handling of events and controls a lot easier & has additional features to it.
303
-
304
-
Same wrapper will be used for upcoming FFI version.
305
-
306
-
I preferred to do majority of plugin handling in C++ itself, thus Dart code is minimal & very slight mapping to it.
342
+
This project might seem like a Flutter plugin, but it is based on FFI instead. [Here](https://github.com/alexmercerind/dart_vlc/tree/master/ffi) are the FFI bindings to [C++ wrapper](https://github.com/alexmercerind/dart_vlc/tree/master/dartvlc), which are shared by all platforms & same can be used in Dart CLI apps aswell.
307
343
308
344
## Progress
309
345
@@ -348,10 +384,10 @@ Done
348
384
- `Chromecast`class.
349
385
- `Equalizer`support.
350
386
- Adding headers for `Media.network` (Not possible, added user agent).
387
+
- Switching to FFI for more cross platform freedom.
351
388
352
389
Under progress or planned features (irrespective of order)...
353
390
354
-
- FFI version of the library for plain Dart applications.
@@ -363,7 +399,7 @@ Under progress or planned features (irrespective of order)...
363
399
364
400
First of all, thanks to the [VideoLAN](https://www.videolan.org) team for creating [libVLC](https://github.com/videolan/vlc) & [libVLC++](https://github.com/videolan/libvlcpp). Really great guys really great at their work.
365
401
366
-
Massive thanks to [@stuartmorgan](https://github.com/stuartmorgan) from [Flutter](http://flutter.dev) team to review code & help me fix the loopholes.
402
+
Massive thanks to [@stuartmorgan](https://github.com/stuartmorgan) from [Flutter](http://flutter.dev) team to my review code & help me fix the loopholes.
367
403
368
404
Thanks to following members of libVLC community to give me bit of look & advice about how things work:
369
405
@@ -382,15 +418,15 @@ Contributions to the project are open, it will be appreciated if you discuss the
0 commit comments