Skip to content

[Refactor] Timestamp links in comments open external browser instead of seeking video #13414

@Ecomont

Description

@Ecomont

Checklist

  • I am able to reproduce the bug with the latest version given here: CLICK THIS LINK.
  • I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • I have read the FAQ and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.
  • I have read and understood the AI policy. The content of this bug report is not generated by AI.

Affected version

refactor branch (Compose UI)

Steps to reproduce the bug

  1. Build and run the app from the refactor branch.
  2. Play any YouTube video that has a timestamp in the comments (e.g., 12:34).
  3. Open the comments section.
  4. Click on the timestamp link inside the comment text.

Expected behavior

The internal video player should immediately seek to that specific time (just like it does in video descriptions on the dev branch using TimestampLongPressClickableSpan).

Actual behavior

The timestamp is treated as a generic web link. Android catches the URL intent and opens the video in the external web browser (or official YouTube app) instead of seeking the internal NewPipe player.

Screenshots/Screen recordings

bugVideo.mp4

Logs

No response

Affected Android/Custom ROM version

Android 16

Affected device model

Android Emulator / All devices

Additional information

Technical context (Why this happens)

I traced this issue in the codebase and found it is a regression from migrating the comments to Jetpack Compose:

  1. In app/src/main/java/org/schabi/newpipe/ui/components/common/DescriptionText.kt (lines 35-44), the text is rendered via AnnotatedString.fromHtml(). There is an existing comment // TODO: Handle links and hashtags, Markdown. acknowledging this gap.
  2. Because it's rendered as a plain HTML URL annotation without a custom LinkAnnotation.Clickable handler to detect TimestampExtractor.TIMESTAMPS_PATTERN, the app never intercepts the click to call the player (like TextLinkifier and TimestampLongPressClickableSpan did in the old UI).
  3. Furthermore, in Comment.kt, the whole Row uses combinedClickable to handle expand/collapse, which may be swallowing inner text taps if not configured carefully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue is related to a bugcommentsAnything to do with comments and comment replies under videos/audiosregressionA bug that didn't exist in prior versions but appeared after a certain changerewriteIssues and PRs related to rewrite

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions