OTVContainerView
public class OTVContainerView : UIView
A container view that creates an AVPlayerLayer
and subtitle view,
managing the interactions with OTVAVPlayer
for easy integration.
Optionally custom overlays can be added on top of the video/subtitle content
through the ‘customOverlayView’ property. These views will sit below any optionally
bound OTVWatermark
.
Any subviews added in storyboard or interface builder will be automatically moved onto the customOverlayView. Note that this process recreates any auto layout constraints so any constraints connected to an IBOutlet will be lost.
-
A
UIView
onto which custom overlays can be added such that they will appear above the video content and subtitles but below the optionalOTVWatermark
, which can be added viabindWatermark
.Declaration
Swift
public let customOverlayView: UIView
-
The
AVPlayerLayer
instance used for rendering video content.Declaration
Swift
public let playerLayer: AVPlayerLayer
-
The
OTVAVPlayer
that will be playing video content that should be rendered into thisOTVContainerView
.Declaration
Swift
public weak var player: OTVAVPlayer? { get set }
-
This function has no effect. Instead you should add your views to the customOverlayView property
Declaration
Swift
override public func addSubview(_ view: UIView)
-
This function has no effect. Instead you should add your views to the customOverlayView property
Declaration
Swift
override public func insertSubview(_ view: UIView, at index: Int)
-
This function has no effect. Instead you should add your views to the customOverlayView property
Declaration
Swift
override public func insertSubview(_ view: UIView, aboveSubview siblingSubview: UIView)
-
This function has no effect. Instead you should add your views to the customOverlayView property
Declaration
Swift
override public func insertSubview(_ view: UIView, belowSubview siblingSubview: UIView)
-
This function has no effect. Reordering of views is not permitted, you may want to make use of the customOverlayView property
Declaration
Swift
override public func bringSubviewToFront(_ view: UIView)
-
This function has no effect. Reordering of views is not permitted, you may want to make use of the customOverlayView property
Declaration
Swift
override public func sendSubviewToBack(_ view: UIView)
-
This function has no effect. Reordering of views is not permitted, you may want to make use of the customOverlayView property
Declaration
Swift
override public func exchangeSubview(at index1: Int, withSubviewAt index2: Int)
-
Binds the
OTVWatermark
on top of the other views in the containerDeclaration
Swift
public func bindWatermark(_ watermark: OTVWatermark)
-
Binds the
OTVWatermark
on top of the other views in the containerDeclaration
Swift
public func bindWatermark(bindClosure: @escaping (_ playerView: UIView, _ playerLayer: AVPlayerLayer) -> Void)
-
Unbinds a previously bound `OTVWatermark’, removing it from the view stack.
Declaration
Swift
public func unbindWatermark()
-
Unbinds a previously bound `OTVWatermark’, removing it from the view stack.
Declaration
Swift
public func unbindWatermark(unbindClosure: @escaping () -> Void)