public class Capabilities extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
ableToJumpDescriptor |
protected static String |
ableToSelectTrackDescriptor |
protected static String |
broadcastingDescriptor |
protected static String |
changeVolumeDescriptor |
protected static String |
nextPreviousDescriptor |
protected static String |
playbackChangeableDescriptor |
protected static String |
playbackRepeatDescriptor |
protected static String |
playbackRepeatSongDescriptor |
protected static String |
playbackShuffleDescriptor |
protected static String |
playPauseControlDescriptor |
protected static String |
playRequestDetailedDescriptor |
protected static String |
playRequestOutsideDescriptor |
protected static String |
providesTrackInfoDescriptor |
Constructor and Description |
---|
Capabilities() |
Capabilities(Context context)
Deprecated.
context is not used anymore
|
Modifier and Type | Method and Description |
---|---|
boolean |
canChangeVolume()
whether you can change the Volume from outside the player
|
boolean |
canRepeatPlayback()
whether one is able to shuffle songs in a playlist
|
boolean |
canRepeatPlaybackOfSong()
whether one is able to repeat songs in a playlist
|
boolean |
canShufflePlayback()
whether one is able to shuffle the playback
|
static Capabilities |
constructCapabilites(HashMap<String,Boolean> data,
Context context) |
boolean |
handlesPlayRequestFromOutside()
whether you can request playing from outside addons
|
boolean |
hasNextPrevious()
whether one is able to select the next/previous track
|
boolean |
hasPlayPauseControl()
whether you can pause the playback without ending the player
|
boolean |
hasPlayRequestDetailed()
whether you can request a track with providing a TrackInfo/Playlist
|
static Optional<Capabilities> |
importFromResource(ResourceModel resourceModel,
Context context)
creates a TrackInfo from the resourceModel
|
boolean |
isAbleToJump()
whether one is able to jump (select the current position of the track)
|
boolean |
isAbleToSelectTrack()
whether one is able to select a Track
|
boolean |
isBroadcasting()
returns whether you can obtain available Playlists via the BroadcasterAvailablePlaylists-resource.
|
boolean |
isPlaybackChangeable()
whether one is able to change the playback
|
boolean |
providesTrackInfo()
returns whether the player may provide TrackInfo
|
void |
setAbleToJump(boolean ableToJump)
sets whether one is able to jump
|
void |
setAbleToSelectTrack(boolean ableToSelectTrack)
sets whether one is able to select a Track
|
void |
setBroadcasting(boolean broadcasting)
sets whether you can obtain available Playlists via the BroadcasterAvailablePlaylists-resource.
|
void |
setChangeVolume(boolean changeVolume)
sets whether you can change the Volume from outside the player
|
void |
setNextPrevious(boolean nextPrevious)
sets whether one is able to select the next/previous track
|
void |
setPlaybackChangeable(boolean playbackChangeable)
sets whether one is able to change the playback
|
void |
setPlaybackRepeat(boolean playbackRepeat)
sets whether the player is able to shuffle songs in a playlist
|
void |
setPlaybackRepeatSong(boolean playbackRepeatSong)
sets whether one is able to repeat songs in a playlist
|
void |
setPlaybackShuffle(boolean playbackShuffle)
sets whether one is able to shuffle the playback
|
void |
setPlayPauseControl(boolean playPauseControl)
sets whether you can pause the playback without ending the player
|
void |
setPlayRequestDetailed(boolean playRequestDetailed)
sets whether you can request a track with providing a TrackInfo/Playlist
|
void |
setPlayRequestOutside(boolean playRequestOutside)
sets whether you can request playing from outside addons
|
void |
setProvidesTrackInfo(boolean providesTrackInfo)
sets whether you may provide a trackinfo
|
HashMap<String,Boolean> |
write() |
protected static final String playPauseControlDescriptor
protected static final String playRequestOutsideDescriptor
protected static final String playRequestDetailedDescriptor
protected static final String providesTrackInfoDescriptor
protected static final String ableToSelectTrackDescriptor
protected static final String nextPreviousDescriptor
protected static final String ableToJumpDescriptor
protected static final String playbackShuffleDescriptor
protected static final String playbackRepeatDescriptor
protected static final String playbackRepeatSongDescriptor
protected static final String playbackChangeableDescriptor
protected static final String changeVolumeDescriptor
protected static final String broadcastingDescriptor
@Deprecated public Capabilities(Context context)
context
- the context to usepublic Capabilities()
public boolean canChangeVolume()
public void setChangeVolume(boolean changeVolume)
changeVolume
- true if the player is capable, false if notpublic boolean handlesPlayRequestFromOutside()
public void setPlayRequestOutside(boolean playRequestOutside)
playRequestOutside
- true if the player is capable, false if notpublic boolean hasPlayPauseControl()
public void setPlayPauseControl(boolean playPauseControl)
playPauseControl
- true if the player is capable, false if notpublic boolean hasPlayRequestDetailed()
public void setPlayRequestDetailed(boolean playRequestDetailed)
playRequestDetailed
- true if the player is capable, false if notpublic boolean providesTrackInfo()
public void setProvidesTrackInfo(boolean providesTrackInfo)
providesTrackInfo
- true if the player is capable, false if notpublic boolean isAbleToSelectTrack()
public void setAbleToSelectTrack(boolean ableToSelectTrack)
ableToSelectTrack
- true if able, false if notpublic boolean hasNextPrevious()
public void setNextPrevious(boolean nextPrevious)
nextPrevious
- true if able, false if notpublic boolean isAbleToJump()
public void setAbleToJump(boolean ableToJump)
ableToJump
- true if able, false if notpublic boolean canRepeatPlayback()
public void setPlaybackRepeat(boolean playbackRepeat)
playbackRepeat
- true if able, false if notpublic boolean canRepeatPlaybackOfSong()
public void setPlaybackRepeatSong(boolean playbackRepeatSong)
playbackRepeatSong
- true if able, false if notpublic boolean isPlaybackChangeable()
public void setPlaybackChangeable(boolean playbackChangeable)
playbackChangeable
- true if able, false if notpublic boolean canShufflePlayback()
public void setPlaybackShuffle(boolean playbackShuffle)
playbackShuffle
- true if able, false if notpublic boolean isBroadcasting()
public void setBroadcasting(boolean broadcasting)
broadcasting
- true if able, false if notpublic static Capabilities constructCapabilites(HashMap<String,Boolean> data, Context context)
public static Optional<Capabilities> importFromResource(ResourceModel resourceModel, Context context)
resourceModel
- the resourceModelCopyright © 2016. All rights reserved.