class Player::MediaPlayer

Defined in:

mediaplayer/mediaplayer.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(mode : MediaPlayerMode = MediaPlayerMode::Multiple) #

[View source]
def self.new(media, mode : MediaPlayerMode = MediaPlayerMode::Multiple) #

[View source]

Instance Method Detail

def can_pause? : Bool #

[View source]
def decrease_volume #

[View source]
def equalizer : Player::Equalizer #

[View source]
def equalizer=(equalizer : Equalizer) #

[View source]
def finalize #

[View source]
def get : Media | MediaList | Nil #

[View source]
def get! : Media | MediaList #

[View source]
def get_equalizer : Player::Equalizer #

[View source]
def get_formatted_length(format : Time::Format = Time::Format.new("%M:%S")) : String #

[View source]
def get_length : LibVlc::Time #

time in milliseconds


[View source]
def get_position #

[View source]
def get_state : LibVlc::State #

[View source]
def get_time : LibVlc::Time #

time in milliseconds


[View source]
def get_volume #

[View source]
def get_window #

Linux only, xwindow id


[View source]
def increase_volume #

[View source]
def is_playing? : Bool #

[View source]
def is_seekable? : Bool #

[View source]
def list : MediaList | Nil #

[View source]
def list! : MediaList #

[View source]
def media : Player::Media | Player::MediaList | Nil #

[View source]
def media=(media : Player::Media | Player::MediaList | Nil) #

[View source]

[View source]
def mode=(mode : Player::MediaPlayerMode) #

[View source]
def next #

Will only work for the multiple mode


[View source]
def next_frame #

[View source]
def obj : Pointer(Pointer(Void)) #

[View source]
def obj=(obj : Pointer(Pointer(Void))) #

[View source]
def off(event : LibVlc::Event, proc : LibVlc::Callback, user_data = nil) #

[View source]
def off(event : LibVlc::Event, user_data = nil, &block : Pointer(LibVlc::EventData), Pointer(Void) -> Nil) #

[View source]
def on(event : LibVlc::Event, proc : LibVlc::Callback, user_data = nil) #

[View source]
def on(event : LibVlc::Event, user_data = nil, &block : Pointer(LibVlc::EventData), Pointer(Void) -> Nil) #

[View source]
def pause(should_pause : Bool) #

[View source]
def pause #

[View source]
def play #

[View source]
def play_index(index : Int32) #

[View source]
def play_media(media : Media) #

[View source]
def previous #

Will only work for the multiple mode


[View source]
def set(media : Media | MediaList) #

[View source]
def set_equalizer(equalizer : Player::Equalizer) #

[View source]
def set_playback_mode(mode : LibVlc::PlaybackMode) #

[View source]
def set_position(percentage, fast = true) #

0 <= percentage <= 1


[View source]
def set_rate(rate) #

[View source]
def set_speed(speed) #

[View source]
def set_time(time : LibVlc::Time, fast = true) #

time in milliseconds


[View source]
def set_volume(volume) #

[View source]
def set_window(id : LibC::UInt32T) #

Linux only, xwindow id


[View source]
def stop : Bool #

[View source]