<!--
{
  "documentType" : "article",
  "framework" : "SpriteKit",
  "identifier" : "/documentation/SpriteKit/adding-a-video-to-a-scene",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "Adding a Video to a Scene"
}
-->

# Adding a Video to a Scene

Play video in your scene by adding a video node.

## Discussion

A video node renders a video at a given size and location in your scene with no exposed player controls. You might use a video node to animate visual behaviors that would be expensive to define using a collection of textures.

Be aware that a video node offers only a subset of the features available to the [`SKSpriteNode`](/documentation/SpriteKit/SKSpriteNode) class. The following are a video node’s relevant limitations:

- A video node is always scaled proportionally.
- A video node cannot be colorized. However, it can be added as a child of a [`SKEffectNode`](/documentation/SpriteKit/SKEffectNode) to add Core Image filters for color treatments and other effects.
- A video node always uses an alpha blend mode.
- A video node cannot use custom shaders or lighting.

When a video node is created, its [`size`](/documentation/SpriteKit/SKVideoNode/size) property is initialized to the base size of the video content, but you can change it. The video content is automatically stretched to the new size. As with a sprite node, the [`anchorPoint`](/documentation/SpriteKit/SKVideoNode/anchorPoint) property defines where the content is displayed relative to the node position.

The following code initializes the video node using a video file stored in the app bundle and then adds the node to the scene. It calls the node’s [`play()`](/documentation/SpriteKit/SKVideoNode/play()) method to start the video playback.

```swift
let sample = SKVideoNode(fileNamed: "sample.mov")
sample.position = CGPoint(x: frame.midX,
                          y: frame.midY)
addChild(sample)
sample.play()
```

You control playback using the node’s [`play()`](/documentation/SpriteKit/SKVideoNode/play()) and [`pause()`](/documentation/SpriteKit/SKVideoNode/pause()) methods.

If you need more precise control over the video playback behavior, you can use AVFoundation to create an <doc://com.apple.documentation/documentation/AVFoundation/AVPlayer> object for your video content and then use this object to initialize the [`SKVideoNode`](/documentation/SpriteKit/SKVideoNode) node. Then, instead of using the node’s playback methods, you use the <doc://com.apple.documentation/documentation/AVFoundation/AVPlayer> object to control playback. The video content is automatically displayed in the video node. For more information, see [AVFoundation Programming Guide](https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/00_Introduction.html#//apple_ref/doc/uid/TP40010188).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)