native.newVideo Questions

I am new to Corona and testing out the possibilities of the native.newVideo function. Seems to work very well.
I am thinking of developing an interactive video app from my shortfilms.

I have a background with a button, which starts a video on top of it at the same position. Works.
But:

  • how can I dipose the video after it has ended (background with button should then only be visible, to restart the video)?

  • how can I restart the page “naked” (without the video being visible, just background with button), when the app is closed while playing the video?

Would be nice if someone could help me. [import]uid: 153927 topic_id: 27128 reply_id: 327128[/import]

If you check out the API page you’ll see a few ways you could remove the video once it had ended, plus the correct method of doing so is in the code sample on that page.

For the second question I’d say if you are using multiple scenes (director/storyboard) then you’d likely save a variable to a file to check later. If not just use a variable and check it on applicationResume event.

Peach :slight_smile: [import]uid: 52491 topic_id: 27128 reply_id: 110259[/import]

Hi Peach,

I just can’t find the info on the API page or anyplace else if native.newVideo() now supports Android or not - would love to know this.

Best,
Andreas
[import]uid: 133261 topic_id: 27128 reply_id: 114530[/import]

Hey Andreas,

It does *not* currently support Android, no. I’m sorry that the new documentation pages are not clearer about this - it was actually brought up in a meeting this week and we hope to get on top of that ASAP. (FYI the old API pages do list compatibility if you scroll to beneath any example usage.)

Peach :slight_smile: [import]uid: 52491 topic_id: 27128 reply_id: 114565[/import]