class ActiveVlc::LibVlc::MediaListPlayer
Attributes
list[R]
player[R]
ptr[R]
Public Class Methods
new(ptr, media_list = nil, media_player = nil)
click to toggle source
# File lib/activevlc/libvlc/media_list_player.rb, line 14 def initialize(ptr, media_list = nil, media_player = nil) @ptr = MediaListPlayerPtr.new(ptr) @list = media_list @player = media_player self.media_list = media_list if media_list self.media_player = media_player if media_player end
Public Instance Methods
event_manager()
click to toggle source
# File lib/activevlc/libvlc/media_list_player.rb, line 32 def event_manager EventManager.new Api.libvlc_media_list_player_event_manager(@ptr) end
media_list=(list)
click to toggle source
# File lib/activevlc/libvlc/media_list_player.rb, line 23 def media_list=(list) if list and list.is_a?(MediaList) @list = list Api.libvlc_media_list_player_set_media_list(@ptr, list.ptr) else raise "You must provide a valid MediaList" end end
media_player=(player)
click to toggle source
# File lib/activevlc/libvlc/media_list_player.rb, line 40 def media_player=(player) if player.is_a?(MediaPlayer) and not playing? raise "Player already has a media" if player.media @player = player Api.libvlc_media_list_player_set_media_player(@ptr, player.ptr) end end
next()
click to toggle source
# File lib/activevlc/libvlc/media_list_player.rb, line 57 def next Api.libvlc_media_list_player_next(@ptr) end
pause()
click to toggle source
# File lib/activevlc/libvlc/media_list_player.rb, line 51 def pause Api.libvlc_media_list_player_pause(@ptr) end
play()
click to toggle source
# File lib/activevlc/libvlc/media_list_player.rb, line 48 def play Api.libvlc_media_list_player_play(@ptr) end
playing?()
click to toggle source
# File lib/activevlc/libvlc/media_list_player.rb, line 36 def playing? Api.libvlc_media_list_player_is_playing(@ptr) != 0 end
previous()
click to toggle source
# File lib/activevlc/libvlc/media_list_player.rb, line 60 def previous Api.libvlc_media_list_player_previous(@ptr) end
stop()
click to toggle source
# File lib/activevlc/libvlc/media_list_player.rb, line 54 def stop Api.libvlc_media_list_player_stop(@ptr) end