Video is not getting played from document directory

We are downloading a video from sever & playing it using “native.newVideo” code shown in API (as it is).

But app is getting crashed, error: “Unfortunately app is stopped”

We’ve tried many many solutions entire day but couldn’t fix it.

We’ve ensured video file is there. When same downloaded video is played using media.play it is getting played.

When we keep the video directly into Resource directory it is getting played with native.newVideo code.

No error in ADB logcat. (Android only App)

I’ve attached entire code in zip file please it. 


local function playVideo()

    

    local video = native.newVideo( display.contentCenterX, display.contentCenterY, 320, 480 )

    video:load( “Latin.mp4”,system.DocumentsDirectory )

    video:play()

end


local function networkListener( event )

    

    if ( event.isError ) then

        

        print( “Network error - download failed” )

        

    elseif ( event.phase == “ended” ) then

        

        print( “Progress Phase: ready” )

        

        playVideo()

        

    end

end


local params = {}

params.progress = true

network.download(“http://sirma.no/Latin.mp4”, “GET”, networkListener, params, “Latin.mp4”, system.DocumentsDirectory )

Doesn’t look like the file is attached. 

It would also be useful if you provided:

  1. The code you’re using to load the video from the DocumentsDirectory location

  2. The errors you’re seeing from the Xcode console/adb logcat readouts

Well, I am seeing the same issue that you are. It seems the video:load() call doesn’t like what you’re passing in there, even though the file a. does exist in the directory and b. isn’t malformed or mis-coded in any way. I was able to get the file to load and play successfully using the media.RemoteSource option, but I don’t know if that is a solution that is tenable for you.

Out of curiosity, which Corona SDK version do you have installed? I’ve been testing with 2808.

IMO you’re got the basis for a really great bug report. 

Actually, simply playing the video from the remote URL might be the better approach, versus downloading the entire file then playing it. Just something to consider…

Brent

We’ve paid Corona heavy amount for license & Corona Engineers here gives silly answers instead of giving solution. 

Are Corona Engineers illiterate?

I want to download the video, my requirement is fulfilled only that way, someone idiotically also suggested media.player. :angry:  :angry:  

If people don’t have knowledge why those idiots answer post, idiots don’t even understand, the questioner is more experience then you, don’t you think he may already tried it. You stupid people comes & show off as they know so much.  

Corona Engineer needs to fix this I’ve seen the issue is there since 2013. Otherwise I’ll directly call your father.

Surojit (Roj) Niyogi

CEO at Corona Labs; Founder/President at Perk.com/Appsaholic

Am loosing very big project after working for 4 months on it.  :angry:

HA! My favorite part was the “father” line.

Chill out, homey. You catch more flies with honey…

Alex that was not for you kid, that was for Corona Engineers. 

For you I’ll write an email for sure, for your show off.

Hi @bahshat,

I will ask the engineers if this is a known issue/bug and report back…

Thanks,

Brent

Hi @bahshat,

Yes, this is a known Android issue and we’re going to explore a fix as soon as possible.

Thanks,

Brent

Hi everyone,

This issue has been fixed and is available in daily builds 2016.2860 and later.

Doesn’t look like the file is attached. 

It would also be useful if you provided:

  1. The code you’re using to load the video from the DocumentsDirectory location

  2. The errors you’re seeing from the Xcode console/adb logcat readouts

Well, I am seeing the same issue that you are. It seems the video:load() call doesn’t like what you’re passing in there, even though the file a. does exist in the directory and b. isn’t malformed or mis-coded in any way. I was able to get the file to load and play successfully using the media.RemoteSource option, but I don’t know if that is a solution that is tenable for you.

Out of curiosity, which Corona SDK version do you have installed? I’ve been testing with 2808.

IMO you’re got the basis for a really great bug report. 

Actually, simply playing the video from the remote URL might be the better approach, versus downloading the entire file then playing it. Just something to consider…

Brent

We’ve paid Corona heavy amount for license & Corona Engineers here gives silly answers instead of giving solution. 

Are Corona Engineers illiterate?

I want to download the video, my requirement is fulfilled only that way, someone idiotically also suggested media.player. :angry:  :angry:  

If people don’t have knowledge why those idiots answer post, idiots don’t even understand, the questioner is more experience then you, don’t you think he may already tried it. You stupid people comes & show off as they know so much.  

Corona Engineer needs to fix this I’ve seen the issue is there since 2013. Otherwise I’ll directly call your father.

Surojit (Roj) Niyogi

CEO at Corona Labs; Founder/President at Perk.com/Appsaholic

Am loosing very big project after working for 4 months on it.  :angry:

HA! My favorite part was the “father” line.

Chill out, homey. You catch more flies with honey…

Alex that was not for you kid, that was for Corona Engineers. 

For you I’ll write an email for sure, for your show off.

Hi @bahshat,

I will ask the engineers if this is a known issue/bug and report back…

Thanks,

Brent

Hi @bahshat,

Yes, this is a known Android issue and we’re going to explore a fix as soon as possible.

Thanks,

Brent

Hi everyone,

This issue has been fixed and is available in daily builds 2016.2860 and later.