NAME
Vlc::Engine - bindings for perl
VERSION
version 0.004
SYNOPSIS
use Vlc::Engine;
my $player = Vlc::Engine->new();
$player->set_media("your_media");
$player->play();
sleep(30);
$player->stop()
$player->release();
DESCRIPTION
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.
METHODS
new
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 .
vlc_version
$player->vlc_version();
This method is used to get the version of Vlc.
set_media
$player->set_media("your_media");
This method is used to set your media (from local or from network is possible also).
play
$player->play();
This method is used to start playing your media.
pause
$player->pause();
This method is used to pause your player.
stop
$player->stop();
This method is used to stop your player.
set_volume
$player->set_volume(70);
This method is used to set volume.
get_volume
my $volume = $player->get_volume();
This method is used to get volume.
set_mute
$player->set_mute(1);
This method is used to set mute false or true, 0 is false and 1 is true.
get_mute
my $mute_status = $player->get_mute();
This method is used to get mute status.
parsing_media
$player->parsing_media();
This method is used to parse your media, it will help to get duration and more info ( you should run it before play).
parsing_media_async
$player->parsing_media_async();
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).
get_duration
$player->get_duration();
This method will help you to get duration of your media by ms.
set_meta
$player->get_meta('your_meta_param', 'value');
This method is used to modify meta.
save_meta
$player->save_meta();
This method is used to save meata that you changed.
get_meta
$player->get_meta('your_meta_param');
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.
get_state
my $state = $player->get_state();
This method is used to get state of your player.
event_manager
my $event_manager = $player->event_manager();
This method is used to get an instance of event manager.
event_attach
$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:
media_player_playing
media_player_stopped
media_meta_changed
media_sub_item_added
media_duration_changed
media_parsed_changed
media_freed
media_state_changed
media_subItem_tree_added
media_player_media_changed
media_player_nothing_special
media_player_buffering
media_player_paused
media_player_forward
media_player_backward
media_player_end_reached
media_player_encountered_error
media_player_time_changed
media_player_position_changed
media_player_seekable_changed
media_player_pausable_changed
media_player_title_changed
media_player_snapshot_taken
media_player_length_changed
media_player_vout
media_player_scrambled_changed
media_player_corked
media_player_uncorked
media_player_muted
MediaPlayerUnmuted
media_player_audio_volume
media_list_item_added
media_list_will_add_item
media_list_view_will_add_item
media_list_item_deleted
media_list_will_delete_item
media_list_view_will_delete_item
media_list_player_played
media_list_player_next_item_set
media_list_player_stopped
media_discoverer_started
media_discoverer_ended
vlm_media_added
vlm_media_removed
vlm_media_changed
vlm_media_instance_started
vlm_media_instance_stopped
vlm_media_instance_status_init
vlm_media_instance_status_opening
vlm_media_instance_status_playing
vlm_media_instance_status_pause
vlm_media_instance_status_playing
vlm_media_instance_status_end
vlm_media_instance_status_error
set_media_list
$player->set_media_list("your_first_media");
$player->set_media_list("your_second_media");
This method is used to set list (from local or from network is possible also).
play_list
$player->play_list();
This method is used to play list or medias.
play_next
$player->play_next();
This method is used to play next media in the list.
play_previous
$player->play_previous();
This method is used to play previous media, in the list.
pause_list
$player->pause_list();
This method is used to pause playing your list.
stop_list
$player->stop_list();
This method is used to stop playing a list.
SEE ALSO
For more information, please visit VLC.
AUTHOR
James Axl, <jamesaxl@falseking.org>
SUPPORT
Bugs / Feature Requests
Please report any bugs or feature requests on my email or create a ticket here
https://fossil.falseking.org/vlc-engine/flk
Source Code
This is open source software. The code repository is available for public review and contribution under the terms of the license.
https://fossil.falseking.org/vlc-engine/flk
COPYLEFT AND 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.