Skip to content

[HLS] Implement analytics#5515

Open
sztomek wants to merge 15 commits into
mainfrom
feat/hls-analytics
Open

[HLS] Implement analytics#5515
sztomek wants to merge 15 commits into
mainfrom
feat/hls-analytics

Conversation

@sztomek

@sztomek sztomek commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Description

This PR integrates the latest version of EventHorizon that contains the necessary analytics events and proprerties.
New events:

  • playback_source_resolved - fires on every episode open
  • playback_hls_toggled - fires when show/hide video shelf action is tapped while playing a hls stream
    Enriched properties of existing events:
  • playback_play - hls_available, audio_only_mode are new ones
  • playback_episode_completed - same as above
  • playback_failed - podcast_uuid (if the episode is known), source (where playback was triggered, content_type, playback_protocol (hls if the failing stream was HLS, else progressive), hls_error_detail = the Media3 error code (e.g. ERROR_CODE_IO_NETWORK_CONNECTION_FAILED) only for HLS failures; omitted otherise

Fixes PCDROId-640 https://linear.app/a8c/issue/PCDROID-640/analytics

Testing Instructions

  1. Build and install app
  2. Make sure hls_streaming is enabled
  3. Select a podcast that has hls streams like We Have A Meeting
  4. Open one of their last 2 episodes and hit play
  5. check logcat for related events, filter for Event: playback_

Screenshots or Screencast

SCR-20260701-qtlc

Checklist

  • If this is a user-facing change, I have added an entry in CHANGELOG.md
  • Ensure the linter passes (./gradlew spotlessApply to automatically apply formatting/linting)
  • I have considered whether it makes sense to add tests for my changes
  • All strings that need to be localized are in modules/services/localization/src/main/res/values/strings.xml
  • Any jetpack compose components I added or changed are covered by compose previews
  • I have updated (or requested that someone edit) the Event Horizon schema to reflect any new or changed analytics.

I have tested any UI changes...

  • with different themes
  • with a landscape orientation
  • with the device set to have a large display and font size
  • for accessibility with TalkBack

@sztomek sztomek added this to the 8.16 milestone Jul 1, 2026
@sztomek sztomek requested a review from a team as a code owner July 1, 2026 17:13
@sztomek sztomek requested review from geekygecko and removed request for a team July 1, 2026 17:13
@sztomek sztomek added [Type] Feature Adding a new feature. [Area] Analytics Analytics related issues [Project] HLS labels Jul 1, 2026
@wpmobilebot

Copy link
Copy Markdown
Collaborator

Project dependencies changes

list
! Upgraded Dependencies
com.automattic:eventhorizon:pocket-casts-2026-07-01_15-43-36, (changed from pocket-casts-2026-06-17_04-58-22)
tree
 +--- project ':modules:features:account'
 |    \--- project ':modules:features:search'
 |         \--- project ':modules:services:analytics'
-|              +--- com.automattic:eventhorizon:pocket-casts-2026-06-17_04-58-22
+|              +--- com.automattic:eventhorizon:pocket-casts-2026-07-01_15-43-36
 |              +--- project ':modules:services:model'
-|              |    +--- com.automattic:eventhorizon:pocket-casts-2026-06-17_04-58-22 (*)
+|              |    +--- com.automattic:eventhorizon:pocket-casts-2026-07-01_15-43-36 (*)
 |              |    \--- project ':modules:services:utils'
 |              |         \--- project ':modules:services:payment'
-|              |              \--- com.automattic:eventhorizon:pocket-casts-2026-06-17_04-58-22 (*)
+|              |              \--- com.automattic:eventhorizon:pocket-casts-2026-07-01_15-43-36 (*)
 |              \--- project ':modules:services:preferences'
-|                   \--- com.automattic:eventhorizon:pocket-casts-2026-06-17_04-58-22 (*)
+|                   \--- com.automattic:eventhorizon:pocket-casts-2026-07-01_15-43-36 (*)
 \--- project ':modules:features:discover'
      \--- project ':modules:features:podcasts'
           \--- project ':modules:features:player'
                \--- project ':modules:features:transcripts'
                     \--- project ':modules:services:sharing'
-                         \--- com.automattic:eventhorizon:pocket-casts-2026-06-17_04-58-22 (*)
+                         \--- com.automattic:eventhorizon:pocket-casts-2026-07-01_15-43-36 (*)

Base automatically changed from feat/hls-video-toggle to main July 3, 2026 14:49
@sztomek

sztomek commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

# Conflicts:
#	gradle/libs.versions.toml
#	modules/services/repositories/src/main/java/au/com/shiftyjelly/pocketcasts/repositories/playback/PlaybackManager.kt

Copilot AI commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Resolved the merge conflicts. Two files had conflicts:

  • gradle/libs.versions.toml: kept the newer EventHorizon version from main (pocket-casts-2026-07-02_08-30-44)
  • PlaybackManager.kt: preserved all analytics additions from this branch (HLS availability tracking, PlaybackSourceResolvedEvent, PlaybackHlsToggledEvent, and the audioOnlyModeOrNull/playbackContentTypeFor helpers) while integrating the restructured applyStreamOverride logic from main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] Analytics Analytics related issues [Project] HLS [Type] Feature Adding a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants