Package com.castlabs.analytics
Class AnalyticsMetaData
- java.lang.Object
-
- com.castlabs.analytics.AnalyticsMetaData
-
- All Implemented Interfaces:
Parcelable
public class AnalyticsMetaData extends Object implements Parcelable
The meta-data class wraps around mandatory and optional meta-data that are send to various analytics backends. The two parameters that are mandatory in all cases arelive
andassetId
.live
needs to be set totrue
if the content is a live stream. Analytics backends usually require this information before playback starts. TheassetId
identifies the content uniquely within the analytics system.- Since:
- 3.1.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description String
assetId
The asset ID that identifies the currently played contentstatic Parcelable.Creator<AnalyticsMetaData>
CREATOR
int
durationSeconds
The duration of the current asset in secondsBundle
extra
Additional and plugin specific meta-data.boolean
live
True if the current asset is a live streamString
viewerId
An identifier for the current User-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Constructor Description AnalyticsMetaData(boolean live, String assetId)
Create a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
describeContents()
void
writeToParcel(Parcel dest, int flags)
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<AnalyticsMetaData> CREATOR
-
live
public final boolean live
True if the current asset is a live stream
-
assetId
@NonNull public final String assetId
The asset ID that identifies the currently played content
-
extra
@NonNull public final Bundle extra
Additional and plugin specific meta-data. See the individual plugin documentations for a list of key/value pairs that can be set in the extras bundle.
-
viewerId
@Nullable public String viewerId
An identifier for the current User
-
durationSeconds
public int durationSeconds
The duration of the current asset in seconds
-
-
Constructor Detail
-
AnalyticsMetaData
public AnalyticsMetaData(boolean live, @NonNull String assetId)
Create a new instance- Parameters:
live
- True if the current content is a live streamassetId
- The asset ID uniquely identifies the content
-
-
Method Detail
-
describeContents
public int describeContents()
- Specified by:
describeContents
in interfaceParcelable
-
writeToParcel
public void writeToParcel(Parcel dest, int flags)
- Specified by:
writeToParcel
in interfaceParcelable
-
-