-
- All Implemented Interfaces:
-
tv.mycujoo.mcls.cast.ICast
public final class Cast implements ICastIntegration with Google Cast
-
-
Constructor Summary
Constructors Constructor Description Cast(ICastContextProvider castContextProvider)endregion Cast(ViewStub miniControllerViewStub, MediaRouteButton mediaRouteButton, String receiverAppId)
-
Method Summary
Modifier and Type Method Description ISessionManagerListenerinitialize(Context context, ICastListener castListener)Initialize integration by Creating CastContext
Setting current session to newly created CastContext
Return SessionManagerListener
UnitloadRemoteMedia(CasterLoadRemoteMediaParams params)Load given parameters into remote device Unitplay()Play content on remote client Unitpause()Pause content on remote client UnitseekTo(Long position)Seek to given position on remote client UnitfastForward(Long amount)Fast forward by given amount Unitrewind(Long amount)Rewind by given amount LongcurrentPosition()Return current position, if remote media client is setup UnitonResume()Add cast session listener in onResume event of host component Must be called in onResume of host Activity/Fragment UnitonPause()Remove cast session listener in onPause event of host component Must be called in onPause of host Activity/Fragment -
-
Constructor Detail
-
Cast
Cast(ICastContextProvider castContextProvider)
endregion
-
Cast
Cast(ViewStub miniControllerViewStub, MediaRouteButton mediaRouteButton, String receiverAppId)
- Parameters:
miniControllerViewStub- view-stub which mini controller will inflate at
-
-
Method Detail
-
initialize
ISessionManagerListener initialize(Context context, ICastListener castListener)
Initialize integration by
Creating CastContext
Setting current session to newly created CastContext
Return SessionManagerListener
- Parameters:
context- context to create CastContext fromcastListener- listener for cast session events
-
loadRemoteMedia
Unit loadRemoteMedia(CasterLoadRemoteMediaParams params)
Load given parameters into remote device
-
seekTo
Unit seekTo(Long position)
Seek to given position on remote client
- Parameters:
position- position at which player must seek to
-
fastForward
Unit fastForward(Long amount)
Fast forward by given amount
-
currentPosition
Long currentPosition()
Return current position, if remote media client is setup
-
onResume
Unit onResume()
Add cast session listener in onResume event of host component Must be called in onResume of host Activity/Fragment
-
-
-