DummyPlayer
public final class DummyPlayer : RemoteMediaPlayer
Mock FireTV / player Use only for testing purposes
-
Initializes the player
Declaration
Swift
public init()
-
Returns the name of player
Declaration
Swift
public func name() -> String!
Return Value
DummyPlayer
-
Returns the unique identifier of the player
Declaration
Swift
public func uniqueIdentifier() -> String!
Return Value
DummyPlayerID
-
Returns the current volume of the player The volume api is currently not supported by the built-in receiver app
Declaration
Swift
public func getVolume() -> BFTask<AnyObject>!
Return Value
a nil task result
-
Sets the volume of the player The volume api is currently not supported by the built-in receiver app
Declaration
Swift
public func setVolume(_ volume: Double) -> BFTask<AnyObject>!
Return Value
a nil task result
-
Asks the player if he is muted The mute api is currently not supported by the built-in receiver app
Declaration
Swift
public func isMute() -> BFTask<AnyObject>!
Return Value
a nil task result
-
Mutes or unmutes the player The mute api is currently not supported by the built-in receiver app
Declaration
Swift
public func setMute(_ mute: Bool) -> BFTask<AnyObject>!
Return Value
a nil task result
-
Returns the current position of the player
Declaration
Swift
public func getPosition() -> BFTask<AnyObject>!
Return Value
a
NSNumber
with the value5948
as task result -
Returns the duration of the currently playing media
Declaration
Swift
public func getDuration() -> BFTask<AnyObject>!
Return Value
a
NSNumber
with the value178934
as task result -
Fetch the current player status
Declaration
Swift
public func getStatus() -> BFTask<AnyObject>!
Return Value
a
MediaPlayerStatus
with the stateReadyToPlay
and the conditionGood
as task result -
Asks the player if the given mime type is supported
Declaration
Swift
public func isMimeTypeSupported(_ mimeType: String!) -> BFTask<AnyObject>!
Parameters
mimeType
mime type to check
Return Value
the string
true
as task result -
Pauses the playback on the player
Declaration
Swift
public func pause() -> BFTask<AnyObject>!
Return Value
a nil task result
-
Starts the playback on the player
Declaration
Swift
public func play() -> BFTask<AnyObject>!
Return Value
a nil task result
-
Stops the playback on the player
Declaration
Swift
public func stop() -> BFTask<AnyObject>!
Return Value
a nil task result
-
Seeks the player position to the given milliseconds using the given mode
Declaration
Swift
public func seek(toPosition positionMilliseconds: Int64, andMode seekMode: SeekType) -> BFTask<AnyObject>!
Parameters
positionMilliseconds
position to seek to in milliseconds
seekMode
mode to use for the seeking
Return Value
a nil task result
-
Sets the media source of the player
Declaration
Swift
public func setMediaSourceToURL(_ mediaLoc: String!, metaData: String!, autoPlay: Bool, andPlayInBackground playInBg: Bool) -> BFTask<AnyObject>!
Parameters
mediaLoc
the url of the media which should be played
metaData
the metadata of the media
autoPlay
indicates if media should be autoplayed, currently not supported by the built-in media receiver
playInBg
indicates if media should be played in background, currently not supported by the built-in media receiver
Return Value
a nil task result
-
Adds a status listener to the player Currently only one listener is supported by the built-in media receiver
Declaration
Swift
public func add(_ listener: MediaPlayerStatusListener!) -> BFTask<AnyObject>!
Parameters
listener
an object conforming to
MediaPlayerStatusListener
which will get status updates from the playerReturn Value
a nil task result
-
Removes the given listener from the playe
Declaration
Swift
public func remove(_ listener: MediaPlayerStatusListener!) -> BFTask<AnyObject>!
Parameters
listener
listener to remove
Return Value
a nil task result
-
Sets the position update interval
Declaration
Swift
public func setPositionUpdateInterval(_ intervalMs: Int64) -> BFTask<AnyObject>!
Parameters
intervalMs
update interval in milliseconds
Return Value
a nil task result
-
Sends the given command to the player Currently not supported by the built-in media receiver
Declaration
Swift
public func sendCommand(_ cmd: String!) -> BFTask<AnyObject>!
Parameters
cmd
the command string
Return Value
a nil task result
-
Sets the style of the player
Declaration
Swift
public func setPlayerStyle(_ styleJson: String!) -> BFTask<AnyObject>!
Parameters
styleJson
the json encoded player style
Return Value
a nil task result
-
Fetches the info of the currently playing media
Declaration
Swift
public func getMediaInfo() -> BFTask<AnyObject>!
Return Value
a media player info with
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
as source,{\
title\: \
Testvideo\, \
description\: \
Only use for test purposes\, \
type\: \
video\}
as metadata and “” as extra