Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function()
- {
- $('.bgm').mediaelementplayer
- ({
- startVolume: 0.8,
- loop: false,
- features: ['playpause','volume'],
- alwaysShowControls: true
- });
- $('.bgm').each(function()
- {
- var myBGM = this;
- this.addEventListener('play', function()
- {
- $('.bgm').each(function()
- {
- if (!(this === myBGM))
- {
- this.stop();
- }
- });
- });
- });
- $('.bgs').mediaelementplayer
- ({
- startVolume: 0.8,
- loop: true,
- features: ['playpause','volume'],
- alwaysShowControls: true
- });
- $('.bgs').each(function()
- {
- var myBGS = this;
- this.addEventListener('play', function()
- {
- $('.bgs').each(function()
- {
- if (!(this === myBGS))
- {
- this.stop();
- }
- });
- });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement