class MVLC::Player::State

Attributes

eof?[RW]
is_eof[RW]
is_paused[RW]
is_playing[RW]
pause?[RW]
paused?[RW]
play?[RW]
playing?[RW]
volume[RW]

Public Class Methods

new() click to toggle source
# File lib/mvlc/player/state.rb, line 14
def initialize
  @is_eof = false
  @is_playing = false
  @is_paused = false
  @volume = nil
end

Public Instance Methods

eof_possible?() click to toggle source
# File lib/mvlc/player/state.rb, line 29
def eof_possible?
  @is_playing && !@is_paused && !@is_eof
end
handle_eof() click to toggle source
# File lib/mvlc/player/state.rb, line 33
def handle_eof
  @is_eof = true
  @is_playing = false
end
handle_start() click to toggle source
# File lib/mvlc/player/state.rb, line 38
def handle_start
  @is_playing = true
  @is_eof = false
end
progressing?() click to toggle source
# File lib/mvlc/player/state.rb, line 25
def progressing?
  @is_playing && !@is_paused
end
toggle_pause() click to toggle source
# File lib/mvlc/player/state.rb, line 21
def toggle_pause
  @is_paused = !@is_paused
end