-
1. Re: Syncing Parallel Elements
bringrags Jul 2, 2010 9:48 AM (in response to ionflow)You might want to take a look at the SynchronizedParallelElement, which attempts to do just that:
-
2. Re: Syncing Parallel Elements
ionflow Jul 4, 2010 3:05 PM (in response to bringrags)Looks like this example works great for bufferable elements, but if any of the elements being played in parallel are not bufferable (DurationElements) then the implementation fails.
Update: ...fails in the sense that the duration element is not paused while the other elements are buffering.
-
3. Re: Syncing Parallel Elements
ionflow Jul 5, 2010 1:55 PM (in response to ionflow)I discovered, through bandwidth restriction, that this SynchronizedParallelElement example doesn't actually work when trying to play two bufferable videos in sync. I modified the updatePlayState function as follows to get it to work as expected. This change also fixes the issue with a duration element not pausing while other elements are buffering as mentioned above.
private function updatePlayState(..._):void
{
if(bufferable)
{
trace("buffering:"+bufferable.buffering);
trace("bufferTime:"+bufferable.bufferTime);
trace("bufferLength:"+bufferable.bufferLength);
if(playable)
{
trace("playstate:"+playable.playState);
if(!paused
&& bufferable.buffering
&& playable.canPause
&& bufferable.bufferLength < bufferable.bufferTime)
{
playable.pause();
paused = true;
}
else if(paused
&& (!bufferable.buffering || bufferable.bufferLength >= bufferable.bufferTime))
{
playable.play();
paused = false;
}
}
}
}
-
4. Re: Syncing Parallel Elements
MicMic1234 Feb 21, 2012 7:06 AM (in response to ionflow)Hi, were you able to make the elements start playing at the same time? I can't get it to work, even when using SynchronizedParallelElement with your fix.
Do you have any suggestions?
Thanks!