- SEE ALSO
- COPYLEFT AND LICENSE
Vlc::Engine - bindings for perl
use Vlc::Engine; my $player = Vlc::Engine->new(); $player->set_media("your_media"); $player->play(); sleep(30); $player->stop() $player->release();
VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files as well as DVDs,Audio CDs, VCDs, and various streaming protocols.
my $player = Vlc::Engine->new(); #or with options my $options = ["--no-video", "--no-xlib"]; my $player = Vlc::Engine->new($options);
This constructor returns a new
Vlc::Engine object. Optional attributes include: Vlc options, you can get more info if you type vlc -H .
This method is used to get the version of Vlc.
This method is used to set your media (from local or from network is possible also).
This method is used to start playing your media.
This method is used to pause your player.
This method is used to stop your player.
This method is used to set volume.
my $volume = $player->get_volume();
This method is used to get volume.
This method is used to set mute false or true, 0 is false and 1 is true.
my $mute_status = $player->get_mute();
This method is used to get mute status.
This method is used to parse your media, it will help to get duration and more info ( you should run it before play).
This method is used to parse your media with asynv, it will help to get duration and more info ( you should run it before play).
This method will help you to get duration of your media by ms.
This method is used to modify meta.
This method is used to save meata that you changed.
This method will help you to get info about your media by using params.
title - Get the title of your track
artist - Get the artist.
genre - Get the genre.
album - Get the Album.
copyright - Get the copyright.
track_number - Get track number.
description - Get description.
rating - Get rating.
date - Get date.
setting - Get setting.
url - Get url.
language - Get language.
now_playinge - Get now playinge.
publisher - Get publisher.
encoded_by - Get encoded by.
artwork_url - Get artwork url.
track_id - Get track id.
track_total - Get track total.
director - Get director.
season - Get season.
episode - Get episode.
show_name - Show name
actors - Get actors.
my $state = $player->get_state();
This method is used to get state of your player.
my $event_manager = $player->event_manager();
This method is used to get an instance of event manager.
$player->event_attach($manager, 'media_player_playing', \&play);
This method is used to run a function when your player get a specifc event. $manager is an event_manager instance 'media_player_playing' is an event, play( is a function. Here are some events that you can check:
This method is used to set list (from local or from network is possible also).
This method is used to play list or medias.
This method is used to play next media in the list.
This method is used to play previous media, in the list.
This method is used to pause playing your list.
This method is used to stop playing a list.
For more information, please visit VLC.
James Axl, <email@example.com>
Please report any bugs or feature requests on my email or create a ticket here
This is open source software. The code repository is available for public review and contribution under the terms of the license.
Copyleft (C) 2017 by James Axl For the love of the community
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.24.1 or, at your option, any later version of Perl 5 you may have available.