Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Cloud Video
    • Overview
    • Control
      • Overview
        • Getting started
          • Environment
          • PictureInPictureController
          • VideoSurface
          • YaPlayer
    • Browser autoplay policy
  • Access management
  • Pricing policy
  • Audit Trails events
  • Release notes

In this article:

  • Contents
  • PictureInPictureEvent
  • Discussion
  • Cases
  • PictureInPictureController
  • Discussion
  • Inheritance
  • Properties
  • Methods
  • Examples
  1. Video Player
  2. SDK
  3. iOS
  4. CloudVideoPlayer
  5. PictureInPictureController

PictureInPictureController

Written by
Yandex Cloud
Updated at May 28, 2026
  • Contents
  • PictureInPictureEvent
    • Discussion
    • Cases
  • PictureInPictureController
    • Discussion
    • Inheritance
    • Properties
    • Methods
    • Examples

ContentsContents

  • PictureInPictureEvent
  • PictureInPictureController

PictureInPictureEventPictureInPictureEvent

public enum PictureInPictureEvent

Picture-in-Picture (PiP) mode event.

DiscussionDiscussion

Published via PictureInPictureController/pipStatusEventsDispenser.

CasesCases

Case Description
willStart PiP mode is starting.
didStart PiP mode successfully started.
willStop PiP mode begins to stop.
didStop PiP mode stopped.
failed Error starting PiP mode.

PictureInPictureControllerPictureInPictureController

public protocol PictureInPictureController: AnyObject

Picture-in-Picture mode controller.

DiscussionDiscussion

You can get an instance via VideoSurface/getPipController().

InheritanceInheritance

  • AnyObject

PropertiesProperties

Name Type Description
isPictureInPicturePossible Bool true if PiP mode is available and can be started at the moment.
isPictureInPictureActive Bool true if PiP mode is active.
isPictureInPictureSuspended Bool true if PiP mode is suspended by the system.
canStartPictureInPictureAutomatically Bool Controls automatic start of PiP mode when the app is minimized.
pipStatusEventsDispenser AnyPublisher<PictureInPictureEvent, Never> PiP mode event flow.

MethodsMethods

func start()

Starts PiP mode.


func stop()

Stops PiP mode.

ExamplesExamples

guard let pip = videoSurface.getPipController() else { return }
pip.canStartPictureInPictureAutomatically = true

pip.pipStatusEventsDispenser
  .sink { event in
    switch event {
      case .didStart: print("PiP started")
      case .didStop:  print("PiP stopped")
      case .failed(let error): print("PiP error: \(error)")
      default: break
    }
  }
  .store(in: &cancellables)

Was the article helpful?

Previous
Environment
Next
VideoSurface
© 2026 Direct Cursus Technology L.L.C.