com.mediakind.mkplayer.config

package com.mediakind.mkplayer.config

Classes

Name Description
class MKAdaptationConfiguration: MKConfiguration

Contains configuration values regarding the behaviour of the adaptation.

data class MKPAnalyticsConfiguration: Any

This class represents the analytics data

class MKPBackendConfiguration: MKConfiguration

These properties must be set and passed in as part of MKPPlayerConfiguration for playback of Mediakind registered source streams. These properties contain details of the server endpoints and other parameters/tokens that are necessary for the backend communication. Playback is not possible without these properly configured.

Below is an example


var backendConfiguration: MKPBackendConfiguration? = null
val accountId: String = "name@company.com"
val authToken = "Auth****"   // sourceConfig.stsToken!!

backendConfiguration = MKPBackendConfiguration("https://ottapp-appgw-amp-a.cim.mr.tv3cloud.com" /* MK server End Point */, authToken , accountId)

   var configuration = MKPlayerConfiguration()
   configuration?.backendConfiguration = backendConfiguration

  val player = mkplayer = MKPlayer(context: Context, rootView: RelativeLayout, configuration)

class MKPCdnOptions: MKConfiguration

CDN Token authentication helps to protect CDN streams from being snitched. This feature allows users to enter a secret token key during setting up a CDN resource.

This configuration applies only to MK Streams.

For example:


val cdnTokens = mapOf("cdntoken" to "239d67703a9b8fd18199d539a13c1ca2", "token" to "339d67703a9b8fd18199d539a13c1ca3")
//OR
val cdnTokens = HashMap()
cdnTokens.put("cdntoken", "239d67703a9b8fd18199d539a13c1ca2")
cdnTokens.put("token", "339d67703a9b8fd18199d539a13c1ca3")
val cdnOptions = MKPCdnOptions(cdnTokens)
//OR
val cdnOptions = MKPCdnOptions(cdnTokens, 10 /*cdn Failover Percent*/)
 val sourceConfiguration = MKPSourceConfiguration(sourceConfig, cdnOptions = cdnOptions)
 mkplayer.load(sourceConfiguration)
enum class MKPRightsMode: Enum<MKPRightsMode>
class MKPSourceConfiguration: MKConfiguration

MKPSourceConfiguration defines necessary configurations values to play either MediaKind (MK) dependent or independent source url's.

class MKPTweaksConfiguration: MKConfiguration

This configuration is used as an incubator for experimental features. Tweaks are not officially supported and are not guaranteed to be stable, i.e. their naming, functionality and API can change at any time within the tweaks or when being promoted to an official feature and moved into its final configuration namespace.

class MKPlayerConfiguration: MKConfiguration

This class contains the configuration required for creating the player instance