VMSPlayerController. Android
PlayerFragment
Initialization
PlayerFragment.newInstance(data: VMSPlayerData)
VMSPlayerData
init(
camera: VMSCamera,
groupCameras: [VMSCamera]?,
user: VMSUser,
translations: VMSPlayerTranslations,
playerApi: VMSPlayerApi,
options: VMSPlayerOptions
)
newInstance(
VMSPlayerData(
val camera: VMSCamera,
val listCameras: ArrayList<VMSCamera>?,
val event: VMSEvent?,
val jsonTranslations: String,
val videoRates: ArrayList<Double>,
val markTypes: ArrayList<VMSEventType>,
val permissions: List<VMSPermission>,
val allowVibration: Boolean,
)
)
camera - The camera you want to open the player for.
listCameras - When this parameter is set, you can swipe inside the player to change the camera being displayed.
event - When this parameter is set, you can open the archive at a specific time.
jsonTranslations - A dictionary of translations required inside the player. You can construct it based on the one you receive from the server. Refer to StaticsApi for details.
videoRates - Video speed options available for setting in the archive stream.
markTypes - Mark type options available for setting in the archive settings to be displayed on the timeline.
permissions - List of permissions needed for the proper functioning of the player.
allowVibration - The default is yes; set to false if you don't want to use vibration when scrolling the timeline.
VMSPlayerCallbacks
The PlayerFragment uses VMSPlayerCallbacks.
onClickScreenShot(bitmap: Bitmap, camera: VMSCamera, time: Calendar) - Captures a screenshot of the currently displayed camera at the current broadcast date.
onClickOpenEvents(data: VMSCamera? = null) - Opens all the events of the specified camera.
onSendAppEvent(value: String) - If you wish to log user activity, this method provides the action names to be transferred to your app.