Skip to content

Commit

Permalink
Remove some verbosity in the doc
Browse files Browse the repository at this point in the history
  • Loading branch information
StaehliJ committed Oct 29, 2024
1 parent c87ef7b commit 604c359
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import ch.srgssr.pillarbox.analytics.SRGAnalytics.initSRGAnalytics
* @property sourceKey The CommandersAct source key. Production apps should use [SOURCE_KEY_SRG_PROD], and apps in development should use
* [SOURCE_KEY_SRG_DEBUG].
* @property nonLocalizedApplicationName The non-localized name of the application. By default, the application name defined in the manifest is used.
* You can set it to `null` if the application name is not localized.
* @property userConsent The user consent to transmit to ComScore and CommandersAct.
* @property comScorePersistentLabels The initial persistent labels for ComScore analytics.
* @property commandersActPersistentLabels The initial persistent labels for Commanders Act analytics.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ package ch.srgssr.pillarbox.analytics.commandersact
*/
interface CommandersAct {
/**
* Sends a page view event to Commanders Act.
* Sends a page view event.
*
* @param pageView The [CommandersActPageView] object representing the page view to send.
* @param pageView The [CommandersActPageView] to be sent.
*/
fun sendPageView(pageView: CommandersActPageView)

/**
* Sends an event to Commanders Act.
* Sends an event.
*
* @param event The [CommandersActEvent] instance to send.
* @param event The [CommandersActEvent] to be sent.
*/
fun sendEvent(event: CommandersActEvent)

/**
* Sends a [TCMediaEvent] to Commanders Act.
* Sends a [TCMediaEvent].
*
* @param event The [TCMediaEvent] to send.
* @param event The [TCMediaEvent] to be sent.
*/
fun sendTcMediaEvent(event: TCMediaEvent)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,6 @@ import kotlin.time.DurationUnit

/**
* Represents a media event to be sent to Commanders Act. This class extends `TCCustomEvent` and adds specific properties for media tracking.
*
* ```kotlin
* val mediaEvent = TCMediaEvent(
* eventType = MediaEventType.PLAY,
* assets = mapOf("key1" to "value1"),
* )
* mediaEvent.mediaPosition = 15.minutes
* mediaEvent.deviceVolume = 0.5f
* mediaEvent.isSubtitlesOn = true
* // Set other properties as needed
*
* SRGAnalytics.commandersAct.sendTcMediaEvent(mediaEvent)
* ```
*
* @property eventType The type of media event, defined by the Analytics team using the [MediaEventType] enum.
* @property assets A map representing additional data associated with the event.
* @property sourceId An optional identifier for the source of the event.
Expand All @@ -37,41 +23,37 @@ class TCMediaEvent(
val sourceId: String? = null
) : TCCustomEvent(eventType.toString()) {
/**
* Represents the current playback position within the media.
* Represents the current playback position.
*/
var mediaPosition: Duration = Duration.ZERO

/**
* Represents the time shift applied to the data. A value of `null` indicates that no time shift has been applied.
* Represents the time shift applied if it is a live stream, `null` otherwise.
*/
var timeShift: Duration? = null

/**
* Represents the device's volume level as a percentage. The value ranges between 0.0 and 1.0, where 0.0 represents silent and 1.0 represents
* the maximum volume. It may be `null` if the device volume information is unavailable.
* Represents the device's volume level as a percentage.
*/
var deviceVolume: Float? = null

/**
* Indicates whether subtitles are enabled. `true` if subtitles are turned on, `false` otherwise.
* Indicates whether subtitles are enabled.
*/
var isSubtitlesOn: Boolean = false

/**
* Represents the language of the currently selected subtitle track. It may be `null` if no subtitles are selected or if the language information
* is unavailable.
* Represents the language of the currently selected subtitle track.
*/
var subtitleSelectionLanguage: String? = null

/**
* Represents the language of the currently selected audio track. It may be `null` if no audio track is selected or if the language information
* is unavailable.
* Represents the language of the currently selected audio track.
*/
var audioTrackLanguage: String? = null

/**
* Indicates whether the current audio track has an associated audio description. `true` if the audio track includes audio descriptions, and
* `false` otherwise.
* Indicates whether the current audio track has an associated audio description.
*/
var audioTrackHasAudioDescription: Boolean = false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ interface ComScore {
/**
* Sends a page view event to ComScore.
*
* @param pageView The [ComScorePageView] object containing the data for the page view to be sent.
* @param pageView The [ComScorePageView] to be sent.
*/
fun sendPageView(pageView: ComScorePageView)

/**
* Puts the provided labels.
* Puts the provided labels as persistent data.
*
* @param labels A map containing the labels.
*/
Expand Down

0 comments on commit 604c359

Please sign in to comment.