| package org.eclipse.osbp.utils.vaadin.beeper; |
| |
| import org.eclipse.osbp.ui.api.statemachine.IBeeper; |
| |
| import com.vaadin.annotations.JavaScript; |
| import com.vaadin.ui.AbstractJavaScriptComponent; |
| |
| @JavaScript("js/BeeperConnector.js") |
| public class Beeper extends AbstractJavaScriptComponent implements IBeeper { |
| |
| private static final long serialVersionUID = 5930949036795746638L; |
| |
| @Override |
| public void beep(Integer duration, Integer frequency) { |
| // callFunction("playSound", "https://s3-us-west-2.amazonaws.com/s.cdpn.io/355309/G4.mp3"); |
| // callFunction("playSound", "theme://icon/applause-4.mp3"); |
| // callFunction("playSound", "https://s3-us-west-2.amazonaws.com/s.cdpn.io/355309/Eb4.mp3"); |
| // callFunction("playSound", "https://s3-us-west-2.amazonaws.com/s.cdpn.io/355309/G4.mp3"); |
| callFunction("beepSound", duration, frequency); |
| } |
| |
| @Override |
| public void playSound(String url) { |
| callFunction("playSound", url); |
| } |
| } |