Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Video playing not working in ios... — Gideros Forum

Video playing not working in ios...

SarthakSarthak Member
edited February 2015 in General questions
Video is played using media player inside my game.

It's working perfectly in Android devices, but in iOS devices, it will crashed after the completion of video with error message : "exc_bad_access code=1 address=0x91756e9a".

So is there any solution?

Comments

  • Just for the info maybe it will help.
    http://stackoverflow.com/questions/20913394/thread-1-exc-bad-access-code-1-address-0xf1759018

    *** For any EXC_BAD_ACCESS errors, you are usually trying to send a message to a released object.*** (Written there)

    Maybe somehow IOS is behaving differently in video part. Maybe some event listener is causing the error. Try to remove listeners than try. (Like onvideoend or videocomplete is there is any) If it will solve the issue on IOS then you can handle those event listeners with a timer hence you already know how much second will last your video.


  • Thanks for your replay, but i have already tried,but not working....
  • SarthakSarthak Member
    edited March 2015
    Got the solution...

    Thanks to my friend, who is ios developer.

    it is related with memory. In the plugins, there is a mediaplayer in being released,then after it is set as nil. To solve this

    In Xcode Project,
    Open GMediaClass.mm from Plugins folder, and then replace your stop method with below code,
    -(void)stop{
        if(self.Alayer != nil)
        {
            [self.Alayer removeFromSuperlayer];
            self.Alayer = nil;
            [self.Alayer release];
        }
        if(self.player != nil){
            [self.player pause];
            [self.player release];
            self.player = nil;
        }
        if([self superview]!=nil)
            [self removeFromSuperview];
    }
    +1 -1 (+2 / -0 )Share on Facebook
  • Maybe @ar2rsawseen can update his plugin with this? Will save him some time tracking it down.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • @ar2rsawseen thanks! It works now. Though now I doubt if it truly did not work before....
    Anyway, is there a way to change the orientation of the video being played? Or does it always follow the orientation that's specified in the gproj file?
Sign In or Register to comment.