I heard that one of the latest daily builds added support for native.newVideo for Android.
I created a simple program to test this. On my Nexus 7 the video plays fine. On my Evo 4G LTE the video does not play. Anyone have any ideas?
Chris Rennie
Here’s my code>
url=“http://65.51.67.254:1935/mango_vod/mp4:GilliGiechi_1280.mp4/playlist.m3u8”
mediaPlay=display.newText(“Media Play”, 30, 100, native.systemFont, 20)
videoPlay=display.newText(“Video Play”, 30, 200, native.systemFont, 20)
function mediaListener(e)
function onComplete()
end
mediaPlay.text=“Media Playing?”
media.playVideo(url, media.RemoteSource , true, onComplete)
end
function videoListener(e)
videoPlay.text=“Video playing?”
local video = native.newVideo( 0, 0, display.contentWidth, display.contentHeight )
local function videoL( event )
print( "Event phase: " … event.phase )
if event.errorCode then
native.showAlert( “Error!”, event.errorMessage, { “OK” } )
end
end
video:load( url, media.RemoteSource )
video:addEventListener( “video”, videoL )
video:play()
end
mediaPlay:addEventListener(“tap”, mediaListener)
videoPlay:addEventListener(“tap”, videoListener)