Skip to content

[MBL-19606][All] Enable DASH playback#3663

Open
kristofnemere wants to merge 1 commit intomasterfrom
MBL-19606-enable-dash-support
Open

[MBL-19606][All] Enable DASH playback#3663
kristofnemere wants to merge 1 commit intomasterfrom
MBL-19606-enable-dash-support

Conversation

@kristofnemere
Copy link
Copy Markdown
Contributor

@kristofnemere kristofnemere commented Apr 23, 2026

Test plan:

Main use cases

Test each of the following on both a regular non-stream-enabled sandbox and a stream-enabled sandbox — media URLs differ between the two (direct files vs. Kaltura CMAF/DASH streams), and both paths need to keep working.

  1. Media recording submission playback
    • Student: play own media-recording submission (audio and video) in submission content view
    • Teacher: open a student's media-recording submission in SpeedGrader
  2. Submission comments with media recordings
    • Student: tap an audio/video media-comment in the submission Comments tab
    • Teacher: tap an audio/video media-comment in SpeedGrader
  3. Inbox messages with media attachment (note: media attachments can only be recorded on web)
    • Student / Teacher / Parent: open an inbox conversation containing a recorded media attachment and tap to play

Verify on both sandboxes:

  • Video and audio start playing on first tap (no UnrecognizedInputFormatException loop)
  • Seek and pause/resume work
  • Rotation mid-playback keeps playback going
  • Error state shows the existing retry UI when the URL is genuinely broken
  • Non-media attachments (PDF, image, docx) still open the way they used to (download / preview) — nothing is rerouted into the media viewer by mistake

Affected screens (please exercise all of them in addition to the main use cases)

Student

  • Inbox conversation detail — file/media-comment attachments
  • Submission details → Comments tab — media attachments
  • Media submission content (MEDIA_RECORDING assignments)
  • Discussion submission viewing
  • Page details (course Pages)
  • Syllabus tab / Syllabus view
  • Assignment basic / Assignment details
  • Locked module item
  • Elementary (K5) course pager
  • Push notification / bookmark deep link to a media file
  • Studio video playback (regression check — should still use legacy VideoViewActivity auto-play)

Teacher

  • Inbox conversation detail — file/media-comment attachments
  • Page details
  • Quiz preview / Quiz details
  • Syllabus tab
  • Assignment details
  • Internal WebView (generic)
  • SpeedGrader LTI submission
  • SpeedGrader file attachment playback (video submissions)

Parent (new behavior — previously audio/video attachments always downloaded)

  • Inbox conversation detail — file/media-comment attachments now open the new ViewMediaActivity
  • Non-media attachments still download via FileDownloader

Additional checks

  • Any other screen across the three apps that plays audio/video (file preview, inline page media, etc.) — confirm no regressions
  • Dark mode + light mode
  • Landscape + tablet layouts
  • TalkBack / a11y on the media viewer

refs: MBL-19606
affects: Student, Teacher, Parent
release note: Enabled DASH/CMAF playback for audio and video in inbox messages, submission comments, media-recording submissions, and media embedded in pages/quizzes/syllabus. Parent inbox now plays audio and video in-app instead of only downloading.

Checklist

  • Follow-up e2e test ticket created or not needed
  • Tested in dark mode
  • Tested in light mode
  • Test in landscape mode and/or tablet
  • A11y checked
  • Approve from product

- Add shouldOpenMediaInternally helper in pandautils that detects audio/video by mimeClass, mimeType, or URL extension (including /cmaf)
- Route audio/video inbox attachments through BaseViewMediaActivity in Student, Teacher, and Parent (Parent previously only downloaded)
- ExoAgent: detect /cmaf single-use URLs up front and use DASH, fall back to DASH retry on UnrecognizedInputFormatException for media_download URLs
- Student/Teacher openMedia and BaseRouterActivity.openMedia accept mimeType/mimeClass so detection happens inside, not at the call sites
- Add unit tests for shouldOpenMediaInternally

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kristofnemere kristofnemere changed the title [MBL-19606][All] Enable DASH playback for inbox and webview media [MBL-19606][All] Enable DASH playback Apr 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🧪 Unit Test Results

✅ 📱 Parent App

  • Tests: 315 total, 0 failed, 0 skipped
  • Duration: 32.917s
  • Success Rate: 100%

✅ 📱 Student App

  • Tests: 1210 total, 0 failed, 0 skipped
  • Duration: 0.000s
  • Success Rate: 100%

✅ 📱 Teacher App

  • Tests: 364 total, 0 failed, 0 skipped
  • Duration: 26.957s
  • Success Rate: 100%

✅ 🌅 Horizon

  • Tests: 779 total, 0 failed, 0 skipped
  • Duration: 39.112s
  • Success Rate: 100%

✅ 📦 Submodules

  • Tests: 3430 total, 0 failed, 0 skipped
  • Duration: 58.289s
  • Success Rate: 100%

📊 Summary

  • Total Tests: 6098
  • Failed: 0
  • Skipped: 0
  • Status: ✅ All tests passed!

Last updated: Thu, 23 Apr 2026 14:10:31 GMT

@github-actions
Copy link
Copy Markdown
Contributor

📊 Code Coverage Report

⚠️ Student

  • PR Coverage: 42.55%
  • Master Coverage: 42.61%
  • Delta: -0.06%

⚠️ Teacher

  • PR Coverage: 25.22%
  • Master Coverage: 25.26%
  • Delta: -0.04%

✅ Pandautils

  • PR Coverage: 23.99%
  • Master Coverage: 23.99%
  • Delta: +0.00%

📈 Overall Average

  • PR Coverage: 30.58%
  • Master Coverage: 30.62%
  • Delta: -0.03%

@github-actions
Copy link
Copy Markdown
Contributor

Parent Install Page

@github-actions
Copy link
Copy Markdown
Contributor

Teacher Install Page

@github-actions
Copy link
Copy Markdown
Contributor

Student Install Page

Copy link
Copy Markdown
Contributor

@adamNagy56 adamNagy56 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • In the Parent app, if I start a video (for example in the Inbox) and then rotate the screen, the video stops and has to be restarted. However, this is already handled in the Student and Teacher apps, where playback continues after rotation, so it would be great to achieve the same behavior here as well for consistency. (See attached video.)

The other findings are not specially related to this PR so i will create separate tickets for those as we discussed in Slack.

3879.mp4


override fun routeToMediaAttachment(mediaComment: MediaComment) {
fileDownloader.downloadFileToDevice(mediaComment.url, mediaComment.displayName, mediaComment.contentType)
val url = mediaComment.url ?: return
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We skip error handling in this case, since it is handled in the downloadFileToDevice.

/** The current URI being used (may be modified for DASH retry) */
private var currentUri: Uri = uri
/** The current PlayerView, kept so the retry can re-attach after recreating the player */
private var mPlayerView: PlayerView? = null
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not use hungarian notation.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants