-
- All Implemented Interfaces:
-
com.brightcove.player.event.Component
@Emits(events = {})@ListensFor(events = {EventType.AD_BREAK_STARTED, EventType.AD_BREAK_COMPLETED, EventType.WILL_RESUME_CONTENT, EventType.REGISTER_PLUGIN}) public class ZoomController extends AbstractComponent
-
-
Field Summary
Fields Modifier and Type Field Description private ScaleGestureDetector
scaleGestureDetector
private boolean
isVideoZoomed
-
Constructor Summary
Constructors Constructor Description ZoomController(BaseVideoView baseVideoView, FullScreenController fullScreenController)
-
Method Summary
Modifier and Type Method Description ScaleGestureDetector
getScaleGestureDetector()
Gets the ScaleGestureDetector used for pinch gestures. boolean
isVideoZoomed()
Checks if the video is currently zoomed in. void
setIsVideoZoomed(boolean isVideoZoomed)
Sets the video zoomed status. void
enablePinchGesturesToZoom()
Enables pinch gestures for zooming in and out.This method sets pinch gestures to be enabled and creates a ScaleGestureDetector. void
disablePinchGesturesToZoom()
Disables pinch gestures for zooming.If pinch gestures are enabled, this method zooms out the video (if zoomed),disables pinch gestures, and sets the ScaleGestureDetector to null. boolean
arePinchGesturesEnabled()
Checks if pinch gestures for zooming are currently enabled. void
zoomIn()
Zooms in the video if the render view is not null and the application is not in fullscreen portrait mode.Sets the video as zoomed in. void
zoomOut()
Zooms out the video if the render view is not null and the application is not in fullscreen portrait mode.Sets the video as not zoomed. -
-
Constructor Detail
-
ZoomController
ZoomController(BaseVideoView baseVideoView, FullScreenController fullScreenController)
-
-
Method Detail
-
getScaleGestureDetector
ScaleGestureDetector getScaleGestureDetector()
Gets the ScaleGestureDetector used for pinch gestures.
-
isVideoZoomed
boolean isVideoZoomed()
Checks if the video is currently zoomed in.
-
setIsVideoZoomed
void setIsVideoZoomed(boolean isVideoZoomed)
Sets the video zoomed status.
- Parameters:
isVideoZoomed
- true if the video is zoomed, false otherwise.
-
enablePinchGesturesToZoom
void enablePinchGesturesToZoom()
Enables pinch gestures for zooming in and out.This method sets pinch gestures to be enabled and creates a ScaleGestureDetector.
-
disablePinchGesturesToZoom
void disablePinchGesturesToZoom()
Disables pinch gestures for zooming.If pinch gestures are enabled, this method zooms out the video (if zoomed),disables pinch gestures, and sets the ScaleGestureDetector to null.
-
arePinchGesturesEnabled
boolean arePinchGesturesEnabled()
Checks if pinch gestures for zooming are currently enabled.
-
zoomIn
void zoomIn()
Zooms in the video if the render view is not null and the application is not in fullscreen portrait mode.Sets the video as zoomed in.
-
zoomOut
void zoomOut()
Zooms out the video if the render view is not null and the application is not in fullscreen portrait mode.Sets the video as not zoomed.
-
-
-
-