Android Mobile Video Black Flash Before Playback

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
istech
Posts: 194
Joined: Thu Sep 19, 2013 10:08 am

Android Mobile Video Black Flash Before Playback

Post by istech » Mon Aug 25, 2014 6:54 pm

Hi All,

I am trying to solve a issue with mobile video playback. I have scripted a standard video from the lessons and on every playback a black flash appears before it plays the video.

Is there any way to fix this? I have referenced a few links but nothing works at the moment.

Ref:
(http://forums.livecode.com/viewtopic.ph ... ash#p88388)

istech
Posts: 194
Joined: Thu Sep 19, 2013 10:08 am

Re: Android Mobile Video Black Flash Before Playback

Post by istech » Tue Sep 02, 2014 1:34 pm

Just to help someone out

This turned out to be the flash when creating the control. Apparently it's best to build your controls in preOpenCard rather than when the card is already open.

However another problem has arisen were the control will not hide after it has finished playing.

on playVideo
lock screen
set the acceleratedRendering of this stack to false
mobileControlDo "videoPlay", "play"
unlock screen
end playVideo

on playerFinished
lock screen
if "videoPlay" is among the lines of mobileControls() then
mobileControlSet "videoPlay", "visible", false--why does this not hide the control? The first frame still shows???
--mobileControlDelete "videoPlay"--Why does deleting control produce a black flash??
end if
set the acceleratedRendering of this stack to true
unlock screen
end playerFinished

Is there something else I need to do to get the control to hide? Thanks all.

Android KitKat

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Android Mobile Video Black Flash Before Playback

Post by Simon » Tue Sep 02, 2014 6:50 pm

Hi istech,
What happens if you mobilControlDelete the control when done?

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

istech
Posts: 194
Joined: Thu Sep 19, 2013 10:08 am

Re: Android Mobile Video Black Flash Before Playback

Post by istech » Tue Sep 02, 2014 7:39 pm

Hi Simon,

When I use mobileControlDelete a black square appears where the video was and then it disappears.

I am using it on Android v 4.4.4.

The video plays fine and all else works as it should so not sure if it is a bug or something I have done which is not making it work as it should.

Saying that ("mobileControlSet "videoPlay", "visible", false") Should hide the control. However the control is visible and stays on frame one of the rect.

Thanks for the help.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Android Mobile Video Black Flash Before Playback

Post by Simon » Tue Sep 02, 2014 8:00 pm

The suggestion from the link you posted is to set the video to 0 by 0 px:
mobileControlSet "videoPlay", "rect", "0,0,0,0" (maybe try "0,0,1,1")

Sorry that I missed reading you had already tried mobileControlDelete.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

istech
Posts: 194
Joined: Thu Sep 19, 2013 10:08 am

Re: Android Mobile Video Black Flash Before Playback

Post by istech » Thu Sep 04, 2014 7:36 am

Thanks for the workaround suggestions Simon.

Apparently this is a bug which is apparently fixed in the next update.

Bug: 13268 I will be testing today to confirm all is well.

Regards,

Tony

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”