Theora.new

From GiderosMobile
Revision as of 03:34, 26 August 2024 by MoKaLux (talk | contribs)

Available since: Gideros 2017.10
Class: Ogg

Description

Creates a new Theora source.

(object) = Theora.new(file)

Parameters

file: (string) path to the Theora file

Return values

Returns (object) the object to use as a source

Example

A Video Sprite

Theora=require "theora.core"
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)