module Airplay::Playable

Public Instance Methods

play(file_or_url = "playlist", options = {}) click to toggle source

Public: Plays a given video

file_or_url - The video to be played options - Optional start position

Returns a Player object to control the playback

# File lib/airplay/playable.rb, line 12
def play(file_or_url = "playlist", options = {})
  player.async.play(file_or_url, options)
  player
end
player() click to toggle source

Public: Gets the player object

Returns a Player object

# File lib/airplay/playable.rb, line 36
def player
  @_player ||= Airplay::Player.new(self)
end
playlist() click to toggle source

Public: Gets the current playlist

Returns the Playlist

# File lib/airplay/playable.rb, line 21
def playlist
  player.playlist
end
playlists() click to toggle source

Public: Gets all the playlists

Returns the Playlists

# File lib/airplay/playable.rb, line 29
def playlists
  player.playlists
end