Howdy.
I cut bits out of my app and now just want to have the one WebPopup with the Mobile version of the YouTube page I want on there.
I can view the page fine and watch videos using Mobile Safari, but a Corona WebPopup showing the same page continuously buffers and never shows the movie.
-- Test network connection first
local function testNetworkConnection()
local google = require('socket').connect('google.com', 80)
if google == nil then
return false
end
google:close()
return true
end
-- Delay to let webpopup close
local function toMenu( event )
director:changeScene( "mainmenu", "moveFromLeft" )
end
-- If HOME button pressed, head back to menu
local bt01t = function ( event )
if event.phase == "ended" then
native.cancelWebPopup()
timer.performWithDelay(500, toMenu )
end
end
NavbarImage:addEventListener("touch",bt01t)
-- If network exists, pop up page
if testNetworkConnection() == true then
native.showWebPopup( 0, 48, 320, 432,
"http://m.youtube.com/brad20071",{urlRequest=listener} )
else native.showAlert( "Tech Webcast", "No network detected. Please connect to 3G or Wifi.", { "OK", }, toMenu )
end
unloadMe = function()
if theTimer then timer.cancel( theTimer ); end
end
Any clues are always appreciated.
Thanks. [import]uid: 10389 topic_id: 13596 reply_id: 313596[/import]