Difference between revisions of "Ogg"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(One intermediate revision by the same user not shown)
Line 8: Line 8:
  
 
=== Example ===
 
=== Example ===
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
Theora=require "Theora"
 
Theora=require "Theora"
 
local videoSource = Theora.new("videos/file_example_OGG_480_1_7mg.ogg")
 
local videoSource = Theora.new("videos/file_example_OGG_480_1_7mg.ogg")
Line 15: Line 15:
 
videoSprite:setPosition(0, 64)
 
videoSprite:setPosition(0, 64)
 
stage:addChild(videoSprite)
 
stage:addChild(videoSprite)
</source>
+
</syntaxhighlight>
  
 
{|-
 
{|-

Latest revision as of 15:31, 13 July 2023

Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.png
Available since: Gideros 2017.10

Description

Adds support for Ogg audio and Theora video.

Example

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)

Methods

Theora.new creates a new Ogg/Theora object

Events

Constants