StageVideo instability on iOS7 - bizarre solution
I have encountered an issue with stageVideo for which the only solutution I have found is quite bizarre.
I have several apps that use stageVideo with (previously) no problems. After the update to iOS7 I obviously had to update to AIR 3.9 to get them to work again. The apps are all play one of several videos triggered by user's button taps. I have since noticed a problem where sometimes when a new video is selected the video doesn't play (screen is black) but the audio can still be heard.
I have tried many different ways to start and stop the video - things like pausing the netstream before switching video, destroying the netstream and recreating it, pausing before playing, pausing before reattaching the netstream, not pausing etc etc but the problem always appears sooner or later.
Bizarrely I have found that if I overlay a text field on top of the video and output error messages to the text field then the black screen issue completely disappears! Every single time the video plays correctly. As soon as I recompile the code and make txtOuput.visible = false then the black screen issue comes back. I have even tried recompiling with and without the text field visible several times as I was beginning to wonder if it was 'just' something non-deterministic in the compilation process but it does appear to be linked to the text field visibility.
This is obviously not ideal - I've resorted to setting txtOutput.visible = true; txtOutput.alpha = 0.01; and this does allow me to play videos all day long but strikes me as not being ideal.
Does anyone have any idea what this could be and how I should get round it? I am wondering if it is some kind of timing issue and by ouputting text this slows things down just enough for whatever the problem is to disappear. If there is an alternative to using stageVideo then at this point I would be very keen to try it because as everyone knows dealing with this kind of hard to find bug is just no fun!
