I’m building a simple app that requires me to use the webview option
local physics = require( “physics” )
local composer = require ( “composer” )
Create a composer scene for this module
local scene = composer.newScene()
function scene:create( event )
local sceneLanding = self.view
local soundID = audio.loadSound (“gummy_music.wav”)
local webView = native.newWebView( display.contentCenterX, display.contentCenterY, 320, 480 )
webView:request( “page.html”, system.ResourceDirectory )
webView:addEventListener( “urlRequest”, webListener )
The page pulls up and renders fine
I’m trying to figure out how to use the listener function in coronasdk to play a sound when an event occurs in the local html file.
something like this in my page.lua ?
local function webListener( event )
audio.play( soundID )
end
I’m looking for a way using jquery to hit the webListener to play the audio.