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

feature request #4

Open
hooperman67 opened this issue Jul 14, 2024 · 2 comments
Open

feature request #4

hooperman67 opened this issue Jul 14, 2024 · 2 comments

Comments

@hooperman67
Copy link

loving your work... I think it would be great if you could close the podcast when finished listening or moving to another page.

@avadhesh18
Copy link
Owner

People prefer podcasts playing in the background so I won't change the default. However if you want to implement this in your forked repo just add this code to base.html

<script>
document.addEventListener('visibilitychange', function() {
    if (document.hidden) {
        let audios = document.querySelectorAll('audio');
        audios.forEach(function(audio) {
            audio.pause();
        });
    }
});
</script>

@hooperman67
Copy link
Author

Thanks much appreciated

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

2 participants