WebpopUp and Local html file

I am trying to work with the webpopup api, doing a simple popup to open a local html file. In the html file, I have code to embed a youtube video. I have created 2 buttons, one to open and one to close the popup. When open the file local html loads, the youtube video thumbnail is shown. When tumbnail is "touched" on, video tries to load, as in tries to play as expected. Youtube activity indicator shows it is loading, but no video or audio, also no buffer. When "touched" again, video indicates paused. I have tried the iframe embed and object embed in html file but nothing happens. Also tried, "&autoplay=1" parameter from youtube but nothing plays. Can anyone shed some light on this?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
local button = display.newImage( "button.png" )
button.x = display.contentWidth / 3
button.y = display.contentHeight -50
local button2 = display.newImage( "button.png" )
button2.x = display.contentWidth *2/ 3
button2.y = display.contentHeight -50
 
local function listener( event )
        local shouldLoad = true
 
        local url = event.url
        if 1 == string.find( url, "corona:close" ) then
                -- Close the web popup
                shouldLoad = false
        end
 
        if event.errorCode then
                -- Error loading page
                print( "Error: " .. tostring( event.errorMessage ))
                shouldLoad = false
        end
 
        return shouldLoad
end
 
local options = { hasBackground=false, baseUrl=system.ResourceDirectory, urlRequest=listener }
 
function button:tap( event )
native.showWebPopup( 0, 0, 300, 300, "test.html", options)
end
function button2:tap( event )
native.cancelWebPopup()
end
button:addEventListener( "tap", button )
button2:addEventListener( "tap", button2 )

this is just for debugging, if you double click and open the html file on your machine, not he mobile device, can you see the audio/video?

cheers,

?:)

Opening the test.html file on computer works. Both iframe and object video plays. Also tried opening file from phone's browser, both iframe and object video plays.

views:1792 update:2011/10/11 8:57:46
corona forums © 2003-2011