Page 1 of 1
Android Mobile Video Black Flash Before Playback
Posted: Mon Aug 25, 2014 6:54 pm
by istech
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)
Re: Android Mobile Video Black Flash Before Playback
Posted: Tue Sep 02, 2014 1:34 pm
by istech
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
Re: Android Mobile Video Black Flash Before Playback
Posted: Tue Sep 02, 2014 6:50 pm
by Simon
Hi istech,
What happens if you mobilControlDelete the control when done?
Simon
Re: Android Mobile Video Black Flash Before Playback
Posted: Tue Sep 02, 2014 7:39 pm
by istech
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.
Re: Android Mobile Video Black Flash Before Playback
Posted: Tue Sep 02, 2014 8:00 pm
by Simon
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
Re: Android Mobile Video Black Flash Before Playback
Posted: Thu Sep 04, 2014 7:36 am
by istech
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