phaser/docs/Phaser.Video.html

5860 lines
102 KiB
HTML
Raw Normal View History

2014-11-15 20:01:46 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
2015-07-22 14:31:30 +00:00
<title>Phaser Class: Video</title>
2014-11-15 20:01:46 +00:00
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/default.css">
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
</head>
<body>
2014-11-25 00:23:44 +00:00
2014-11-15 20:01:46 +00:00
<div class="container-fluid">
<div class="navbar navbar-fixed-top navbar-inverse">
2014-11-25 00:23:44 +00:00
<div style="position: absolute; width: 143px; height: 31px; right: 10px; top: 10px; z-index: 1050"><a href="http://phaser.io"><img src="img/phaser.png" border="0" /></a></div>
2014-11-15 20:01:46 +00:00
<div class="navbar-inner">
2014-11-25 00:23:44 +00:00
<a class="brand" href="index.html">Phaser API</a>
2014-11-15 20:01:46 +00:00
<ul class="nav">
2014-11-25 00:23:44 +00:00
2014-11-15 20:01:46 +00:00
<li class="dropdown">
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
class="caret"></b></a>
<ul class="dropdown-menu ">
<li class="class-depth-0">
<a href="Phaser.html">Phaser</a>
</li>
2015-10-15 11:06:38 +00:00
<li class="class-depth-0">
<a href="Phaser.KeyCode.html">KeyCode</a>
</li>
2014-11-15 20:01:46 +00:00
<li class="class-depth-0">
<a href="PIXI.html">PIXI</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
class="caret"></b></a>
<ul class="dropdown-menu ">
<li class="class-depth-1">
<a href="Phaser.Animation.html">Animation</a>
</li>
<li class="class-depth-1">
<a href="Phaser.AnimationManager.html">AnimationManager</a>
</li>
<li class="class-depth-1">
<a href="Phaser.AnimationParser.html">AnimationParser</a>
</li>
2014-11-25 00:23:44 +00:00
<li class="class-depth-1">
<a href="Phaser.ArraySet.html">ArraySet</a>
</li>
2014-11-15 20:01:46 +00:00
<li class="class-depth-1">
<a href="Phaser.ArrayUtils.html">ArrayUtils</a>
</li>
<li class="class-depth-1">
<a href="Phaser.AudioSprite.html">AudioSprite</a>
</li>
<li class="class-depth-1">
<a href="Phaser.BitmapData.html">BitmapData</a>
</li>
<li class="class-depth-1">
<a href="Phaser.BitmapText.html">BitmapText</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Button.html">Button</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Cache.html">Cache</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Camera.html">Camera</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Canvas.html">Canvas</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Circle.html">Circle</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Color.html">Color</a>
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-2">
<a href="Phaser.Component.Angle.html">Angle</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Animation.html">Animation</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.AutoCull.html">AutoCull</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Bounds.html">Bounds</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.BringToTop.html">BringToTop</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Core.html">Core</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Crop.html">Crop</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Delta.html">Delta</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Destroy.html">Destroy</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.FixedToCamera.html">FixedToCamera</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Health.html">Health</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.InCamera.html">InCamera</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.InputEnabled.html">InputEnabled</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.InWorld.html">InWorld</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.LifeSpan.html">LifeSpan</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.LoadTexture.html">LoadTexture</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Overlap.html">Overlap</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.PhysicsBody.html">PhysicsBody</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Reset.html">Reset</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.ScaleMinMax.html">ScaleMinMax</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Smoothed.html">Smoothed</a>
</li>
2015-07-22 14:31:30 +00:00
<li class="class-depth-1">
<a href="Phaser.Create.html">Create</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Creature.html">Creature</a>
</li>
2014-11-15 20:01:46 +00:00
<li class="class-depth-1">
<a href="Phaser.Device.html">Device</a>
</li>
2015-07-22 14:31:30 +00:00
<li class="class-depth-1">
<a href="Phaser.DeviceButton.html">DeviceButton</a>
</li>
2014-11-15 20:01:46 +00:00
<li class="class-depth-1">
<a href="Phaser.DOM.html">DOM</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Easing.html">Easing</a>
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-2">
<a href="Phaser.Easing.Back.html">Back</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Bounce.html">Bounce</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Circular.html">Circular</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Cubic.html">Cubic</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Elastic.html">Elastic</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Exponential.html">Exponential</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Linear.html">Linear</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Quartic.html">Quartic</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Quintic.html">Quintic</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
</li>
2014-11-15 20:01:46 +00:00
<li class="class-depth-1">
<a href="Phaser.Ellipse.html">Ellipse</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Events.html">Events</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Filter.html">Filter</a>
</li>
<li class="class-depth-1">
<a href="Phaser.FlexGrid.html">FlexGrid</a>
</li>
<li class="class-depth-1">
<a href="Phaser.FlexLayer.html">FlexLayer</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Frame.html">Frame</a>
</li>
<li class="class-depth-1">
<a href="Phaser.FrameData.html">FrameData</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Game.html">Game</a>
</li>
<li class="class-depth-1">
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
</li>
<li class="class-depth-1">
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Graphics.html">Graphics</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Group.html">Group</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Image.html">Image</a>
</li>
2015-07-22 14:31:30 +00:00
<li class="class-depth-1">
<a href="Phaser.ImageCollection.html">ImageCollection</a>
</li>
2014-11-15 20:01:46 +00:00
<li class="class-depth-1">
<a href="Phaser.Input.html">Input</a>
</li>
<li class="class-depth-1">
<a href="Phaser.InputHandler.html">InputHandler</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Key.html">Key</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Line.html">Line</a>
</li>
<li class="class-depth-1">
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Loader.html">Loader</a>
</li>
<li class="class-depth-1">
<a href="Phaser.LoaderParser.html">LoaderParser</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Math.html">Math</a>
</li>
2015-07-22 14:31:30 +00:00
<li class="class-depth-1">
<a href="Phaser.Matrix.html">Matrix</a>
</li>
2014-11-15 20:01:46 +00:00
<li class="class-depth-1">
<a href="Phaser.Mouse.html">Mouse</a>
</li>
<li class="class-depth-1">
<a href="Phaser.MSPointer.html">MSPointer</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Net.html">Net</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Particle.html">Particle</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Particles.html">Particles</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Particles.Arcade.html">Arcade</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Physics.html">Physics</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Physics.Arcade.html">Arcade</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-3">
2015-08-24 14:43:45 +00:00
<a href="Phaser.Physics.Arcade.TilemapCollision.html">TilemapCollision</a>
2015-03-23 23:46:30 +00:00
</li>
2014-11-15 20:01:46 +00:00
<li class="class-depth-2">
<a href="Phaser.Physics.Ninja.html">Ninja</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Physics.P2.html">P2</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.Body.html">Body</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.Material.html">Material</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.RotationalSpring.html">RotationalSpring</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Plugin.html">Plugin</a>
</li>
<li class="class-depth-1">
<a href="Phaser.PluginManager.html">PluginManager</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Point.html">Point</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Pointer.html">Pointer</a>
</li>
2015-10-15 11:06:38 +00:00
<li class="class-depth-1">
<a href="Phaser.PointerMode.html">PointerMode</a>
</li>
2014-11-15 20:01:46 +00:00
<li class="class-depth-1">
<a href="Phaser.Polygon.html">Polygon</a>
</li>
<li class="class-depth-1">
<a href="Phaser.QuadTree.html">QuadTree</a>
</li>
<li class="class-depth-1">
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Rectangle.html">Rectangle</a>
</li>
<li class="class-depth-1">
<a href="Phaser.RenderTexture.html">RenderTexture</a>
</li>
<li class="class-depth-1">
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
</li>
<li class="class-depth-1">
<a href="Phaser.RetroFont.html">RetroFont</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Rope.html">Rope</a>
</li>
2015-07-22 14:31:30 +00:00
<li class="class-depth-1">
<a href="Phaser.RoundedRectangle.html">RoundedRectangle</a>
</li>
2014-11-15 20:01:46 +00:00
<li class="class-depth-1">
<a href="Phaser.ScaleManager.html">ScaleManager</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Signal.html">Signal</a>
</li>
<li class="class-depth-1">
<a href="Phaser.SignalBinding.html">SignalBinding</a>
</li>
<li class="class-depth-1">
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Sound.html">Sound</a>
</li>
<li class="class-depth-1">
<a href="Phaser.SoundManager.html">SoundManager</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Sprite.html">Sprite</a>
</li>
<li class="class-depth-1">
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Stage.html">Stage</a>
</li>
<li class="class-depth-1">
<a href="Phaser.State.html">State</a>
</li>
<li class="class-depth-1">
<a href="Phaser.StateManager.html">StateManager</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Text.html">Text</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Tile.html">Tile</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Tilemap.html">Tilemap</a>
</li>
<li class="class-depth-1">
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
</li>
<li class="class-depth-1">
<a href="Phaser.TilemapParser.html">TilemapParser</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Tileset.html">Tileset</a>
</li>
<li class="class-depth-1">
<a href="Phaser.TileSprite.html">TileSprite</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Time.html">Time</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Timer.html">Timer</a>
</li>
<li class="class-depth-1">
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Touch.html">Touch</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Tween.html">Tween</a>
</li>
2014-11-25 00:23:44 +00:00
<li class="class-depth-1">
<a href="Phaser.TweenData.html">TweenData</a>
</li>
2014-11-15 20:01:46 +00:00
<li class="class-depth-1">
<a href="Phaser.TweenManager.html">TweenManager</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Utils.html">Utils</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Utils.Debug.html">Debug</a>
</li>
<li class="class-depth-1">
2015-07-22 14:31:30 +00:00
<a href="Phaser.Video.html">Video</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-07-22 14:31:30 +00:00
<a href="Phaser.World.html">World</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-07-22 14:31:30 +00:00
<a href="PIXI.AbstractFilter.html">AbstractFilter</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-07-22 14:31:30 +00:00
<a href="PIXI.BaseTexture.html">BaseTexture</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
<a href="PIXI.CanvasBuffer.html">CanvasBuffer</a>
</li>
<li class="class-depth-1">
<a href="PIXI.CanvasGraphics.html">CanvasGraphics</a>
</li>
<li class="class-depth-1">
<a href="PIXI.CanvasMaskManager.html">CanvasMaskManager</a>
</li>
2015-08-24 14:43:45 +00:00
<li class="class-depth-1">
<a href="PIXI.CanvasPool.html">CanvasPool</a>
</li>
2014-11-15 20:01:46 +00:00
<li class="class-depth-1">
<a href="PIXI.CanvasRenderer.html">CanvasRenderer</a>
</li>
<li class="class-depth-1">
<a href="PIXI.CanvasTinter.html">CanvasTinter</a>
</li>
<li class="class-depth-1">
<a href="PIXI.ComplexPrimitiveShader.html">ComplexPrimitiveShader</a>
</li>
<li class="class-depth-1">
<a href="PIXI.DisplayObject.html">DisplayObject</a>
</li>
<li class="class-depth-1">
<a href="PIXI.DisplayObjectContainer.html">DisplayObjectContainer</a>
</li>
2016-02-08 17:01:36 +00:00
<li class="class-depth-1">
<a href="PIXI.EarCut.html">EarCut</a>
</li>
2014-11-15 20:01:46 +00:00
<li class="class-depth-1">
<a href="PIXI.Event.html">Event</a>
</li>
<li class="class-depth-1">
<a href="PIXI.EventTarget.html">EventTarget</a>
</li>
<li class="class-depth-1">
<a href="PIXI.FilterTexture.html">FilterTexture</a>
</li>
<li class="class-depth-1">
<a href="PIXI.Graphics.html">Graphics</a>
</li>
<li class="class-depth-1">
<a href="PIXI.GraphicsData.html">GraphicsData</a>
</li>
<li class="class-depth-1">
<a href="PIXI.PIXI.html">PIXI</a>
</li>
<li class="class-depth-1">
<a href="PIXI.PixiFastShader.html">PixiFastShader</a>
</li>
<li class="class-depth-1">
<a href="PIXI.PixiShader.html">PixiShader</a>
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.PolyK.html">PolyK</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.PrimitiveShader.html">PrimitiveShader</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.RenderTexture.html">RenderTexture</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.Rope.html">Rope</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.Sprite.html">Sprite</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.SpriteBatch.html">SpriteBatch</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.Strip.html">Strip</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.StripShader.html">StripShader</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.Texture.html">Texture</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.TilingSprite.html">TilingSprite</a>
2014-11-15 20:01:46 +00:00
</li>
2014-11-25 00:23:44 +00:00
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.WebGLBlendModeManager.html">WebGLBlendModeManager</a>
2014-11-25 00:23:44 +00:00
</li>
2014-11-15 20:01:46 +00:00
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.WebGLFastSpriteBatch.html">WebGLFastSpriteBatch</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.WebGLFilterManager.html">WebGLFilterManager</a>
2014-11-15 20:01:46 +00:00
</li>
<li class="class-depth-1">
2015-03-23 23:46:30 +00:00
<a href="PIXI.WebGLRenderer.html">WebGLRenderer</a>
2014-11-15 20:01:46 +00:00
</li>
2015-03-23 23:46:30 +00:00
</ul>
</li>
<li class="dropdown">
<a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b
class="caret"></b></a>
<ul class="dropdown-menu ">
<li class="class-depth-0">
2015-07-22 14:31:30 +00:00
<a href="global.html#AUTO">AUTO</a>
2014-11-15 20:01:46 +00:00
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
2015-07-22 14:31:30 +00:00
<a href="global.html#BITMAPDATA">BITMAPDATA</a>
2014-11-15 20:01:46 +00:00
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
2015-07-22 14:31:30 +00:00
<a href="global.html#BITMAPTEXT">BITMAPTEXT</a>
2014-11-15 20:01:46 +00:00
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
<a href="global.html#blendModes">blendModes</a>
2014-11-15 20:01:46 +00:00
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
2015-07-22 14:31:30 +00:00
<a href="global.html#BUTTON">BUTTON</a>
</li>
<li class="class-depth-0">
<a href="global.html#CANVAS">CANVAS</a>
</li>
<li class="class-depth-0">
<a href="global.html#CANVAS_FILTER">CANVAS_FILTER</a>
</li>
<li class="class-depth-0">
<a href="global.html#CIRCLE">CIRCLE</a>
</li>
<li class="class-depth-0">
<a href="global.html#CREATURE">CREATURE</a>
</li>
<li class="class-depth-0">
<a href="global.html#DOWN">DOWN</a>
</li>
<li class="class-depth-0">
<a href="global.html#ELLIPSE">ELLIPSE</a>
</li>
<li class="class-depth-0">
<a href="global.html#EMITTER">EMITTER</a>
</li>
<li class="class-depth-0">
<a href="global.html#GAMES">GAMES</a>
</li>
<li class="class-depth-0">
<a href="global.html#GRAPHICS">GRAPHICS</a>
</li>
<li class="class-depth-0">
<a href="global.html#GROUP">GROUP</a>
</li>
<li class="class-depth-0">
<a href="global.html#HEADLESS">HEADLESS</a>
</li>
<li class="class-depth-0">
<a href="global.html#IMAGE">IMAGE</a>
</li>
<li class="class-depth-0">
<a href="global.html#LEFT">LEFT</a>
</li>
<li class="class-depth-0">
<a href="global.html#LINE">LINE</a>
</li>
<li class="class-depth-0">
<a href="global.html#MATRIX">MATRIX</a>
</li>
<li class="class-depth-0">
<a href="global.html#NONE">NONE</a>
</li>
2016-02-08 17:01:36 +00:00
<li class="class-depth-0">
<a href="global.html#PENDING_ATLAS">PENDING_ATLAS</a>
</li>
2015-07-22 14:31:30 +00:00
<li class="class-depth-0">
<a href="global.html#POINT">POINT</a>
</li>
<li class="class-depth-0">
<a href="global.html#POINTER">POINTER</a>
2014-11-15 20:01:46 +00:00
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
2015-07-22 14:31:30 +00:00
<a href="global.html#POLYGON">POLYGON</a>
2014-11-15 20:01:46 +00:00
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
2015-07-22 14:31:30 +00:00
<a href="global.html#RECTANGLE">RECTANGLE</a>
2014-11-15 20:01:46 +00:00
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
2015-07-22 14:31:30 +00:00
<a href="global.html#RENDERTEXTURE">RENDERTEXTURE</a>
2014-11-15 20:01:46 +00:00
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
2015-07-22 14:31:30 +00:00
<a href="global.html#RETROFONT">RETROFONT</a>
2014-11-15 20:01:46 +00:00
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
2015-07-22 14:31:30 +00:00
<a href="global.html#RIGHT">RIGHT</a>
</li>
<li class="class-depth-0">
<a href="global.html#ROPE">ROPE</a>
</li>
<li class="class-depth-0">
<a href="global.html#ROUNDEDRECTANGLE">ROUNDEDRECTANGLE</a>
2014-11-15 20:01:46 +00:00
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
<a href="global.html#scaleModes">scaleModes</a>
2014-11-15 20:01:46 +00:00
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
2015-07-22 14:31:30 +00:00
<a href="global.html#SPRITE">SPRITE</a>
</li>
<li class="class-depth-0">
<a href="global.html#SPRITEBATCH">SPRITEBATCH</a>
</li>
<li class="class-depth-0">
<a href="global.html#TEXT">TEXT</a>
</li>
<li class="class-depth-0">
<a href="global.html#TILEMAP">TILEMAP</a>
</li>
<li class="class-depth-0">
<a href="global.html#TILEMAPLAYER">TILEMAPLAYER</a>
</li>
<li class="class-depth-0">
<a href="global.html#TILESPRITE">TILESPRITE</a>
</li>
<li class="class-depth-0">
<a href="global.html#UP">UP</a>
2014-11-15 20:01:46 +00:00
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
2015-07-22 14:31:30 +00:00
<a href="global.html#VERSION">VERSION</a>
2014-11-15 20:01:46 +00:00
</li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-0">
2015-07-22 14:31:30 +00:00
<a href="global.html#VIDEO">VIDEO</a>
</li>
<li class="class-depth-0">
<a href="global.html#WEBGL">WEBGL</a>
</li>
<li class="class-depth-0">
<a href="global.html#WEBGL_FILTER">WEBGL_FILTER</a>
2014-11-15 20:01:46 +00:00
</li>
</ul>
</li>
2014-11-25 00:23:44 +00:00
2014-11-15 20:01:46 +00:00
<li class="dropdown">
2014-11-25 00:23:44 +00:00
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Core<b class="caret"></b></a>
<ul class="dropdown-menu ">
2014-12-03 10:39:11 +00:00
<li class="class-depth-1"><a href="Phaser.Game.html">Game</a></li>
2014-11-25 00:23:44 +00:00
<li class="class-depth-1"><a href="Phaser.Group.html">Group</a></li>
<li class="class-depth-1"><a href="Phaser.World.html">World</a></li>
<li class="class-depth-1"><a href="Phaser.Loader.html">Loader</a></li>
2015-07-22 14:31:30 +00:00
<li class="class-depth-1"><a href="Phaser.Cache.html">Cache</a></li>
2014-11-25 00:23:44 +00:00
<li class="class-depth-1"><a href="Phaser.Time.html">Time</a></li>
<li class="class-depth-1"><a href="Phaser.Camera.html">Camera</a></li>
<li class="class-depth-1"><a href="Phaser.StateManager.html">State Manager</a></li>
<li class="class-depth-1"><a href="Phaser.TweenManager.html">Tween Manager</a></li>
<li class="class-depth-1"><a href="Phaser.SoundManager.html">Sound Manager</a></li>
2015-01-06 06:57:25 +00:00
<li class="class-depth-1"><a href="Phaser.Input.html">Input Manager</a></li>
2014-11-25 00:23:44 +00:00
<li class="class-depth-1"><a href="Phaser.ScaleManager.html">Scale Manager</a></li>
</ul>
</li>
2014-11-15 20:01:46 +00:00
2014-11-25 00:23:44 +00:00
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Game Objects<b class="caret"></b></a>
2014-11-15 20:01:46 +00:00
<ul class="dropdown-menu ">
2014-11-25 00:23:44 +00:00
<li class="class-depth-1"><a href="Phaser.GameObjectFactory.html">Factory (game.add)</a></li>
<li class="class-depth-1"><a href="Phaser.GameObjectCreator.html">Creator (game.make)</a></li>
<li class="class-depth-1"><a href="Phaser.Sprite.html">Sprite</a></li>
<li class="class-depth-1"><a href="Phaser.Image.html">Image</a></li>
<li class="class-depth-1"><a href="Phaser.Sound.html">Sound</a></li>
2015-07-22 14:31:30 +00:00
<li class="class-depth-1"><a href="Phaser.Video.html">Video</a></li>
2015-01-06 06:57:25 +00:00
<li class="class-depth-1"><a href="Phaser.Particles.Arcade.Emitter.html">Particle Emitter</a></li>
2014-12-03 10:39:11 +00:00
<li class="class-depth-1"><a href="Phaser.Particle.html">Particle</a></li>
2014-11-25 00:23:44 +00:00
<li class="class-depth-1"><a href="Phaser.Text.html">Text</a></li>
<li class="class-depth-1"><a href="Phaser.Tween.html">Tween</a></li>
<li class="class-depth-1"><a href="Phaser.BitmapText.html">BitmapText</a></li>
<li class="class-depth-1"><a href="Phaser.Tilemap.html">Tilemap</a></li>
<li class="class-depth-1"><a href="Phaser.BitmapData.html">BitmapData</a></li>
<li class="class-depth-1"><a href="Phaser.RetroFont.html">RetroFont</a></li>
<li class="class-depth-1"><a href="Phaser.Button.html">Button</a></li>
<li class="class-depth-1"><a href="Phaser.Animation.html">Animation</a></li>
<li class="class-depth-1"><a href="Phaser.Graphics.html">Graphics</a></li>
<li class="class-depth-1"><a href="Phaser.RenderTexture.html">RenderTexture</a></li>
<li class="class-depth-1"><a href="Phaser.TileSprite.html">TileSprite</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Geometry<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li class="class-depth-1"><a href="Phaser.Circle.html">Circle</a></li>
<li class="class-depth-1"><a href="Phaser.Ellipse.html">Ellipse</a></li>
2015-07-22 14:31:30 +00:00
<li class="class-depth-1"><a href="Phaser.Line.html">Line</a></li>
<li class="class-depth-1"><a href="Phaser.Matrix.html">Matrix</a></li>
<li class="class-depth-1"><a href="Phaser.Point.html">Point</a></li>
2014-11-25 00:23:44 +00:00
<li class="class-depth-1"><a href="Phaser.Polygon.html">Polygon</a></li>
2015-07-22 14:31:30 +00:00
<li class="class-depth-1"><a href="Phaser.Rectangle.html">Rectangle</a></li>
<li class="class-depth-1"><a href="Phaser.RoundedRectangle.html">Rounded Rectangle</a></li>
2014-11-25 00:23:44 +00:00
</ul>
</li>
2014-11-15 20:01:46 +00:00
2014-11-25 00:23:44 +00:00
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Physics<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li class="class-depth-1"><a href="Phaser.Physics.Arcade.html">Arcade Physics</a></li>
<li class="class-depth-2"><a href="Phaser.Physics.Arcade.Body.html">Body</a></li>
<li class="class-depth-1"><a href="Phaser.Physics.P2.html">P2 Physics</a></li>
<li class="class-depth-2"><a href="Phaser.Physics.P2.Body.html">Body</a></li>
<li class="class-depth-2"><a href="Phaser.Physics.P2.Spring.html">Spring</a></li>
<li class="class-depth-2"><a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a></li>
<li class="class-depth-2"><a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a></li>
<li class="class-depth-1"><a href="Phaser.Physics.Ninja.html">Ninja Physics</a></li>
<li class="class-depth-2"><a href="Phaser.Physics.Body.html">Body</a></li>
2014-11-15 20:01:46 +00:00
</ul>
</li>
2014-11-25 00:23:44 +00:00
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Input<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li class="class-depth-1"><a href="Phaser.InputHandler.html">Input Handler</a></li>
<li class="class-depth-1"><a href="Phaser.Pointer.html">Pointer</a></li>
2015-07-22 14:31:30 +00:00
<li class="class-depth-1"><a href="Phaser.DeviceButton.html">Device Button</a></li>
2014-11-25 00:23:44 +00:00
<li class="class-depth-1"><a href="Phaser.Mouse.html">Mouse</a></li>
<li class="class-depth-1"><a href="Phaser.Keyboard.html">Keyboard</a></li>
<li class="class-depth-1"><a href="Phaser.Key.html">Key</a></li>
<li class="class-depth-1"><a href="Phaser.Gamepad.html">Gamepad</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Community<b class="caret"></b></a>
<ul class="dropdown-menu ">
2015-03-26 02:55:18 +00:00
<li class="class-depth-1"><a href="http://phaser.io">Phaser Web Site</a></li>
2014-11-25 00:23:44 +00:00
<li class="class-depth-1"><a href="https://github.com/photonstorm/phaser">Phaser Github</a></li>
2015-03-26 02:55:18 +00:00
<li class="class-depth-1"><a href="http://phaser.io/examples">Phaser Examples</a></li>
2014-11-25 00:23:44 +00:00
<li class="class-depth-1"><a href="https://github.com/photonstorm/phaser-plugins">Phaser Plugins</a></li>
<li class="class-depth-1"><a href="http://www.html5gamedevs.com/forum/14-phaser/">Forum</a></li>
<li class="class-depth-1"><a href="http://stackoverflow.com/questions/tagged/phaser-framework">Stack Overflow</a></li>
2015-07-22 14:31:30 +00:00
<li class="class-depth-1"><a href="http://phaser.io/learn">Tutorials</a></li>
2016-05-19 11:36:51 +00:00
<li class="class-depth-1"><a href="http://phaser.io/community/newsletter">Newsletter</a></li>
2015-03-26 02:55:18 +00:00
<li class="class-depth-1"><a href="http://phaser.io/community/twitter">Twitter</a></li>
2016-05-19 11:36:51 +00:00
<li class="class-depth-1"><a href="http://phaser.io/news/2015/08/phaser-slack-channel">Slack</a></li>
2015-03-23 23:46:30 +00:00
<li class="class-depth-1"><a href="https://www.codeandweb.com/texturepacker/phaser">Texture Packer</a></li>
2014-11-25 00:23:44 +00:00
</ul>
</li>
2014-11-15 20:01:46 +00:00
</ul>
</div>
</div>
<div class="row-fluid">
<div class="span8">
<div id="main">
2015-07-22 14:31:30 +00:00
<!--<h1 class="page-title">Class: Video</h1>-->
2014-11-15 20:01:46 +00:00
<section>
<header>
<h2>
2015-07-22 14:31:30 +00:00
<span class="ancestors"><a href="Phaser.html">Phaser</a>.</span>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
Video
2014-11-15 20:01:46 +00:00
</h2>
</header>
<article>
<div class="container-overview">
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="Video"><span class="type-signature"></span>new Video<span class="signature">(game, <span class="optional">key</span>, <span class="optional">url</span>)</span><span class="type-signature"></span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>A Video object that takes a previously loaded Video from the Phaser Cache and handles playback of it.</p>
<p>Alternatively it takes a getUserMedia feed from an active webcam and streams the contents of that to
the Video instead (see <code>startMediaStream</code> method)</p>
<p>The video can then be applied to a Sprite as a texture. If multiple Sprites share the same Video texture and playback
changes (i.e. you pause the video, or seek to a new time) then this change will be seen across all Sprites simultaneously.</p>
<p>Due to a bug in IE11 you cannot play a video texture to a Sprite in WebGL. For IE11 force Canvas mode.</p>
<p>If you need each Sprite to be able to play a video fully independently then you will need one Video object per Sprite.
Please understand the obvious performance implications of doing this, and the memory required to hold videos in RAM.</p>
<p>On some mobile browsers such as iOS Safari, you cannot play a video until the user has explicitly touched the screen.
This works in the same way as audio unlocking. Phaser will handle the touch unlocking for you, however unlike with audio
it's worth noting that every single Video needs to be touch unlocked, not just the first one. You can use the <code>changeSource</code>
method to try and work around this limitation, but see the method help for details.</p>
2016-04-22 14:15:28 +00:00
<p>Small screen devices, especially iPod and iPhone will launch the video in its own native video player,
2015-07-22 14:31:30 +00:00
outside of the Safari browser. There is no way to avoid this, it's a device imposed limitation.</p>
2014-11-15 20:01:46 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
2015-07-22 14:31:30 +00:00
<th>Argument</th>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<th>Default</th>
2014-11-15 20:01:46 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2015-07-22 14:31:30 +00:00
<td class="name"><code>game</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Game.html">Phaser.Game</a></span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>A reference to the currently running game.</p></td>
</tr>
<tr>
<td class="name"><code>key</code></td>
2014-11-15 20:01:46 +00:00
<td class="type">
2015-07-22 14:31:30 +00:00
<span class="param-type">string</span>
|
<span class="param-type">null</span>
2014-11-15 20:01:46 +00:00
</td>
2015-07-22 14:31:30 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="default">
null
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>The key of the video file in the Phaser.Cache that this Video object will play. Set to <code>null</code> or leave undefined if you wish to use a webcam as the source. See <code>startMediaStream</code> to start webcam capture.</p></td>
2014-11-15 20:01:46 +00:00
</tr>
<tr>
2015-07-22 14:31:30 +00:00
<td class="name"><code>url</code></td>
2014-11-15 20:01:46 +00:00
<td class="type">
2015-07-22 14:31:30 +00:00
<span class="param-type">string</span>
|
<span class="param-type">null</span>
2014-11-15 20:01:46 +00:00
</td>
2015-07-22 14:31:30 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="default">
null
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>If the video hasn't been loaded then you can provide a full URL to the file here (make sure to set key to null)</p></td>
2014-11-15 20:01:46 +00:00
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-35">line 35</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
</div>
<h3 class="subsection-title">Members</h3>
<dl>
2016-02-08 17:01:36 +00:00
<dt>
<h4 class="name "
id="currentTime"><span class="type-signature"></span>currentTime<span class="type-signature"> :number</span></h4>
</dt>
<dd>
<div class="description">
<p>The current time of the video in seconds. If set the video will attempt to seek to that point in time.</p>
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-04-22 14:15:28 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-1162">line 1162</a>
2016-02-08 17:01:36 +00:00
</dt>
</dl>
</dd>
2015-03-23 23:46:30 +00:00
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="disableTextureUpload"><span class="type-signature"></span>disableTextureUpload<span class="type-signature"> :boolean</span></h4>
2015-03-23 23:46:30 +00:00
</dt>
<dd>
2015-07-22 14:31:30 +00:00
<div class="description">
<p>If true this video will never send its image data to the GPU when its dirty flag is true. This only applies in WebGL.</p>
</div>
2015-03-23 23:46:30 +00:00
<dl class="details">
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-72">line 72</a>
2015-03-23 23:46:30 +00:00
</dt>
2016-02-08 17:01:36 +00:00
</dl>
</dd>
<dt>
<h4 class="name "
id="duration"><span class="type-signature">&lt;readonly> </span>duration<span class="type-signature"> :number</span></h4>
</dt>
<dd>
<div class="description">
<p>The duration of the video in seconds.</p>
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-04-22 14:15:28 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-1182">line 1182</a>
2016-02-08 17:01:36 +00:00
</dt>
2015-03-23 23:46:30 +00:00
</dl>
</dd>
2014-11-15 20:01:46 +00:00
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="game"><span class="type-signature"></span>game<span class="type-signature"> :<a href="Phaser.Game.html">Phaser.Game</a></span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>A reference to the currently running game.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-43">line 43</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="height"><span class="type-signature"></span>height<span class="type-signature"> :number</span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
2015-07-22 14:31:30 +00:00
<div class="description">
<p>The height of the video in pixels.</p>
</div>
2014-11-15 20:01:46 +00:00
<dl class="details">
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-61">line 61</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="isStreaming"><span class="type-signature"></span>isStreaming<span class="type-signature"> :boolean</span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Is there a streaming video source? I.e. from a webcam.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-137">line 137</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="key"><span class="type-signature"></span>key<span class="type-signature"> :string</span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>The key of the Video in the Cache, if stored there. Will be <code>null</code> if this Video is using the webcam instead.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
2015-07-22 14:31:30 +00:00
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>null</li></ul></dd>
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-49">line 49</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="loop"><span class="type-signature"></span>loop<span class="type-signature"> :boolean</span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Gets or sets if the Video is set to loop.
Please note that at present some browsers (i.e. Chrome) do not support <em>seamless</em> video looping.
If the video isn't yet set this will always return false.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-04-22 14:15:28 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-1355">line 1355</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="mute"><span class="type-signature"></span>mute<span class="type-signature"> :boolean</span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Gets or sets the muted state of the Video.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-04-22 14:15:28 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-1212">line 1212</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="onAccess"><span class="type-signature"></span>onAccess<span class="type-signature"> :<a href="Phaser.Signal.html">Phaser.Signal</a></span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>This signal is dispatched if the user allows access to their webcam.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-98">line 98</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="onChangeSource"><span class="type-signature"></span>onChangeSource<span class="type-signature"> :<a href="Phaser.Signal.html">Phaser.Signal</a></span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>This signal is dispatched if the Video source is changed. It sends 3 parameters: a reference to the Video object and the new width and height of the new video source.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-88">line 88</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="onComplete"><span class="type-signature"></span>onComplete<span class="type-signature"> :<a href="Phaser.Signal.html">Phaser.Signal</a></span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>This signal is dispatched when the Video completes playback, i.e. enters an 'ended' state. Videos set to loop will never dispatch this signal.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-93">line 93</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="onError"><span class="type-signature"></span>onError<span class="type-signature"> :<a href="Phaser.Signal.html">Phaser.Signal</a></span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>This signal is dispatched if an error occurs either getting permission to use the webcam (for a Video Stream) or when trying to play back a video file.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-103">line 103</a>
2015-03-23 23:46:30 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="onPlay"><span class="type-signature"></span>onPlay<span class="type-signature"> :<a href="Phaser.Signal.html">Phaser.Signal</a></span></h4>
2015-03-23 23:46:30 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>This signal is dispatched when the Video starts to play. It sends 3 parameters: a reference to the Video object, if the video is set to loop or not and the playback rate.</p>
2015-03-23 23:46:30 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-83">line 83</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="onTimeout"><span class="type-signature"></span>onTimeout<span class="type-signature"> :<a href="Phaser.Signal.html">Phaser.Signal</a></span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>This signal is dispatched if when asking for permission to use the webcam no response is given within a the Video.timeout limit.
This may be because the user has picked <code>Not now</code> in the permissions window, or there is a delay in establishing the LocalMediaStream.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-110">line 110</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="paused"><span class="type-signature"></span>paused<span class="type-signature"> :boolean</span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Gets or sets the paused state of the Video.
If the video is still touch locked (such as on iOS devices) this call has no effect.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-04-22 14:15:28 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-1252">line 1252</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="playbackRate"><span class="type-signature"></span>playbackRate<span class="type-signature"> :number</span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Gets or sets the playback rate of the Video. This is the speed at which the video is playing.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-04-22 14:15:28 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-1332">line 1332</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="playing"><span class="type-signature">&lt;readonly> </span>playing<span class="type-signature"> :boolean</span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>True if the video is currently playing (and not paused or ended), otherwise false.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-04-22 14:15:28 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-1386">line 1386</a>
2016-02-08 17:01:36 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="progress"><span class="type-signature">&lt;readonly> </span>progress<span class="type-signature"> :number</span></h4>
</dt>
<dd>
<div class="description">
<p>The progress of this video. This is a value between 0 and 1, where 0 is the start and 1 is the end of the video.</p>
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-04-22 14:15:28 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-1197">line 1197</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="retry"><span class="type-signature"></span>retry<span class="type-signature"> :integer</span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>The current retry attempt.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-152">line 152</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="retryInterval"><span class="type-signature"></span>retryInterval<span class="type-signature"> :integer</span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>The number of ms between each retry at monitoring the status of a downloading video.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
2015-07-22 14:31:30 +00:00
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>500</li></ul></dd>
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-158">line 158</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="retryLimit"><span class="type-signature"></span>retryLimit<span class="type-signature"> :integer</span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>When starting playback of a video Phaser will monitor its readyState using a setTimeout call.
The setTimeout happens once every <code>Video.retryInterval</code> ms. It will carry on monitoring the video
state in this manner until the <code>retryLimit</code> is reached and then abort.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
2015-07-22 14:31:30 +00:00
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>20</li></ul></dd>
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-146">line 146</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="snapshot"><span class="type-signature">&lt;readonly> </span>snapshot<span class="type-signature"> :<a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>A snapshot grabbed from the video. This is initially black. Populate it by calling Video.grab().
When called the BitmapData is updated with a grab taken from the current video playing or active video stream.
If Phaser has been compiled without BitmapData support this property will always be <code>null</code>.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-02-08 17:01:36 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-285">line 285</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="texture"><span class="type-signature"></span>texture<span class="type-signature"> :<a href="PIXI.Texture.html">PIXI.Texture</a></span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>The PIXI.Texture.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-02-08 17:01:36 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-260">line 260</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="textureFrame"><span class="type-signature"></span>textureFrame<span class="type-signature"> :<a href="Phaser.Frame.html">Phaser.Frame</a></span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>The Frame this video uses for rendering.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-02-08 17:01:36 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-266">line 266</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="timeout"><span class="type-signature"></span>timeout<span class="type-signature"> :integer</span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>The amount of ms allowed to elapsed before the Video.onTimeout signal is dispatched while waiting for webcam access.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
2015-07-22 14:31:30 +00:00
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>15000</li></ul></dd>
2014-11-15 20:01:46 +00:00
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-116">line 116</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="touchLocked"><span class="type-signature"></span>touchLocked<span class="type-signature"> :boolean</span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>true if this video is currently locked awaiting a touch event. This happens on some mobile devices, such as iOS.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-78">line 78</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="type"><span class="type-signature"></span>type<span class="type-signature"> :number</span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>The const type of this object.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-67">line 67</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="video"><span class="type-signature"></span>video<span class="type-signature"> :HTMLVideoElement</span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>The HTML Video Element that is added to the document.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-127">line 127</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="videoStream"><span class="type-signature"></span>videoStream<span class="type-signature"> :MediaStream</span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>The Video Stream data. Only set if this Video is streaming from the webcam via <code>startMediaStream</code>.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-132">line 132</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="volume"><span class="type-signature"></span>volume<span class="type-signature"> :number</span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Gets or sets the volume of the Video, a value between 0 and 1. The value given is clamped to the range 0 to 1.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-04-22 14:15:28 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-1300">line 1300</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="width"><span class="type-signature"></span>width<span class="type-signature"> :number</span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>The width of the video in pixels.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2015-07-22 14:31:30 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-55">line 55</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<dl>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="add"><span class="type-signature"></span>add<span class="signature">(object)</span><span class="type-signature"> &rarr; {<a href="Phaser.Video.html">Phaser.Video</a>}</span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Updates the given Display Objects so they use this Video as their texture.
This will replace any texture they will currently have set.</p>
2014-11-15 20:01:46 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2015-07-22 14:31:30 +00:00
<td class="name"><code>object</code></td>
2014-11-15 20:01:46 +00:00
<td class="type">
2015-07-22 14:31:30 +00:00
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|
<span class="param-type">Array.&lt;<a href="Phaser.Sprite.html">Phaser.Sprite</a>></span>
|
<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
|
<span class="param-type">Array.&lt;<a href="Phaser.Image.html">Phaser.Image</a>></span>
2014-11-15 20:01:46 +00:00
</td>
2015-07-22 14:31:30 +00:00
<td class="description last"><p>Either a single Sprite/Image or an Array of Sprites/Images.</p></td>
2014-11-15 20:01:46 +00:00
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
2015-07-22 14:31:30 +00:00
<span class="param-type"><a href="Phaser.Video.html">Phaser.Video</a></span>
2014-11-15 20:01:46 +00:00
-
</div>
<div class="returns-desc param-desc">
2015-07-22 14:31:30 +00:00
<p>This Video object for method chaining.</p>
2014-11-15 20:01:46 +00:00
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-04-22 14:15:28 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-799">line 799</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="addToWorld"><span class="type-signature"></span>addToWorld<span class="signature">(<span class="optional">x</span>, <span class="optional">y</span>, <span class="optional">anchorX</span>, <span class="optional">anchorY</span>, <span class="optional">scaleX</span>, <span class="optional">scaleY</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Image.html">Phaser.Image</a>}</span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Creates a new Phaser.Image object, assigns this Video to be its texture, adds it to the world then returns it.</p>
2014-11-15 20:01:46 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
2015-07-22 14:31:30 +00:00
<th>Argument</th>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<th>Default</th>
2014-11-15 20:01:46 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2015-07-22 14:31:30 +00:00
<td class="name"><code>x</code></td>
2014-11-15 20:01:46 +00:00
<td class="type">
2015-07-22 14:31:30 +00:00
<span class="param-type">number</span>
2014-11-15 20:01:46 +00:00
</td>
2015-07-22 14:31:30 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="default">
0
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>The x coordinate to place the Image at.</p></td>
2014-11-15 20:01:46 +00:00
</tr>
<tr>
2015-07-22 14:31:30 +00:00
<td class="name"><code>y</code></td>
2014-11-15 20:01:46 +00:00
<td class="type">
2015-07-22 14:31:30 +00:00
<span class="param-type">number</span>
2014-11-15 20:01:46 +00:00
</td>
2015-07-22 14:31:30 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="default">
0
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>The y coordinate to place the Image at.</p></td>
2014-11-15 20:01:46 +00:00
</tr>
2015-07-22 14:31:30 +00:00
<tr>
<td class="name"><code>anchorX</code></td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="type">
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<span class="param-type">number</span>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="attributes">
&lt;optional><br>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="default">
0
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>Set the x anchor point of the Image. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right.</p></td>
</tr>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<tr>
<td class="name"><code>anchorY</code></td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="type">
<span class="param-type">number</span>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
</td>
2015-03-23 23:46:30 +00:00
2015-07-22 14:31:30 +00:00
<td class="attributes">
&lt;optional><br>
2015-03-23 23:46:30 +00:00
2015-07-22 14:31:30 +00:00
2015-03-23 23:46:30 +00:00
2015-07-22 14:31:30 +00:00
</td>
2015-03-23 23:46:30 +00:00
2015-07-22 14:31:30 +00:00
<td class="default">
0
</td>
2015-03-23 23:46:30 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>Set the y anchor point of the Image. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right.</p></td>
</tr>
2015-03-23 23:46:30 +00:00
2015-07-22 14:31:30 +00:00
2015-03-23 23:46:30 +00:00
2015-07-22 14:31:30 +00:00
<tr>
2015-03-23 23:46:30 +00:00
2015-07-22 14:31:30 +00:00
<td class="name"><code>scaleX</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
1
</td>
<td class="description last"><p>The horizontal scale factor of the Image. A value of 1 means no scaling. 2 would be twice the size, and so on.</p></td>
</tr>
<tr>
<td class="name"><code>scaleY</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
1
</td>
<td class="description last"><p>The vertical scale factor of the Image. A value of 1 means no scaling. 2 would be twice the size, and so on.</p></td>
</tr>
</tbody>
</table>
2015-03-23 23:46:30 +00:00
2015-07-22 14:31:30 +00:00
2015-03-23 23:46:30 +00:00
2015-07-22 14:31:30 +00:00
<h5>Returns:</h5>
<div class="returns">
2015-03-23 23:46:30 +00:00
2015-07-22 14:31:30 +00:00
<div class="returns-type">
<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
2015-03-23 23:46:30 +00:00
2015-07-22 14:31:30 +00:00
-
</div>
2015-03-23 23:46:30 +00:00
2015-07-22 14:31:30 +00:00
<div class="returns-desc param-desc">
<p>The newly added Image object.</p>
2015-03-23 23:46:30 +00:00
</div>
2015-07-22 14:31:30 +00:00
</div>
2015-03-23 23:46:30 +00:00
<dl class="details">
<dt class="tag-source">Source -
2016-04-22 14:15:28 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-828">line 828</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="changeSource"><span class="type-signature"></span>changeSource<span class="signature">(src, <span class="optional">autoplay</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Video.html">Phaser.Video</a>}</span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>On some mobile browsers you cannot play a video until the user has explicitly touched the video to allow it.
Phaser handles this via the <code>setTouchLock</code> method. However if you have 3 different videos, maybe an &quot;Intro&quot;, &quot;Start&quot; and &quot;Game Over&quot;
split into three different Video objects, then you will need the user to touch-unlock every single one of them.</p>
<p>You can avoid this by using just one Video object and simply changing the video source. Once a Video element is unlocked it remains
unlocked, even if the source changes. So you can use this to your benefit to avoid forcing the user to 'touch' the video yet again.</p>
<p>As you'd expect there are limitations. So far we've found that the videos need to be in the same encoding format and bitrate.
This method will automatically handle a change in video dimensions, but if you try swapping to a different bitrate we've found it
cannot render the new video on iOS (desktop browsers cope better).</p>
<p>When the video source is changed the video file is requested over the network. Listen for the <code>onChangeSource</code> signal to know
when the new video has downloaded enough content to be able to be played. Previous settings such as the volume and loop state
are adopted automatically by the new video.</p>
2014-11-15 20:01:46 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
2015-07-22 14:31:30 +00:00
<th>Argument</th>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<th>Default</th>
2014-11-15 20:01:46 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2015-07-22 14:31:30 +00:00
<td class="name"><code>src</code></td>
2014-11-15 20:01:46 +00:00
<td class="type">
2015-07-22 14:31:30 +00:00
<span class="param-type">string</span>
2014-11-15 20:01:46 +00:00
</td>
2015-07-22 14:31:30 +00:00
<td class="attributes">
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="default">
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>The new URL to change the video.src to.</p></td>
2014-12-03 10:39:11 +00:00
</tr>
<tr>
2015-07-22 14:31:30 +00:00
<td class="name"><code>autoplay</code></td>
2014-12-03 10:39:11 +00:00
<td class="type">
2015-07-22 14:31:30 +00:00
<span class="param-type">boolean</span>
2014-12-03 10:39:11 +00:00
</td>
2015-07-22 14:31:30 +00:00
<td class="attributes">
&lt;optional><br>
2014-12-03 10:39:11 +00:00
2015-07-22 14:31:30 +00:00
2014-12-03 10:39:11 +00:00
2015-07-22 14:31:30 +00:00
</td>
2014-12-03 10:39:11 +00:00
2015-07-22 14:31:30 +00:00
<td class="default">
2014-12-03 10:39:11 +00:00
2015-07-22 14:31:30 +00:00
true
</td>
2014-12-03 10:39:11 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>Should the video play automatically after the source has been updated?</p></td>
2014-11-15 20:01:46 +00:00
</tr>
</tbody>
</table>
2014-12-03 10:39:11 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
2015-07-22 14:31:30 +00:00
<span class="param-type"><a href="Phaser.Video.html">Phaser.Video</a></span>
2014-12-03 10:39:11 +00:00
-
</div>
<div class="returns-desc param-desc">
2015-07-22 14:31:30 +00:00
<p>This Video object for method chaining.</p>
2014-12-03 10:39:11 +00:00
</div>
</div>
2014-11-15 20:01:46 +00:00
<dl class="details">
<dt class="tag-source">Source -
2016-04-22 14:15:28 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-949">line 949</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="complete"><span class="type-signature"></span>complete<span class="signature">()</span><span class="type-signature"></span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Called when the video completes playback (reaches and ended state).
Dispatches the Video.onComplete signal.</p>
2014-11-15 20:01:46 +00:00
</div>
2014-12-03 10:39:11 +00:00
2014-11-15 20:01:46 +00:00
<dl class="details">
<dt class="tag-source">Source -
2016-02-08 17:01:36 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-620">line 620</a>
2015-07-24 12:30:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="connectToMediaStream"><span class="type-signature"></span>connectToMediaStream<span class="signature">(video, stream)</span><span class="type-signature"> &rarr; {<a href="Phaser.Video.html">Phaser.Video</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Connects to an external media stream for the webcam, rather than using a local one.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>video</code></td>
<td class="type">
<span class="param-type">HTMLVideoElement</span>
</td>
<td class="description last"><p>The HTML Video Element that the stream uses.</p></td>
</tr>
<tr>
<td class="name"><code>stream</code></td>
<td class="type">
<span class="param-type">MediaStream</span>
</td>
<td class="description last"><p>The Video Stream data.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Video.html">Phaser.Video</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This Video object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-02-08 17:01:36 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-308">line 308</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="createVideoFromBlob"><span class="type-signature"></span>createVideoFromBlob<span class="signature">(blob)</span><span class="type-signature"> &rarr; {<a href="Phaser.Video.html">Phaser.Video</a>}</span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Creates a new Video element from the given Blob. The Blob must contain the video data in the correct encoded format.
This method is typically called by the Phaser.Loader and Phaser.Cache for you, but is exposed publicly for convenience.</p>
2014-11-15 20:01:46 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2015-07-22 14:31:30 +00:00
<td class="name"><code>blob</code></td>
2014-11-15 20:01:46 +00:00
<td class="type">
2015-07-22 14:31:30 +00:00
<span class="param-type">Blob</span>
2014-11-15 20:01:46 +00:00
</td>
2015-07-22 14:31:30 +00:00
<td class="description last"><p>The Blob containing the video data: <code>Blob([new Uint8Array(data)])</code></p></td>
2014-11-15 20:01:46 +00:00
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
2015-07-22 14:31:30 +00:00
<span class="param-type"><a href="Phaser.Video.html">Phaser.Video</a></span>
2014-11-15 20:01:46 +00:00
-
</div>
<div class="returns-desc param-desc">
2015-07-22 14:31:30 +00:00
<p>This Video object for method chaining.</p>
2014-11-15 20:01:46 +00:00
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-02-08 17:01:36 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-504">line 504</a>
2015-07-24 12:30:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="createVideoFromURL"><span class="type-signature"></span>createVideoFromURL<span class="signature">(url, <span class="optional">autoplay</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Video.html">Phaser.Video</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Creates a new Video element from the given URL.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>url</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The URL of the video.</p></td>
</tr>
<tr>
<td class="name"><code>autoplay</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>Automatically start the video?</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Video.html">Phaser.Video</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This Video object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-02-08 17:01:36 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-527">line 527</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="destroy"><span class="type-signature"></span>destroy<span class="signature">()</span><span class="type-signature"></span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Destroys the Video object. This calls <code>Video.stop</code> and then <code>Video.removeVideoElement</code>.
If any Sprites are using this Video as their texture it is up to you to manage those.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-04-22 14:15:28 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-1136">line 1136</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="grab"><span class="type-signature"></span>grab<span class="signature">(<span class="optional">clear</span>, <span class="optional">alpha</span>, <span class="optional">blendMode</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Grabs the current frame from the Video or Video Stream and renders it to the Video.snapshot BitmapData.</p>
<p>You can optionally set if the BitmapData should be cleared or not, the alpha and the blend mode of the draw.</p>
<p>If you need more advanced control over the grabbing them call <code>Video.snapshot.copy</code> directly with the same parameters as BitmapData.copy.</p>
2014-11-15 20:01:46 +00:00
</div>
2015-07-22 14:31:30 +00:00
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>clear</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>Should the BitmapData be cleared before the Video is grabbed? Unless you are using alpha or a blend mode you can usually leave this set to false.</p></td>
</tr>
<tr>
<td class="name"><code>alpha</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
1
</td>
<td class="description last"><p>The alpha that will be set on the video before drawing. A value between 0 (fully transparent) and 1, opaque.</p></td>
</tr>
<tr>
<td class="name"><code>blendMode</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
null
</td>
<td class="description last"><p>The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'.</p></td>
</tr>
</tbody>
</table>
2014-11-15 20:01:46 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
2015-07-22 14:31:30 +00:00
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
2014-11-15 20:01:46 +00:00
-
</div>
<div class="returns-desc param-desc">
2015-07-22 14:31:30 +00:00
<p>A reference to the Video.snapshot BitmapData object for further method chaining.</p>
2014-11-15 20:01:46 +00:00
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-04-22 14:15:28 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-1070">line 1070</a>
2015-03-23 23:46:30 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="play"><span class="type-signature"></span>play<span class="signature">(<span class="optional">loop</span>, <span class="optional">playbackRate</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Video.html">Phaser.Video</a>}</span></h4>
2015-03-23 23:46:30 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Starts this video playing if it's not already doing so.</p>
2015-03-23 23:46:30 +00:00
</div>
2015-07-22 14:31:30 +00:00
<h5>Parameters:</h5>
2015-03-23 23:46:30 +00:00
2015-07-22 14:31:30 +00:00
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
2015-03-23 23:46:30 +00:00
2015-07-22 14:31:30 +00:00
<th>Type</th>
2015-03-23 23:46:30 +00:00
2015-07-22 14:31:30 +00:00
<th>Argument</th>
2015-03-23 23:46:30 +00:00
2015-07-22 14:31:30 +00:00
<th>Default</th>
2015-03-23 23:46:30 +00:00
2015-07-22 14:31:30 +00:00
<th class="last">Description</th>
</tr>
</thead>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<tbody>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<tr>
<td class="name"><code>loop</code></td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="type">
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<span class="param-type">boolean</span>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="attributes">
&lt;optional><br>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="default">
false
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>Should the video loop automatically when it reaches the end? Please note that at present some browsers (i.e. Chrome) do not support <em>seamless</em> video looping.</p></td>
</tr>
2014-11-15 20:01:46 +00:00
<tr>
2015-07-22 14:31:30 +00:00
<td class="name"><code>playbackRate</code></td>
2014-11-15 20:01:46 +00:00
<td class="type">
2015-07-22 14:31:30 +00:00
<span class="param-type">number</span>
2014-11-15 20:01:46 +00:00
</td>
2015-07-22 14:31:30 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="default">
1
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>The playback rate of the video. 1 is normal speed, 2 is x2 speed, and so on. You cannot set a negative playback rate.</p></td>
2014-11-15 20:01:46 +00:00
</tr>
</tbody>
</table>
2014-12-03 10:39:11 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
2015-07-22 14:31:30 +00:00
<span class="param-type"><a href="Phaser.Video.html">Phaser.Video</a></span>
2014-12-03 10:39:11 +00:00
-
</div>
<div class="returns-desc param-desc">
2015-07-22 14:31:30 +00:00
<p>This Video object for method chaining.</p>
2014-12-03 10:39:11 +00:00
</div>
</div>
2014-11-15 20:01:46 +00:00
<dl class="details">
<dt class="tag-source">Source -
2016-02-08 17:01:36 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-632">line 632</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="removeVideoElement"><span class="type-signature"></span>removeVideoElement<span class="signature">()</span><span class="type-signature"></span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Removes the Video element from the DOM by calling parentNode.removeChild on itself.
Also removes the autoplay and src attributes and nulls the reference.</p>
2014-11-15 20:01:46 +00:00
</div>
2014-12-03 10:39:11 +00:00
2014-11-15 20:01:46 +00:00
<dl class="details">
<dt class="tag-source">Source -
2016-04-22 14:15:28 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-1106">line 1106</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="render"><span class="type-signature"></span>render<span class="signature">()</span><span class="type-signature"></span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>If the game is running in WebGL this will push the texture up to the GPU if it's dirty.
This is called automatically if the Video is being used by a Sprite, otherwise you need to remember to call it in your render function.
If you wish to suppress this functionality set Video.disableTextureUpload to <code>true</code>.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-04-22 14:15:28 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-854">line 854</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="setTouchLock"><span class="type-signature"></span>setTouchLock<span class="signature">()</span><span class="type-signature"></span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Sets the Input Manager touch callback to be Video.unlock.
Required for mobile video unlocking. Mostly just used internally.</p>
2014-11-15 20:01:46 +00:00
</div>
<dl class="details">
<dt class="tag-source">Source -
2016-04-22 14:15:28 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-1028">line 1028</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="startMediaStream"><span class="type-signature"></span>startMediaStream<span class="signature">(<span class="optional">captureAudio</span>, <span class="optional">width</span>, <span class="optional">height</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Video.html">Phaser.Video</a>}</span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Instead of playing a video file this method allows you to stream video data from an attached webcam.</p>
<p>As soon as this method is called the user will be prompted by their browser to &quot;Allow&quot; access to the webcam.
If they allow it the webcam feed is directed to this Video. Call <code>Video.play</code> to start the stream.</p>
<p>If they block the webcam the onError signal will be dispatched containing the NavigatorUserMediaError
or MediaStreamError event.</p>
<p>You can optionally set a width and height for the stream. If set the input will be cropped to these dimensions.
If not given then as soon as the stream has enough data the video dimensions will be changed to match the webcam device.
You can listen for this with the onChangeSource signal.</p>
2014-11-15 20:01:46 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
2015-07-22 14:31:30 +00:00
<th>Argument</th>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<th>Default</th>
2014-11-15 20:01:46 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2015-07-22 14:31:30 +00:00
<td class="name"><code>captureAudio</code></td>
2014-11-15 20:01:46 +00:00
<td class="type">
2015-07-22 14:31:30 +00:00
<span class="param-type">boolean</span>
2014-11-15 20:01:46 +00:00
</td>
2015-07-22 14:31:30 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="default">
false
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>Controls if audio should be captured along with video in the video stream.</p></td>
2014-11-15 20:01:46 +00:00
</tr>
<tr>
2015-07-22 14:31:30 +00:00
<td class="name"><code>width</code></td>
2014-11-15 20:01:46 +00:00
<td class="type">
2015-07-22 14:31:30 +00:00
<span class="param-type">integer</span>
2014-11-15 20:01:46 +00:00
</td>
2015-07-22 14:31:30 +00:00
<td class="attributes">
&lt;optional><br>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="default">
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>The width is used to create the video stream. If not provided the video width will be set to the width of the webcam input source.</p></td>
2014-11-15 20:01:46 +00:00
</tr>
<tr>
2015-07-22 14:31:30 +00:00
<td class="name"><code>height</code></td>
2014-11-15 20:01:46 +00:00
<td class="type">
2015-07-22 14:31:30 +00:00
<span class="param-type">integer</span>
2014-11-15 20:01:46 +00:00
</td>
2015-07-22 14:31:30 +00:00
<td class="attributes">
&lt;optional><br>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="default">
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>The height is used to create the video stream. If not provided the video height will be set to the height of the webcam input source.</p></td>
2014-11-15 20:01:46 +00:00
</tr>
</tbody>
</table>
2015-07-22 14:31:30 +00:00
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Video.html">Phaser.Video</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This Video object for method chaining or false if the device doesn't support getUserMedia.</p>
</div>
</div>
2014-11-15 20:01:46 +00:00
<dl class="details">
<dt class="tag-source">Source -
2016-02-08 17:01:36 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-334">line 334</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="stop"><span class="type-signature"></span>stop<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.Video.html">Phaser.Video</a>}</span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Stops the video playing.</p>
<p>This removes all locally set signals.</p>
<p>If you only wish to pause playback of the video, to resume at a later time, use <code>Video.paused = true</code> instead.
2016-04-22 14:15:28 +00:00
If the video hasn't finished downloading calling <code>Video.stop</code> will not abort the download. To do that you need to
2015-07-22 14:31:30 +00:00
call <code>Video.destroy</code> instead.</p>
<p>If you are using a video stream from a webcam then calling Stop will disconnect the MediaStream session and disable the webcam.</p>
2014-11-15 20:01:46 +00:00
</div>
2015-07-22 14:31:30 +00:00
<h5>Returns:</h5>
<div class="returns">
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<div class="returns-type">
<span class="param-type"><a href="Phaser.Video.html">Phaser.Video</a></span>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
-
</div>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<div class="returns-desc param-desc">
<p>This Video object for method chaining.</p>
</div>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
</div>
2014-11-15 20:01:46 +00:00
<dl class="details">
<dt class="tag-source">Source -
2016-02-08 17:01:36 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-719">line 719</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="unlock"><span class="type-signature"></span>unlock<span class="signature">()</span><span class="type-signature"></span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Enables the video on mobile devices, usually after the first touch.
If the SoundManager hasn't been unlocked then this will automatically unlock that as well.
Only one video can be pending unlock at any one time.</p>
2014-11-15 20:01:46 +00:00
</div>
2014-12-03 10:39:11 +00:00
2014-11-15 20:01:46 +00:00
<dl class="details">
<dt class="tag-source">Source -
2016-04-22 14:15:28 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-1041">line 1041</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
2015-07-22 14:31:30 +00:00
id="updateTexture"><span class="type-signature"></span>updateTexture<span class="signature">(<span class="optional">event</span>, <span class="optional">width</span>, <span class="optional">height</span>)</span><span class="type-signature"></span></h4>
2014-11-15 20:01:46 +00:00
</dt>
<dd>
<div class="description">
2015-07-22 14:31:30 +00:00
<p>Called automatically if the video source changes and updates the internal texture dimensions.
Then dispatches the onChangeSource signal.</p>
2014-11-15 20:01:46 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
2014-12-03 10:39:11 +00:00
<th>Argument</th>
2014-11-15 20:01:46 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2015-07-22 14:31:30 +00:00
<td class="name"><code>event</code></td>
2014-12-03 10:39:11 +00:00
<td class="type">
2015-07-22 14:31:30 +00:00
<span class="param-type">object</span>
2014-12-03 10:39:11 +00:00
</td>
<td class="attributes">
2015-07-22 14:31:30 +00:00
&lt;optional><br>
2014-12-03 10:39:11 +00:00
</td>
2015-07-22 14:31:30 +00:00
<td class="description last"><p>The event which triggered the texture update.</p></td>
2014-12-03 10:39:11 +00:00
</tr>
<tr>
2015-07-22 14:31:30 +00:00
<td class="name"><code>width</code></td>
2014-11-15 20:01:46 +00:00
<td class="type">
2015-07-22 14:31:30 +00:00
<span class="param-type">integer</span>
2014-11-15 20:01:46 +00:00
</td>
2014-12-03 10:39:11 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>The new width of the video. If undefined <code>video.videoWidth</code> is used.</p></td>
2014-11-15 20:01:46 +00:00
</tr>
2015-07-22 14:31:30 +00:00
<tr>
<td class="name"><code>height</code></td>
2014-12-03 10:39:11 +00:00
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="type">
<span class="param-type">integer</span>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="attributes">
&lt;optional><br>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
</td>
2014-11-15 20:01:46 +00:00
2015-07-22 14:31:30 +00:00
<td class="description last"><p>The new height of the video. If undefined <code>video.videoHeight</code> is used.</p></td>
</tr>
</tbody>
</table>
2014-11-15 20:01:46 +00:00
<dl class="details">
<dt class="tag-source">Source -
2016-02-08 17:01:36 +00:00
<a href="src_gameobjects_Video.js.html">gameobjects/Video.js</a>, <a href="src_gameobjects_Video.js.html#sunlight-1-line-569">line 569</a>
2014-11-15 20:01:46 +00:00
</dt>
</dl>
</dd>
</dl>
</article>
</section>
</div>
<div class="clearfix"></div>
<footer>
<span class="copyright">
2016-04-22 14:15:28 +00:00
Phaser Copyright © 2012-2016 Photon Storm Ltd.
2014-11-15 20:01:46 +00:00
</span>
<br />
<span class="jsdoc-message">
2015-08-24 14:43:45 +00:00
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.2</a>
2016-05-19 11:36:51 +00:00
on Thu May 19 2016 12:35:47 GMT+0100 (GMT Daylight Time) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
2014-11-15 20:01:46 +00:00
</span>
</footer>
</div>
<div class="span3">
<div id="toc"></div>
</div>
<br clear="both">
</div>
</div>
<script src="scripts/sunlight.js"></script>
<script src="scripts/sunlight.javascript.js"></script>
<script src="scripts/sunlight-plugin.doclinks.js"></script>
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
<script src="scripts/sunlight-plugin.menu.js"></script>
<script src="scripts/jquery.min.js"></script>
<script src="scripts/jquery.scrollTo.js"></script>
<script src="scripts/jquery.localScroll.js"></script>
<script src="scripts/bootstrap-dropdown.js"></script>
<script src="scripts/toc.js"></script>
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
<script>
$( function () {
$( "#toc" ).toc( {
anchorName : function(i, heading, prefix) {
return $(heading).attr("id") || ( prefix + i );
},
selectors : "h1,h2,h3,h4",
showAndHide : false,
scrollTo : 60
} );
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
} );
</script>
</body>
</html>