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

Auto-stop pieces when starting another piece. Code inside. #1

Open
diovudau opened this issue Apr 23, 2020 · 0 comments
Open

Auto-stop pieces when starting another piece. Code inside. #1

diovudau opened this issue Apr 23, 2020 · 0 comments

Comments

@diovudau
Copy link

<!-- Let only one file play at the same time. If a user has no java script they have to stop it themselves -->
<script>
window.addEventListener("play", function(evt)
{
    if(window.$_currentlyPlaying && window.$_currentlyPlaying != evt.target)
    {
        window.$_currentlyPlaying.pause();
    }
    window.$_currentlyPlaying = evt.target;
}, true);
</script>
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

1 participant