MediaPlayer on ios

20 views
Skip to first unread message

Gareth Murfin

unread,
Mar 8, 2019, 3:08:50 AM3/8/19
to CodenameOne Discussions
on ios my mediaplayer is just black, no controls or frames.. works fine on android/simulator - any ideas?

Steve Hannah

unread,
Mar 8, 2019, 8:40:12 AM3/8/19
to codenameone...@googlegroups.com
There appears to be an issue there.  If you enable autoplay, this should work around it for now.  There will be a fix soon.

On Fri, Mar 8, 2019 at 12:08 AM Gareth Murfin <gareth...@gmail.com> wrote:
on ios my mediaplayer is just black, no controls or frames.. works fine on android/simulator - any ideas?

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/a249f5f1-8b53-4767-93d2-391fecd1a4f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Steve Hannah
Software Developer
Codename One

Steve Hannah

unread,
Mar 8, 2019, 9:02:44 AM3/8/19
to codenameone...@googlegroups.com
Actually, upon closer inspection, I see why this is.  On iOS, it doesn't "prepare" the media automatically because the act of preparing media might disrupt other active media in the App.  You need to call the prepare() method on the media if you want the frame and embedded controls to appear.


Gareth Murfin

unread,
Mar 11, 2019, 7:17:59 AM3/11/19
to CodenameOne Discussions
thanks steve, will give it a go... reminds me of j2me days :)


On Friday, March 8, 2019 at 10:02:44 PM UTC+8, Steve Hannah wrote:
Actually, upon closer inspection, I see why this is.  On iOS, it doesn't "prepare" the media automatically because the act of preparing media might disrupt other active media in the App.  You need to call the prepare() method on the media if you want the frame and embedded controls to appear.



On Fri, Mar 8, 2019 at 5:40 AM Steve Hannah <steve....@codenameone.com> wrote:
There appears to be an issue there.  If you enable autoplay, this should work around it for now.  There will be a fix soon.

On Fri, Mar 8, 2019 at 12:08 AM Gareth Murfin <gareth...@gmail.com> wrote:
on ios my mediaplayer is just black, no controls or frames.. works fine on android/simulator - any ideas?

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.


--
Steve Hannah
Software Developer
Codename One

Gareth Murfin

unread,
Mar 28, 2019, 12:40:10 PM3/28/19
to CodenameOne Discussions
Ive noticed when I leave a screen with the media player on it briefly flashes black, is there some way to stop this? like do I need to release it before I swap forms or something? 

Steve Hannah

unread,
Mar 28, 2019, 12:45:22 PM3/28/19
to codenameone...@googlegroups.com
This is likely because during a form transition, it needs to perform a lightweight rendering of the outgoing form.  For native peers, this can cause some jitter like you're describing.  

On Thu, Mar 28, 2019 at 9:40 AM Gareth Murfin <gareth...@gmail.com> wrote:
Ive noticed when I leave a screen with the media player on it briefly flashes black, is there some way to stop this? like do I need to release it before I swap forms or something? 

On Monday, March 11, 2019 at 7:17:59 PM UTC+8, Gareth Murfin wrote:
thanks steve, will give it a go... reminds me of j2me days :)

On Friday, March 8, 2019 at 10:02:44 PM UTC+8, Steve Hannah wrote:
Actually, upon closer inspection, I see why this is.  On iOS, it doesn't "prepare" the media automatically because the act of preparing media might disrupt other active media in the App.  You need to call the prepare() method on the media if you want the frame and embedded controls to appear.



On Fri, Mar 8, 2019 at 5:40 AM Steve Hannah <steve....@codenameone.com> wrote:
There appears to be an issue there.  If you enable autoplay, this should work around it for now.  There will be a fix soon.

On Fri, Mar 8, 2019 at 12:08 AM Gareth Murfin <gareth...@gmail.com> wrote:
on ios my mediaplayer is just black, no controls or frames.. works fine on android/simulator - any ideas?

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.


--
Steve Hannah
Software Developer
Codename One


--
Steve Hannah
Software Developer
Codename One

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Gareth Murfin

unread,
Mar 29, 2019, 5:20:13 AM3/29/19
to CodenameOne Discussions
Thanks, so you're saying I should remove it or set it invisible before transitioning to new screen?

Also the "prepare" call doesnt stop the video player being black, the controls dont appear either, so instead of a video I just see a black box, this works fine on emulators and android. 


On Friday, March 29, 2019 at 12:45:22 AM UTC+8, Steve Hannah wrote:
This is likely because during a form transition, it needs to perform a lightweight rendering of the outgoing form.  For native peers, this can cause some jitter like you're describing.  

On Thu, Mar 28, 2019 at 9:40 AM Gareth Murfin <gareth...@gmail.com> wrote:
Ive noticed when I leave a screen with the media player on it briefly flashes black, is there some way to stop this? like do I need to release it before I swap forms or something? 

On Monday, March 11, 2019 at 7:17:59 PM UTC+8, Gareth Murfin wrote:
thanks steve, will give it a go... reminds me of j2me days :)

On Friday, March 8, 2019 at 10:02:44 PM UTC+8, Steve Hannah wrote:
Actually, upon closer inspection, I see why this is.  On iOS, it doesn't "prepare" the media automatically because the act of preparing media might disrupt other active media in the App.  You need to call the prepare() method on the media if you want the frame and embedded controls to appear.



On Fri, Mar 8, 2019 at 5:40 AM Steve Hannah <steve....@codenameone.com> wrote:
There appears to be an issue there.  If you enable autoplay, this should work around it for now.  There will be a fix soon.

On Fri, Mar 8, 2019 at 12:08 AM Gareth Murfin <gareth...@gmail.com> wrote:
on ios my mediaplayer is just black, no controls or frames.. works fine on android/simulator - any ideas?

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.


--
Steve Hannah
Software Developer
Codename One


--
Steve Hannah
Software Developer
Codename One

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.

Gareth Murfin

unread,
Mar 29, 2019, 5:57:48 AM3/29/19
to CodenameOne Discussions
Sorry!! turns out somehow my prepare line was commented out! It does work perfectly. Thanks. Also setting it to invisible just before transition stops the jerk.. awesome! now if only i could fix my status bar on ios 

Gareth Murfin

unread,
Mar 29, 2019, 6:44:12 AM3/29/19
to CodenameOne Discussions
Though one thing ive noticed is that behind the video (presumably where it doesnt fit due to ratio or whatever) there is a black background, I need this to be white, is there any way?

Shai Almog

unread,
Mar 30, 2019, 1:31:25 AM3/30/19
to CodenameOne Discussions
Just set the UIID value to a white background on the media UIID. You can find that via component inspector.
Reply all
Reply to author
Forward
0 new messages