Hello,
I started using the media plugin in the labs (
http://giderosmobile.com/labs/media) to play an introduction video in may app.
I use media:playVideo() to display a video in fullscreen in mp4 format encoded with H264.
On Android, it was pretty straight forward and worked properly at first shot.
On iOS though, the behavior is not the same. My video is not correctly scaled (occupies about a quarter of the screen) and offset on the bottom left corner. It seems the video is not even exactly centered in the bottom left corner.
I tried with different resolutions videos and different screen sizes (iPhone 5, iPad mini so far) but the video is still too small and not centered in my screen.
I haven't been able to find much doc or support about this plugin even though it is marked as stable.
Any thoughts?
Thanks
Comments
to ar2rsawseen at gmail dot com
updated Media plugin, please check it out
http://giderosmobile.com/labs/media
my lua file is only one line:require "media"
if i just copy the 4 dll's into "program files (x86)\gideros\plugins" i get the error (in both player and win export):
main.lua:2: module 'media' not found:
no field package.preload['media']
no file '.\media.lua'
no file 'C:\Program Files (x86)\Gideros\lua\media.lua'
no file 'C:\Program Files (x86)\Gideros\lua\media\init.lua'
no file 'C:\Program Files (x86)\Gideros\media.lua'
no file 'C:\Program Files (x86)\Gideros\media\init.lua'
no file '.\media.dll'
no file 'C:\Program Files (x86)\Gideros\media.dll'
no file 'C:\Program Files (x86)\Gideros\loadall.dll'
if i copy the 4 dll's also into " 'C:\Program Files (x86)\Gideros" then i get:
on exported exe:
"The program can't start because mingwm10.dll is missing from your computer. Try reinstalling the program to fix this problem."
on giderosplayer:
"error loading module 'media' from file 'C:\Program Files (x86)\Gideros\media.dll':
The specified module could not be found."
maybe the media plugin is out of date since a lot of things changed in gideros? could it be updated? it has many important features. thanks
(this problem i had already earlier and since then it never worked:
http://giderosmobile.com/forum/discussion/5509/want-to-play-video-file-from-project-/p1 )
Fragmenter - animated loop machine and IKONOMIKON - the memory game
https://github.com/gideros/giderosplugins/tree/master/Media
and that gmedia is some google service related stuff. nevertheless i tried it now with gmedia. if i require "media" as said in the install.html, that seems to be wrong, so i require "gmedia". we are one step further.
now if i put it into plugins folder then it does not work, similar error as in my previous post, i don't know why it does not find as lfs etc. other plugins are found in plugins folder. anyway, i put gmedia.dll finally into gideros root folder and then i get the following error:
"The program can't start because Qt5Multimedia.dll is missing from your computer. Try reinstalling the program to fix this problem."
so what's next? (and thanks)
Fragmenter - animated loop machine and IKONOMIKON - the memory game
http://docs.giderosmobile.com/reference/plugin
there are other dll's in plugin folder that are not explained in the reference, like strict and clipper, so this way nobody will use them i guess. i get that referencing is a tedious job but without it its a wasted effort to add plugins.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
https://github.com/gideros/gideros/blob/master/plugins/gmedia/source/mediabinder.cpp#L1057
it still should be require "media"
and gmedia.dll should be in Plugins folder.
It is possible that new media plugin requires some additional dll like you mentioned Qt5Multimedia.dll, which are not yet bundled with Gideros. Since I have qt installed I seem not to have any problems. I will try to determine if any additional are missing and let you know
Will try to bundle Gideros with them next time
Likes: bali001
the get file from gallery serves almost as a file picker too.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
I don't have the source of version 0.56 so I didn't find out what has changed.
If anyone has that source code, please send me or upload here.
Thanks,
Balazs
If I replace file_exists with this (from @ar2rsawseen's comment: http://giderosmobile.com/forum/discussion/comment/37613#Comment_37607)
So when I copy the video file form asset to Documents it works.
Someone using the video player or I am the only one?
I tried the modified mediabinder.cpp.
copyFile() called in init() when path does not exist, however init() called only in Media.new() lua function, isn't?
mediamager:playVideo() does not fire init() so copyFile won't be called
If I modify playVideo() and call copyFile directly it works fine.