Class MediaGalleryView

  • All Implemented Interfaces:
    android.graphics.drawable.Drawable.Callback , android.view.KeyEvent.Callback , android.view.ViewManager , android.view.ViewParent , android.view.accessibility.AccessibilityEventSource , com.pspdfkit.media.MediaViewController

    
    public class MediaGalleryView
    extends ViewPager implements MediaViewController
                        

    A view for displaying a gallery within the PDF document.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void start(@NonNull() String optionsJson, @NonNull() String url) Start media playback.
      void close() Close currently played media file.
      void setMediaViewListener(@Nullable() MediaViewListener listener) Sets a listener for media content preparation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MediaGalleryView

        MediaGalleryView(Context context)
    • Method Detail

      • start

         void start(@NonNull() String optionsJson, @NonNull() String url)

        Start media playback.

        Parameters:
        optionsJson - Media options in JSOn format (used for playing videos)
        url - Url to the media file.
      • close

         void close()

        Close currently played media file.

      • setMediaViewListener

         void setMediaViewListener(@Nullable() MediaViewListener listener)

        Sets a listener for media content preparation. Calling this method will replace any previously set listener. You may provide null to clear the listener.

        Parameters:
        listener - MediaViewListener that should be notified, or null to clear the listener.