class Player::MediaPlayer
- Player::MediaPlayer
- Reference
- Object
Defined in:
mediaplayer/mediaplayer.crConstructors
- .new(mode : MediaPlayerMode = MediaPlayerMode::Multiple)
- .new(media, mode : MediaPlayerMode = MediaPlayerMode::Multiple)
Instance Method Summary
- #can_pause? : Bool
- #decrease_volume
- #equalizer : Player::Equalizer
- #equalizer=(equalizer : Equalizer)
- #finalize
- #get : Media | MediaList | Nil
- #get! : Media | MediaList
- #get_equalizer : Player::Equalizer
- #get_formatted_length(format : Time::Format = Time::Format.new("%M:%S")) : String
-
#get_length : LibVlc::Time
time in milliseconds
- #get_position
- #get_state : LibVlc::State
-
#get_time : LibVlc::Time
time in milliseconds
- #get_volume
-
#get_window
Linux only, xwindow id
- #increase_volume
- #is_playing? : Bool
- #is_seekable? : Bool
- #list : MediaList | Nil
- #list! : MediaList
- #media : Player::Media | Player::MediaList | Nil
- #media=(media : Player::Media | Player::MediaList | Nil)
- #mode : Player::MediaPlayerMode
- #mode=(mode : Player::MediaPlayerMode)
-
#next
Will only work for the multiple mode
- #next_frame
- #obj : Pointer(Pointer(Void))
- #obj=(obj : Pointer(Pointer(Void)))
- #off(event : LibVlc::Event, proc : LibVlc::Callback, user_data = nil)
- #off(event : LibVlc::Event, user_data = nil, &block : Pointer(LibVlc::EventData), Pointer(Void) -> Nil)
- #on(event : LibVlc::Event, proc : LibVlc::Callback, user_data = nil)
- #on(event : LibVlc::Event, user_data = nil, &block : Pointer(LibVlc::EventData), Pointer(Void) -> Nil)
- #pause(should_pause : Bool)
- #pause
- #play
- #play_index(index : Int32)
- #play_media(media : Media)
-
#previous
Will only work for the multiple mode
- #set(media : Media | MediaList)
- #set_equalizer(equalizer : Player::Equalizer)
- #set_playback_mode(mode : LibVlc::PlaybackMode)
-
#set_position(percentage, fast = true)
0 <= percentage <= 1
- #set_rate(rate)
- #set_speed(speed)
-
#set_time(time : LibVlc::Time, fast = true)
time in milliseconds
- #set_volume(volume)
-
#set_window(id : LibC::UInt32T)
Linux only, xwindow id
- #stop : Bool
Constructor Detail
Instance Method Detail
def off(event : LibVlc::Event, user_data = nil, &block : Pointer(LibVlc::EventData), Pointer(Void) -> Nil)
#
def on(event : LibVlc::Event, user_data = nil, &block : Pointer(LibVlc::EventData), Pointer(Void) -> Nil)
#