Skip to content

Commit

Permalink
Bugfix for jplayer#197
Browse files Browse the repository at this point in the history
The stream was waiting for the buffer to sync up, but a stream never has a 'end' value.

With the 'if' I feel confident that it will not affect normal mp4 playing.
  • Loading branch information
Simon Rodriguez committed Sep 13, 2014
1 parent 05cb614 commit 6bce06d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions actionscript/happyworm/jPlayer/JplayerMp4.as
Expand Up @@ -342,6 +342,7 @@ package happyworm.jPlayer {
}
public function getLoadRatio():Number {
if((myStatus.isLoading || myStatus.isLoaded) && myStream.bytesTotal > 0) {
if( myStream.bytesTotal == uint.MAX_VALUE && myStream.bytesLoaded > 2048 ) return 1; //Hackfix for AAC+ streams. 2048 is just a randomly selected number.
return myStream.bytesLoaded / myStream.bytesTotal;
} else {
return 0;
Expand Down

0 comments on commit 6bce06d

Please sign in to comment.