I wanted to play video inside the game, and using media player, i did it.
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".
I have also tried the Xocde project of reference which got with media plugins, in it i am having same issue.
The lua code for playing video is as below:
if application:getDeviceInfo() == "iOS" or application:getDeviceInfo() == "Android" then
--require plugin
require "media"
end
if application:getDeviceInfo() == "iOS" or application:getDeviceInfo() == "Android" then
mediamanager:addEventListener(Event.VIDEO_COMPLETE, function()
end)
end
And after that i have exported project from gideros, and then added the contents of plugins folder from Media/ios inside exported project.
So please help me.
Thanks.
Comments
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,
Likes: Sarthak, SinisterSoft