FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

Playback crashes when bluetooth is turned off

Open Tiltowait2 opened this issue 5 years ago • 9 comments

Behavior of the program I often connect an external speaker to bluetooth to do things like listen to podcasts while doing dishes, in the shower, etc. When I come back to my computer I'm often not finished and want to watch the conclusion on my laptop speakers, as the bluetooth is too loud or I've left it in the kitchen, etc. When I turn bluetooth off in Windows, the video stops playing and throws a "The media playback was aborted due to a corruption problem or because the media used features your browser did not support." error.

Expected behavior I expect the audio to switch seamlessly to the laptop's internal speaker, as happens when I watch Youtube videos on youtube.com.

To Reproduce

  1. Connect an external speaker to bluetooth.
  2. Start a video playing.
  3. Turn off bluetooth in Windows settings.

Link to video All

Screenshots N/A

Environment Information (please complete the following information):

  • OS: Windows
  • OS Version: 8.1
  • FreeTube version: v0.13.2 Beta
  • Installation Method (If applicable): exe
  • Primary API Used: Local API

Tiltowait2 avatar Jul 18 '21 16:07 Tiltowait2

I have no idea about this topic. If someone with some experience could chip in to clarify how this could be related, I'd be very happy

Because in my mind these two things should not be connected directly, as the Bluetooth connection comes from the OS and not from our app

GilgusMaximus avatar Jul 23 '21 16:07 GilgusMaximus

No other software on my machine crashes when bluetooth is turned off. It's only FreeTube.

Tiltowait2 avatar Jul 25 '21 07:07 Tiltowait2

Okay, this could be a problem with Electron itself. Could you try some electron based software, e.g. another music player? You can find a list of software over at electron: https://www.electronjs.org/apps

GilgusMaximus avatar Jul 26 '21 18:07 GilgusMaximus

Going to chime in and say I'm facing a similar issue with bluetooth headphones, I'm using Museeks, which is electron based, and it's never had issues. I don't think it's electron; I think it's the video player in FreeTube.

If I disconnect the headphones after I pause a video, trying to resume the video doesn't work. FreeTube's video player expects there to always be an audio device, when there are none the video refuses to play another frame until the video is paused, the headphones reconnected, and then the video is resumed. Sometimes attempting to resume the video after reconnecting the audio device causes the video to fail like the person above saw, however, I've not had this personally happen for a while.

What I think's happening to Tiltowait2 is that FreeTube's video player doesn't seek out new audio devices when the current one is disconnected, even if another audio device was present the entire time, it just keeps wanting the original device until it comes back or FreeTube is refreshed with the laptop's audio device being used instead.

I'm using Arch Linux (Pipewire) and they're using Windows, so I don't think the audio backend for our OS's are causing this, hence why I think the video player is at fault here.

Winterhuman avatar Aug 04 '21 19:08 Winterhuman

Okay thanks for the info. So we basically have to look for a solution. Could be possible that VideoJS itself provides a possibility, if it is the player.

GilgusMaximus avatar Aug 05 '21 18:08 GilgusMaximus

Correction,

In Museeks, disconnecting bluetooth headphones while a song was paused causes Museeks to not send any audio to the headphones when unpaused, electron could still be the cause or it's just that Museek and FreeTube treat audio devices similarly. My previous attempts involved removing and adding the headphones before a song was played hence why this issue never occured before.

Missing audio devices causing the video to crash is still likely an issue with FreeTube's video player though.

Winterhuman avatar Aug 09 '21 21:08 Winterhuman

This still happens in v0.16.0 Beta. :(

Tiltowait2 avatar Feb 18 '22 17:02 Tiltowait2

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Nov 08 '22 02:11 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Nov 22 '22 02:11 github-actions[bot]