Difference between revisions of "Theora:play"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2017.10<br/> '''Class:''' Ogg<br/> === Description === Creates a new Ogg/Theora stream object which you can read from. <syntaxhig...")
 
(No difference)

Latest revision as of 07:52, 26 August 2024

Available since: Gideros 2017.10
Class: Ogg

Description

Creates a new Ogg/Theora stream object which you can read from.

(object) = Theora:play()

Return values

Returns (object) the object to use as stream you can read

Example

A Video Sprite

Theora = require "Theora"
local videoSource = Theora.new("videos/file_example_OGG_480_1_7mg.ogg")
local videoStream = videoSource:play()
local videoSprite = videoStream:getVideo()
videoSprite:setPosition(0, 64)
stage:addChild(videoSprite)