ReVanced / revanced-patches

🧩 Patches for ReVanced
https://revanced.app
GNU General Public License v3.0
1.97k stars 231 forks source link

bug(YouTube - SponsorBlock): When Bluetooth headphones are connected, skipped SponsorBlock segments at the end of videos don't go to the next video in a playlist #3015

Open bigyihsuan opened 2 months ago

bigyihsuan commented 2 months ago

Bug description

When my phone is connected to Bluetooth headphones, or a Bluetooth speaker, when SponsorBlock skips segments that go up to the end of a video, when that video is in a playlist (e.g. Watch Later), playback fails to go to the next video and gets stuck on the end of the current video.

To reproduce:

  1. Patch the YouTube version mentioned above with patches listed below.
  2. Find a video that has a skippable SponsorBlock segment at the end of the video, like the linked video above.
  3. Place the segmented video from above into a playlist before any video.
  4. Connect any Bluetooth speaker, headset, headphones, or ear buds, and select it for audio output.
  5. Play the segmented video, and let SponsorBlock skip the segment at the end of the video.
  6. Expected: The next video should play.
  7. Actual: Playback stops at the end of the segmented video, until the user performs a manual action (taps the "Next video" button, double-taps forward 10 seconds to move to the next video, or manually selecting the next video).

Error logs

No response

Solution

You can simply not use a Bluetooth speaker/headphones, but it is merely a workaround and not a solution.

Additional context

Patches:

Revanced Settings:

"announcement_last_id": 9,
"disable_precise_seeking_gesture": false,
"disable_zoom_haptics": false,
"hdr_auto_brightness": false,
"hide_crowdfunding_box": true,
"hide_gray_separator": false,
"hide_info_cards": false,
"hide_info_cards_section": false,
"hide_shorts_home": true,
"hide_shorts_search": true,
"hide_shorts_subscriptions": true,
"hide_timed_reactions": false,
"seekbar_custom_color": true,
"spoof_signature_in_feed_enabled": true,
"video_quality_default_wifi": 1080,
"sb_filler": "skip",
"sb_highlight": "seekbar-only",
"sb_interaction": "skip",
"sb_intro": "skip",
"sb_local_time_saved_milliseconds": 18932700,
"sb_local_time_saved_number_segments": 765,
"sb_outro": "skip",
"sb_preview": "skip",
"sb_selfpromo": "skip",
"sb_sponsor": "skip"

SponsorBlock Settings:

{
  "isVip": false,
  "serverAddress": "https:\/\/sponsor.ajay.app",
  "dontShowNotice": false,
  "showTimeWithSkips": true,
  "minDuration": 0,
  "trackViewCount": true,
  "skipCount": 765,
  "minutesSaved": 315.5450134277344,
  "categorySelections": [
    {
      "name": "sponsor",
      "option": 2
    },
    {
      "name": "selfpromo",
      "option": 2
    },
    {
      "name": "interaction",
      "option": 2
    },
    {
      "name": "poi_highlight",
      "option": 0
    },
    {
      "name": "intro",
      "option": 2
    },
    {
      "name": "outro",
      "option": 2
    },
    {
      "name": "preview",
      "option": 2
    },
    {
      "name": "filler",
      "option": 2
    },
    {
      "name": "music_offtopic",
      "option": 1
    }
  ],
  "barTypes": {
    "sponsor": {
      "color": "#00D400"
    },
    "selfpromo": {
      "color": "#FFFF00"
    },
    "interaction": {
      "color": "#CC00FF"
    },
    "poi_highlight": {
      "color": "#FF1684"
    },
    "intro": {
      "color": "#00FFFF"
    },
    "outro": {
      "color": "#0202ED"
    },
    "preview": {
      "color": "#008FD6"
    },
    "filler": {
      "color": "#7300FF"
    },
    "music_offtopic": {
      "color": "#FF9900"
    }
  }
}

Previously reported and closed at #2751, with a similar issue at inotia00/ReVanced_Extended#1805, inotia00/ReVanced_Extended#1714, inotia00/ReVanced_Extended#1745, and inotia00/ReVanced_Extended#1777.

Acknowledgements

LisoUseInAIKyrios commented 2 months ago

I don't have any Bluetooth speaker devices to reproduce.

But this might be fixed by increasing an end of video skip offset from 250ms to a larger value, as described here.

Someone that can reproduce the issue and can build and install locally, would need to try making this change.

bigyihsuan commented 6 days ago

Some updates later, can confirm this still happens with the following: