Class ClipPlayerHelper


  • public class ClipPlayerHelper
    extends HelperBase
    Helper for the ClipPlayer in the audio.js module. See the module for documentation. Note that this class requires a graphical display because instantiating a JFXPanel attempts to connect to the display.
    Since:
    Ptolemy II 11.0
    Version:
    $Id: CliPlayerHelper.java 75850 2017-04-03 21:53:00Z cxh $
    Author:
    Elizabeth Osyk
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Yellow (eal)
    • Constructor Detail

      • ClipPlayerHelper

        public ClipPlayerHelper​(java.lang.Object actor,
                                jdk.nashorn.api.scripting.ScriptObjectMirror helping)
        Construct a new ClipPlayerHelper.
        Parameters:
        actor - The actor associated with this ClipPlayerHelper.
        helping - The Javascript object being helped.
    • Method Detail

      • play

        public void play()
        Play the sound clip.
      • setURL

        public void setURL​(java.lang.String url)
        Set the URL of the clip to load and construct a new MediaPlayer to it.
        Parameters:
        url - The URL of the clip to load.
      • stop

        public void stop()
        Stop playback, if playing.