Created
June 12, 2015 00:48
-
-
Save malcolmp/f4a41877e0d0ab0ad683 to your computer and use it in GitHub Desktop.
Example code for Bolero SoundManager events
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require(["Soundmanager.360.events"], function(events){ | |
| function play(three60Player){ | |
| var $link = $(three60Player._360data.oLink), | |
| $node = $link.closest("article.node"); | |
| $node.addClass("active"); | |
| } | |
| function pause(three60Player){ | |
| var $link = $(three60Player._360data.oLink), | |
| $node = $link.closest("article.node"); | |
| $node.removeClass("active"); | |
| } | |
| events.on("Soundmanager.360.play", play); | |
| events.on("Soundmanager.360.resume", play); | |
| events.on("Soundmanager.360.pause", pause); | |
| events.on("Soundmanager.360.stop", pause); | |
| events.on("Soundmanager.360.finish", pause); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment