Discussion Forums  >  Audio, Video, Playing, Recording

Replies: 9    Views: 96

el_flojo
I hate code!
Profile
Posts: 9
Reg: Jul 31, 2012
Dundee
4,990
08/13/12 12:38 PM (13 years ago)

Actions After Playing Movie

hey guys, i've got a pretty simple app. basically it's just going to play a short movie. however, i'd like the app to go back to the main menu after the movie is done playing. i've embedded the movie using html5 and it plays ok. any ideas? thanks!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/13/12 02:38 PM (13 years ago)
iOS / Android? I would be very very surprised if you cold "capture" an event when a video finishes playing if you're using a simple HTML markup tag to "embed" the video. Native media players in iOS and Android allow you, the developer, to listen for these events (movieDidFinish, etc) and act accordingly. When you use HTML to embed the video, you'll loose this ability. I'm not 100% sure of this but it seems logical. Why are you using HTML to play the video? Maybe try the media player plugin and see if you can get your movie to play. If you can, you could then open the class files (iOS or Android) and see how it's working. Next, you could write the method to capture the "finishedPlaying" event.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/13/12 02:38 PM (13 years ago)
 
el_flojo
I hate code!
Profile
Posts: 9
Reg: Jul 31, 2012
Dundee
4,990
like
08/13/12 02:45 PM (13 years ago)
iOS. thanks david - mostly i'm writing it in HTML5 because objective C makes my head hurt. i'll check out some of the plugins. that stack overflow article looks pretty helpful.
 
el_flojo
I hate code!
Profile
Posts: 9
Reg: Jul 31, 2012
Dundee
4,990
like
08/14/12 12:07 PM (13 years ago)
wow. buzztouch 1.5 did the job. but now here's what i'm trying to figure out...when the movie finishes, it goes back to the main menu. i'd like it to go to a different screen. how best to do this?
 
el_flojo
I hate code!
Profile
Posts: 9
Reg: Jul 31, 2012
Dundee
4,990
like
08/15/12 02:59 PM (13 years ago)
i guess if i could clarify this - think i see what's going on. basically from the main menu, i want the user to click on and get a blank screen (or screen with some stuff i'll put on it). But i'd like the video view to play on top of the second menu before it appears. still stuck on this. i'm not much of a programmer....
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/16/12 12:20 AM (13 years ago)
Not sure what you're asking here? Blank screen? Second menu? Huh? Not sure what you're trying to do. When the movie finishes it will close the built in iOS player. Whatever was behind it will appear again.
 
el_flojo
I hate code!
Profile
Posts: 9
Reg: Jul 31, 2012
Dundee
4,990
like
08/16/12 12:25 AM (13 years ago)
yeah - that's the thing, i'd like a different screen to appear when the movie closes.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/16/12 02:27 AM (13 years ago)
Refer back to my original comment: "Native media players in iOS and Android allow you, the developer, to listen for these events (movieDidFinish, etc) and act accordingly." You'll need to figure out how to write a method to "listen" to the movie ending event then act accordingly. This means you'll have to understand how the movieDidFinish event is triggered by iOS then write a method to capture the event. This method would then display a new screen.
 
AppGalaxy
Android Fan
Profile
Posts: 20
Reg: Aug 16, 2012
San Jose
1,750
like
08/18/12 06:02 PM (13 years ago)
nice method david
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.