Module: Airplay::Playable
- Included in:
- Device
- Defined in:
- lib/airplay/playable.rb
Instance Method Summary collapse
-
#play(file_or_url = "playlist", options = {}) ⇒ Object
Public: Plays a given video.
-
#player ⇒ Object
Public: Gets the player object.
-
#playlist ⇒ Object
Public: Gets the current playlist.
-
#playlists ⇒ Object
Public: Gets all the playlists.
Instance Method Details
#play(file_or_url = "playlist", options = {}) ⇒ Object
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
12 13 14 15 |
# File 'lib/airplay/playable.rb', line 12 def play(file_or_url = "playlist", = {}) player.async.play(file_or_url, ) player end |
#player ⇒ Object
Public: Gets the player object
Returns a Player object
36 37 38 |
# File 'lib/airplay/playable.rb', line 36 def player @_player ||= Airplay::Player.new(self) end |
#playlist ⇒ Object
Public: Gets the current playlist
Returns the Playlist
21 22 23 |
# File 'lib/airplay/playable.rb', line 21 def playlist player.playlist end |
#playlists ⇒ Object
Public: Gets all the playlists
Returns the Playlists
29 30 31 |
# File 'lib/airplay/playable.rb', line 29 def playlists player.playlists end |