I’m building an app that plays several short videos on demand. It works perfectly when I build for IOS, but when I build for Android and try to play the video on any Android device I get an ERROR that says “Can’t play this video.” I am not pulling the videos from the internet. They reside on the device, that is, they are part of the app.
Any ideas?
Here’s the code I’m using with Corona build 3179. I also tried it with build 3157 and got the same error.
video = native.newVideo( display.contentCenterX, display.contentCenterY, display.contentWidth, display.contentHeight ) sceneGroup:insert(video) video:load( "video.mp4" ) video:play()
In the event anyone needs to see my build.settings here they are:
settings = { orientation = { default = "portrait", supported = { "portrait" } }, iphone = { xcassets = "Images.xcassets", plist = { UIApplicationExitsOnSuspend = false, UILaunchStoryboardName = "LaunchScreen", }, }, android = { usesPermissions = { "android.permission.INTERNET", }, }, plugins = { ["CoronaProvider.analytics.flurry"] = { publisherId = "com.coronalabs", }, }, }
It works great on IOS devices, but won’t play on Android devices.
Hope someone can help.
Thanks,
Guy