Question
Streaming Video and Bitmap Draw issues.
Hello all,
In the current application I'm developing, I have a custom video console. While watching a video, certain points in the timeline will pop up a dialog box that gives the user the ability to switch to a related video. If the user clicks the button to view the related video, a 3D effect flips the current "main" console to a secondary "branching" console - much like the flip effect the iPhone uses. The videos are streaming from FMS 3, the client application was developed in Flex, and we are using Alex Uhlmann's Distortion Effects to achieve the 3D flip effect.
When I first started developing the application, I ran in to the infamous "Security sandbox violation: BitmapData.draw" error whenever I would try the flip. After some investigation on the web, I found that I needed to set the Client.videoSampleAccess property in my FMS application's main.asc to allow bitmap snapshot access. I did so, and that seemed to do the trick. After playing with the application a bit more, however, I found that the error would still come about if I did the following:
1. Pause the video (stream)
2. Perform a seek while paused.
3. Attempt the flip effect.
When I did the above, the error came back. If I paused, performed a seek, and then unpaused the video, everything worked fine. If I pause and then immediately do the flip without a seek, everything works fine.
It seems as though when you pause and then perform a seek, the player forgets that it has permission to do a frame grab until you restart playback.
Has anyone else had this issue, or anything similar? If so, how did you solve it?
Thanks,
--G
(For reference, here is the actual Error that is getting thrown)
SecurityError: Error #2123: Security sandbox violation: BitmapData.draw: http://localhost/Bison/trunk/BisonClient/bin/BisonClient-debug.swf cannot access rtmp://localhost/digitaltutors. No policy files granted access.
at flash.display::BitmapData/draw()
at sandy.util::DistortImage/renderVector()
at sandy.util::DistortImage/initialize()
at com.adobe.ac.mxeffects::SimpleDistortion/initDistortImage()
at com.adobe.ac.mxeffects::SimpleDistortion/renderSides()
at com.adobe.ac.mxeffects::SimpleDistortion/flipFront()
at com.adobe.ac.mxeffects.effectClasses::FlipInstance/updateFront()
at mx.effects::Tween/ http://www.adobe.com/2006/flex/mx/internal::doInterval()[C:\dev\flex_201_gmc\sdk\frameworks\mx\effects\Tween.as:567
at mx.effects::Tween$/timerHandler()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
In the current application I'm developing, I have a custom video console. While watching a video, certain points in the timeline will pop up a dialog box that gives the user the ability to switch to a related video. If the user clicks the button to view the related video, a 3D effect flips the current "main" console to a secondary "branching" console - much like the flip effect the iPhone uses. The videos are streaming from FMS 3, the client application was developed in Flex, and we are using Alex Uhlmann's Distortion Effects to achieve the 3D flip effect.
When I first started developing the application, I ran in to the infamous "Security sandbox violation: BitmapData.draw" error whenever I would try the flip. After some investigation on the web, I found that I needed to set the Client.videoSampleAccess property in my FMS application's main.asc to allow bitmap snapshot access. I did so, and that seemed to do the trick. After playing with the application a bit more, however, I found that the error would still come about if I did the following:
1. Pause the video (stream)
2. Perform a seek while paused.
3. Attempt the flip effect.
When I did the above, the error came back. If I paused, performed a seek, and then unpaused the video, everything worked fine. If I pause and then immediately do the flip without a seek, everything works fine.
It seems as though when you pause and then perform a seek, the player forgets that it has permission to do a frame grab until you restart playback.
Has anyone else had this issue, or anything similar? If so, how did you solve it?
Thanks,
--G
(For reference, here is the actual Error that is getting thrown)
SecurityError: Error #2123: Security sandbox violation: BitmapData.draw: http://localhost/Bison/trunk/BisonClient/bin/BisonClient-debug.swf cannot access rtmp://localhost/digitaltutors. No policy files granted access.
at flash.display::BitmapData/draw()
at sandy.util::DistortImage/renderVector()
at sandy.util::DistortImage/initialize()
at com.adobe.ac.mxeffects::SimpleDistortion/initDistortImage()
at com.adobe.ac.mxeffects::SimpleDistortion/renderSides()
at com.adobe.ac.mxeffects::SimpleDistortion/flipFront()
at com.adobe.ac.mxeffects.effectClasses::FlipInstance/updateFront()
at mx.effects::Tween/ http://www.adobe.com/2006/flex/mx/internal::doInterval()[C:\dev\flex_201_gmc\sdk\frameworks\mx\effects\Tween.as:567
at mx.effects::Tween$/timerHandler()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
