Class MediaWebView

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

    
    public class MediaWebView
    extends WebView implements MediaViewController
                        

    A web view for displaying web content.

    • 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 setMediaViewListener(@Nullable() MediaViewListener listener) Sets a listener for media content preparation.
      void start(@NonNull() String optionsJson, @NonNull() String url) Start media playback.
      void close() Close currently played media file.
      • Methods inherited from class java.lang.Object

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

      • 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.
      • 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.