Skip to content

Commit

Permalink
Documentation for new ssai methods (#384)
Browse files Browse the repository at this point in the history
Co-authored-by: petereder <104372727+petereder@users.noreply.github.com>
Co-authored-by: Peter Eder <peter.eder@bitmovin.com>
  • Loading branch information
3 people authored Jun 13, 2024
1 parent 4051390 commit d3f7201
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Policy violations when using `StrictMode.detectDiskWrites()`, `StrictMode.detectDiskReads()`
and `StrictMode.detectCustomSlowCalls()`, due to mainScope usage for persistent event queue

### Changed
- [internal] API docs for ssai feature

## v3.5.0

### Added
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
package com.bitmovin.analytics.api.ssai

/**
* Provides Metadata for the ad break
*/
data class SsaiAdBreakMetadata(
/**
* Position of the ad break. Also called Ad Placement Type
*/
val adPosition: SsaiAdPosition? = null,
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,20 @@ package com.bitmovin.analytics.api.ssai

import com.bitmovin.analytics.api.CustomData

/**
* Provides metadata for ad
*/
data class SsaiAdMetadata(
/**
* Id to identify the ad in the adSystem
*/
val adId: String? = null,
/**
* System that provides the ad
*/
val adSystem: String? = null,
/**
* Additional customData for the ad
*/
val customData: CustomData? = null,
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package com.bitmovin.analytics.api.ssai

/**
* Describes the position where ads can be placed.
* Also called Ad Placement Type.
*/
enum class SsaiAdPosition(val position: String) {
PREROLL("preroll"),
MIDROLL("midroll"),
Expand Down
16 changes: 16 additions & 0 deletions collector/src/main/java/com/bitmovin/analytics/api/ssai/SsaiApi.kt
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
package com.bitmovin.analytics.api.ssai

interface SsaiApi {
/**
* Indicates the start of an ad break with the given metadata.
* Must be called before `adStart`, otherwise calls to `adStart` will be no-op.
*
* @param adBreakMetadata [SsaiAdBreakMetadata] Provides metadata for the ad break
*/
fun adBreakStart(adBreakMetadata: SsaiAdBreakMetadata? = null)

/**
* Indicates the start of an ad with the given metadata. No-op if called outside of ad break.
* Implicitly closes tracking of an ad and starts tracking of a new ad.
*
* @param adMetadata [SsaiAdMetadata] Provides metadata for the ad
*/
fun adStart(adMetadata: SsaiAdMetadata? = null)

/**
* Indicates the end of the ad break and wraps up the ad data collection.
* No-op if no ad break is currently active. Implicitly closes tracking of the last ad.
*/
fun adBreakEnd()
}

0 comments on commit d3f7201

Please sign in to comment.