Package com.pspdfkit.media
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.
-
-
Constructor Summary
Constructors Constructor Description MediaGalleryView(Context context)
MediaGalleryView(Context context, AttributeSet attrs)
-
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. -
-
Constructor Detail
-
MediaGalleryView
MediaGalleryView(Context context)
-
MediaGalleryView
MediaGalleryView(Context context, AttributeSet attrs)
-
-
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, ornull
to clear the listener.
-
-
-
-