Action list fixes
This commit is contained in:
parent
54ed3bc110
commit
4dc069e6f5
|
@ -96,7 +96,7 @@ class SWFProcessor extends SWFTreeProcessor {
|
|||
return null;
|
||||
}
|
||||
|
||||
if(!$this->isPlaying() and ($this->audio === null or $this->audio->getStartFrame() === null)){ //Force play till finding audio
|
||||
if(!$this->isPlaying() and ($this->audio === null or $this->audio->getStartFrame() === null) or $this->getFrame() === 1){ //Force play till finding audio, or first frame is 0
|
||||
$this->playing = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -200,6 +200,10 @@ class SWFTreeProcessor {
|
|||
return $this->playing;
|
||||
}
|
||||
|
||||
public function getLoops() : int{
|
||||
return $this->loops;
|
||||
}
|
||||
|
||||
public function nextFrame(): ?ViewFrame {
|
||||
$actions = new ActionList();
|
||||
if(!$this->playing){
|
||||
|
@ -216,6 +220,7 @@ class SWFTreeProcessor {
|
|||
}
|
||||
|
||||
if ($nodeName === null) { //Loop again
|
||||
$this->loops++;
|
||||
$this->frame = 0;
|
||||
$this->index = 0;
|
||||
$this->layout = new ViewLayout($this->layout->getObjectId(), null);
|
||||
|
|
|
@ -126,7 +126,7 @@ if ($swf->header["signature"]) {
|
|||
$lastFrame = null;
|
||||
while(($frame = $processor->nextFrameOutput()) !== null){
|
||||
$lastFrame = $frame;
|
||||
if(!$processor->isPlaying()){
|
||||
if(!$processor->isPlaying() or $processor->getLoops() > 0){
|
||||
break;
|
||||
}
|
||||
$audio = $processor->getAudio();
|
||||
|
@ -222,6 +222,7 @@ if ($swf->header["signature"]) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($assRenderer->flush($lastFrame) as $line){
|
||||
fwrite($fp, $line . "\n");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue