Package com.pspdfkit.media
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.
-
-
Constructor Summary
Constructors Constructor Description MediaWebView(Context context)
MediaWebView(Context context, AttributeSet attrs)
MediaWebView(Context context, AttributeSet attrs, int defStyleAttr)
-
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. -
-
Constructor Detail
-
MediaWebView
MediaWebView(Context context)
-
MediaWebView
MediaWebView(Context context, AttributeSet attrs)
-
MediaWebView
MediaWebView(Context context, AttributeSet attrs, int defStyleAttr)
-
-
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, ornull
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.
-
-
-
-