Adaptive Media Player

AmpVirtualReality Docs

AmpVRManager

open class AmpVRManager : NSObject

Class in charge in managing the views and scenes of our Virtual Reality module.

  • The main scene for 360 videos.

    Declaration

    Swift

    open fileprivate(set) var leftSceneView: SCNView
  • An additional scene that will be shown if VR is enabled

    Declaration

    Swift

    open fileprivate(set) var rightSceneView: SCNView
  • An AmpPlayer linked to a VR Manager

    Declaration

    Swift

    open fileprivate(set) var ampPlayer: AmpPlayer?
  • The view where the video is shown, the scenes will be added here.

    Declaration

    Swift

    open fileprivate(set) var videoView: UIView
  • Whether stereoscopic should be enabled by default. Default: false

    Declaration

    Swift

    open fileprivate(set) var stereoscopicViewEnabled: Bool
  • Returns whether VR is enabled or not

    Declaration

    Swift

    open var isVREnabled: Bool
  • Initializes a new AmpIMAManager with the parameters provided.

    Declaration

    Swift

    public init (ampPlayer: AmpPlayer, videoView: UIView, enableVR: Bool = false, enableStereoscopicView: Bool = false)

    Parameters

    ampPlayer

    The amp player associated with a specific VR Manager.

    videoView

    The view used by the player, the scenes will be displayed here.

    enableVR

    Whether an additional screen should be created for VR devices. Default: false

    enableStereoscopicView

    Whether stereoscopic should be enabled by default. Default: false

    Return Value

    A configured instance of an AmpVRManager.

  • Enables Virtual Reality by showing an additional scene

    Declaration

    Swift

    open func enableVR()
  • Disables Virtual Reality by hiding the additional scene

    Declaration

    Swift

    open func disableVR()