Class PhonMediaPlayer

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class PhonMediaPlayer extends JPanel
Media player using vlc4j (including media playback controls.)
See Also:
  • Field Details

  • Constructor Details

    • PhonMediaPlayer

      public PhonMediaPlayer()
      Constructor
    • PhonMediaPlayer

      public PhonMediaPlayer(VolumeModel volumeModel)
  • Method Details

    • cleanup

      public void cleanup()
    • addMediaMenuFilter

      public void addMediaMenuFilter(IMediaMenuFilter filter)
    • removeMediaMenuFilter

      public void removeMediaMenuFilter(IMediaMenuFilter filter)
    • getMediaMenuFilters

      public List<IMediaMenuFilter> getMediaMenuFilters()
    • getMediaControlPanel

      public JPanel getMediaControlPanel()
    • getMediaPlayerCanvas

      public PhonPlayerComponent getMediaPlayerCanvas()
    • getPlayPauseButton

      public JButton getPlayPauseButton()
    • getReplayButton

      public JButton getReplayButton()
    • getPositionSlider

      public TimeSlider getPositionSlider()
    • getVolumeSlider

      public VolumeSlider getVolumeSlider()
    • getMenuButton

      public JButton getMenuButton()
    • getMediaPlayer

      public uk.co.caprica.vlcj.player.base.MediaPlayer getMediaPlayer()
      Return the underlying VLC media player object.
      Returns:
      the current VLC media player - this value can change during playback (e.g., looping)
    • getMediaFile

      public String getMediaFile()
      Return the current media file handled by the player.
      Returns:
      the curent media file path/location
    • setMediaFile

      public void setMediaFile(String mediaFile)
      Sets media location but does not load media
      Parameters:
      mediaFile -
    • loadMedia

      public void loadMedia(String loc)
    • loadMedia

      public void loadMedia()
    • hasVideo

      public boolean hasVideo()
    • hasAudio

      public boolean hasAudio()
    • onPlayPause

      public void onPlayPause(PhonActionEvent<Void> pae)
    • onReplay30

      public void onReplay30(PhonActionEvent<Void> pae)
    • showMediaMenu

      public void showMediaMenu(PhonActionEvent<Void> pae)
    • onReloadMedia

      public void onReloadMedia(PhonActionEvent<Void> pae)
    • onTakeSnapshot

      public void onTakeSnapshot(PhonActionEvent<Void> pae)
    • playSegment

      public void playSegment(long startTime, long length)
      Playback given segment
      Parameters:
      startTime - in ms
      length - in ms
    • playSegment

      public void playSegment(long startTime, long length, boolean videoOnly)
    • getLength

      public long getLength()
    • getPosition

      public float getPosition()
    • getRate

      public float getRate()
    • getTime

      public long getTime()
    • getVolume

      public int getVolume()
    • isMuted

      public boolean isMuted()
    • isPlaying

      public boolean isPlaying()
    • pause

      public void pause()
    • play

      public void play()
    • willPlay

      public boolean willPlay()
    • setPosition

      public void setPosition(float arg0)
    • setRate

      public boolean setRate(float arg0)
    • setVolume

      public int setVolume(int volume)
    • setTime

      public void setTime(long arg0)
    • stop

      public void stop()
    • addMediaPlayerListener

      public void addMediaPlayerListener(uk.co.caprica.vlcj.player.base.MediaPlayerEventListener listener)
    • removeMediaPlayerListener

      public void removeMediaPlayerListener(uk.co.caprica.vlcj.player.base.MediaPlayerEventListener listener)