Class

SKVideoNode

A graphical element that plays video content.

Declaration

@interface SKVideoNode : SKNode

Overview

This class renders a video at a given size and location in your scene with no exposed player controls.

Topics

Getting Started with Video

Adding a Video to a Scene

Play video in your scene by adding a video node.

Creating a Video Node

+ videoNodeWithFileNamed:

Creates and initializes a new video node using a video file stored in the app bundle.

+ videoNodeWithAVPlayer:

Creates and initializes a video node using an existing video player object.

+ videoNodeWithURL:

Creates and initializes a video node using a URL that points to a video file.

- initWithAVPlayer:

Initializes a video node using an existing AVPlayer object.

- initWithFileNamed:

Initializes a video node using a video file stored in the app bundle.

- initWithURL:

Initializes a video node using a URL.

- initWithCoder:

Tells you when to initialize a video node that was created from an archive.

- initWithVideoFileNamed:

Initializes a video node using a video file stored in the app bundle.

Deprecated
- initWithVideoURL:

Initializes a video node using a URL that points to a video file.

Deprecated

Setting the Video Node’s Visual Properties

anchorPoint

The point in the sprite that corresponds to the node’s position.

size

The dimensions of the video node, in points.

Controlling Video Playback

- play

Starts video playback.

- pause

Pauses video playback.

Type Methods

+ videoNodeWithVideoFileNamed:

Creates and initializes a new video node using a video file stored in the app bundle.

Deprecated
+ videoNodeWithVideoURL:

Creates and initializes a video node using a URL that points to a video file.

Deprecated

Relationships

Inherits From

See Also

Nodes that Draw

Maximizing Node Drawing Performance

Structure your nodes for maximum performance.

SKSpriteNode

An image or solid color.

SKShapeNode

A mathematical shape that can be stroked or filled.

SKEmitterNode

A source of various particle effects.

SKLabelNode

A graphical element that draws text.

SKTileMapNode

A two-dimensional array of images.

SK3DNode

3D SceneKit content drawn as a flattened sprite.