# ByteArk Lighthouse

ByteArk Player SDK for Flutter supports analytics through ByteArk Lighthouse (opens new window), configured via lighthouseSetting on ByteArkPlayerConfig.

# Configure

final config = ByteArkPlayerConfig(
  licenseKey: licenseKey,
  playerItem: playerItem,
  lighthouseSetting: ByteArkLighthouseSetting(
    projectId: "<PROJECT_ID>",
    debug: false,
  ),
);
1
2
3
4
5
6
7
8
Property Type Description
projectId String? Lighthouse Project ID (contact ByteArk to obtain)
debug bool? Enable debug mode for development

# Send metadata per video

final playerItem = ByteArkPlayerItem(
  sources: [
    ByteArkPlayerSource(url: "<MEDIA_URL>"),
  ],
  mediaId: "VIDEO_ID",
  title: "Big Buck Bunny",
  lighthouseMetaData: ByteArkPlayerLighthouseMetaData(
    userId: "user-123",
    videoTitle: "Big Buck Bunny",
    seriesTitle: "Shorts",
    season: "1",
    episode: "1",
  ),
);
1
2
3
4
5
6
7
8
9
10
11
12
13
14

All metadata fields are of type String? and optional.

# Viewer fields

Field Type Description
userId String? Unique identifier of the viewer
age String? Viewer age
gender String? Viewer gender
nationality String? Viewer nationality
country String? Viewer country
city String? Viewer city or province
lat String? Viewer latitude
long String? Viewer longitude
subscriptionPlan String? Viewer's subscription plan
accountCreationDate String? Date the viewer's account was created

# Content fields

Field Type Description
videoTitle String? Title of the video
seriesId String? Series identifier
seriesTitle String? Series title
season String? Season number
episode String? Episode number
subEpisode String? Sub-episode identifier
duration String? Duration of the video
publishedDate String? Content published date
genres String? Content genres (comma-separated if multiple)
rating String? Content rating (e.g., PG-13)

# Custom fields

Field Type Description
d1d10 String? Custom dimension fields for your own analytics needs

Note

Using Lighthouse always requires mediaId and title on ByteArkPlayerItem.