Progress bar for playing native.newVideo?

Is there any way to get the current position of where the native.newVideo is while playing? What I am doing is actually using this to play a remote video. I have added a couple buttons for play and pause but would love to show the current position of where it is while playing. I plan to use the seek method to jump around in the audio also. All of the mp3 files will not be over 45 seconds.

Thanks,

Warren

Playing the mp3 worked on Android but for iOS it did not do anything. I’ll have to see whats going on with. Do I need the audio file to be a wav format instead?

Is the ringer on your phone on? Corona respects the ringer. If it is on silent the audio will have no volume

Check out https://docs.coronalabs.com/api/library/media/playVideo.html

edit: audio https://docs.coronalabs.com/api/library/audio/seek.html

https://docs.coronalabs.com/api/library/audio/getDuration.html

This works for Android but not for iOS so far. I have been trying on my iPad Pro but does nothing when I try to  load the url and play.

I was using native.newVideo. This is the one that supports the getDuration, play, pause which I need.

Is https?

Do you have it setup under ats

What is ats? I have a wav and mp3 file sitting on one of my domain sites. Works for Android. Nothing happens with iOS.

https://docs.coronalabs.com/guide/hardware/appleATS/index.html
App transport security(ats)

The short version is apps that use the internet in anyway (expect gamecenter or iCloud) have to be secured with a ssl certificate on your site. https://example.com is most likely is secure site but http://example.com

You have to add all domain to your build.settings, you can turn off ats but all app and updates submitted in 2017 must ats on.

Edit: just to clarify this is an Apple App Store requirement

If you are looking for a free way to do this, I used to use cloudflare which worked with ats. But I personally use comodo but that is only because students get a free ssl certificate but they do have pretty cheap ssl certificates.

I put this in the build settings file under plist. I did this a couple days ago for another iOS app and worked for what I needed. Would this work for trying to stream a file? It did not work for a wav and mp3. Should it be in another file format for iOS?

 NSAppTransportSecurity = { NSExceptionDomains = { ["mydomainwashere.com"] = { NSIncludesSubdomains = true, NSThirdPartyExceptionAllowsInsecureHTTPLoads = true }, }, },

Let me clear up the problem .mp3 and wav work fine on iOS. If you look at the logs you should see your error. I am load from a remote source as we speak with .MP3 on iPad in my corona game. Try:
NSAppTransportSecurity =
{
NSAllowsArbitraryLoads = true,
},
This is a temporary fix, you should consider a ssl certificate of some kind that supports https

Thank you!!! It works. I have it playing an MP3 file as soon as I load the scene which is what I wanted to do. This is a hacked way of playing audio files instead of videos but as long as it works! I was going to use an HTML5 mp3 player in a webView control but neither Android or iOS allows autostart so I found this way. I have an awesome app I’m creating with this and will share it when released.

Thanks again!

Just remember 2017 is when you have to have ssl certificate (that meets apples requirements which is most ssl certificate). The code for the build.settings is posted above , turns ats off. 2017 is the cut off point when you have to ats on and you have to proper ssl certificate( https)

Playing the mp3 worked on Android but for iOS it did not do anything. I’ll have to see whats going on with. Do I need the audio file to be a wav format instead?

Is the ringer on your phone on? Corona respects the ringer. If it is on silent the audio will have no volume

Check out https://docs.coronalabs.com/api/library/media/playVideo.html

edit: audio https://docs.coronalabs.com/api/library/audio/seek.html

https://docs.coronalabs.com/api/library/audio/getDuration.html

This works for Android but not for iOS so far. I have been trying on my iPad Pro but does nothing when I try to  load the url and play.

I was using native.newVideo. This is the one that supports the getDuration, play, pause which I need.