Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No sound on downloaded videos #3218

Open
corgiblu opened this issue Jul 14, 2020 · 14 comments
Open

No sound on downloaded videos #3218

corgiblu opened this issue Jul 14, 2020 · 14 comments

Comments

@corgiblu
Copy link

Slide version: 6.5
Android version: 8.0.0

Videos that have sound in app are not downloading with sound. I've tried multiple videos, none are downloading with sound. I think I had this issue when I first started using slide, but I don't remember how I fixed it.

@timawesomeness
Copy link
Contributor

Are these v.redd.it videos, or other videos?

@corgiblu
Copy link
Author

corgiblu commented Jul 15, 2020 via email

@jdLex
Copy link

jdLex commented Jul 17, 2020

Example: https://redd.it/hsmbt8 but I'd swear I've had a couple v.redd.it videos work very recently.

@timawesomeness
Copy link
Contributor

I'll look into it further, thanks for the bug report

@jdLex
Copy link

jdLex commented Jul 17, 2020

Here's one that works https://redd.it/cp4xsa

I don't download, for me it's no sound in app and I end up opening externally. But this clip works, while my previous one does not.

@corgiblu
Copy link
Author

corgiblu commented Jul 17, 2020 via email

@Colt-H
Copy link

Colt-H commented Jul 19, 2020

I'm also having an issue with no sound from v.redd.it videos in app.

Slide v6.4
Android 10

@Colt-H
Copy link

Colt-H commented Jul 19, 2020

I'm not a programmer, but I decided to look anyway and found this in ExoVideoView.java. Sure enough, on any videos that don't have audio for me, I don't have a mute button. I'm guessing it has to do with where it loops to check if any tracks contain audio. Is it possible the source has changed?

public void attachMuteButton(final ImageView mute) {
        // Hide the mute button by default
        mute.setVisibility(GONE);
        player.addListener(new Player.EventListener() {
            @Override
            
public void onTracksChanged(TrackGroupArray trackGroups, TrackSelectionArray trackSelections) {
                // We only need to run this on the first track change, i.e. when the video is loaded
                // Skip this if mute has already been configured, otherwise mark it as configured
                if (muteAttached && trackGroups.length > 0) {
                    return;
                } else {
                    muteAttached = true;
                }
                // Loop through the tracks and check if any contain audio, if so set up the mute button
                for (int i = 0; i < trackSelections.length; i++) {
                    if (trackSelections.get(i) != null && trackSelections.get(i).getSelectedFormat() != null
                            && MimeTypes.isAudio(trackSelections.get(i).getSelectedFormat().sampleMimeType)) {

                        mute.setVisibility(VISIBLE);
                        // Set initial mute state
                        if (!SettingValues.isMuted) {
                            player.setVolume(1f);
                            mute.setColorFilter(Color.WHITE, PorterDuff.Mode.SRC_ATOP);
                            audioFocusHelper.gainFocus();
                        } else {
                            player.setVolume(0f);
                            mute.setColorFilter(getResources().getColor(R.color.md_red_500), PorterDuff.Mode.SRC_ATOP);
                        }

                        mute.setOnClickListener((v) -> {
                            if (SettingValues.isMuted) {
                                player.setVolume(1f);
                                SettingValues.isMuted = false;
                                SettingValues.prefs.edit().putBoolean(SettingValues.PREF_MUTE, false).apply();
                                mute.setColorFilter(Color.WHITE, PorterDuff.Mode.SRC_ATOP);
                                audioFocusHelper.gainFocus();
                            } else {
                                player.setVolume(0f);
                                SettingValues.isMuted = true;
                                SettingValues.prefs.edit().putBoolean(SettingValues.PREF_MUTE, true).apply();
                                mute.setColorFilter(getResources().getColor(R.color.md_red_500), PorterDuff.Mode.SRC_ATOP);
                                audioFocusHelper.loseFocus();
                            }
                        });
                        return;
                    }
                }
            }
        });
    }

@timawesomeness
Copy link
Contributor

@coltman151 your issue is fixed in v6.5. This issue refers only to downloading videos.

@Colt-H
Copy link

Colt-H commented Jul 19, 2020

@coltman151 your issue is fixed in v6.5. This issue refers only to downloading videos.

My apologies.

@jdLex
Copy link

jdLex commented Jul 23, 2020

Oh my word I'm an idiot. I'm on 6.4 - I didn't realize Slide was on the Play store officially and I was keeping it up to date in F-Droid which appears to be one version back. Thought I had the latest. Sorry for any confusion or work I caused :-(

@motorto
Copy link

motorto commented Jul 30, 2020

Can confirm , that I have this issue using v6.5 on android 10.0.

@evan3334
Copy link

I can also confirm this issue, I'm using Slide 6.5 on Android 8.0.0 as well. Videos have sound in the in-app player, but have no sound when downloaded. It only seems to have recently started happening too.

@T5000
Copy link

T5000 commented Sep 25, 2020

Can confirm same issue, no sound on downloaded videos (v.reddit). When opening in-app sond works fine. Slide 6.5 from playstore, Android 10 (LOS17.1).

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

No branches or pull requests

7 participants