Changeset 1223
- Timestamp:
- 08/18/10 18:52:22 (3 years ago)
- Location:
- trunk/fl5
- Files:
-
- 4 edited
-
player.swf (modified) (previous)
-
src/com/longtailvideo/jwplayer/media/SoundMediaProvider.as (modified) (2 diffs)
-
src/com/longtailvideo/jwplayer/player/JavascriptAPI.as (modified) (4 diffs)
-
src/com/longtailvideo/jwplayer/player/PlayerVersion.as (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/fl5/src/com/longtailvideo/jwplayer/media/SoundMediaProvider.as
r1135 r1223 8 8 import com.longtailvideo.jwplayer.model.PlaylistItem; 9 9 import com.longtailvideo.jwplayer.player.PlayerState; 10 import com.longtailvideo.jwplayer.utils.Logger; 10 11 11 12 import flash.events.*; … … 133 134 /** Interval for the _position progress **/ 134 135 protected function positionHandler(progressEvent:ProgressEvent=null):void { 135 var bufferPercent:Number; 136 137 if (_sound.bytesTotal > 0 && _sound.bytesLoaded / _sound.bytesTotal > 0.1 && (_item.duration <= 0 || _userDuration < 0)) { 138 _item.duration = _sound.length / 1000 / _sound.bytesLoaded * _sound.bytesTotal; 139 } 140 141 if (_channel && _sound && _sound.bytesTotal > 0) { 136 var bufferPercent:Number = 0; 137 138 if (_item.duration <= 0 || _userDuration < 0) { 139 if (_sound.bytesTotal > 0 && _sound.bytesLoaded / _sound.bytesTotal > 0.1) { 140 _item.duration = _sound.length / 1000 / _sound.bytesLoaded * _sound.bytesTotal; 141 } else if (_sound.length > 0) { 142 _item.duration = _sound.length / 1000; 143 } 144 } 145 146 if (_channel && _sound) { 142 147 _position = Math.round(_channel.position / 100) / 10; 143 bufferPercent = Math.floor(_sound.bytesLoaded / _sound.bytesTotal * 100); 148 if (_sound.bytesTotal > 0) { 149 bufferPercent = Math.floor(_sound.bytesLoaded / _sound.bytesTotal * 100); 150 } 144 151 } else if (!_channel && progressEvent && progressEvent.bytesTotal > 0) { 145 152 bufferPercent = Math.floor(progressEvent.bytesLoaded / progressEvent.bytesTotal * 100); 146 } else { 147 bufferPercent = 0; 148 } 149 150 if (_sound.isBuffering == true && _sound.bytesTotal > _sound.bytesLoaded) { 151 if (state != PlayerState.BUFFERING) { 152 _bufferFull = false; 153 if (_channel) { 154 _channel.stop(); 155 } 156 if (!progressEvent) { 157 setState(PlayerState.BUFFERING); 158 } 159 } 153 } 154 155 156 if (state == PlayerState.PLAYING && _sound.isBuffering == true) { 157 // Buffer underrun condition 158 _bufferFull = false; 159 setState(PlayerState.BUFFERING); 160 return 160 161 } else if (state == PlayerState.BUFFERING && _sound.bytesLoaded > 0 && !_bufferFull) { 161 162 _bufferFull = true; 162 163 sendMediaEvent(MediaEvent.JWPLAYER_MEDIA_BUFFER_FULL); 163 164 } 164 165 165 166 166 if (!isNaN(bufferPercent) && !_bufferingComplete){ -
trunk/fl5/src/com/longtailvideo/jwplayer/player/JavascriptAPI.as
r1214 r1223 8 8 import com.longtailvideo.jwplayer.utils.JavascriptSerialization; 9 9 import com.longtailvideo.jwplayer.utils.Logger; 10 import com.longtailvideo.jwplayer.utils.RootReference; 10 11 import com.longtailvideo.jwplayer.utils.Strings; 11 12 … … 176 177 if (evt.bufferPercent >= 0) returnObj.bufferPercent = evt.bufferPercent; 177 178 if (evt.duration >= 0) returnObj.duration = evt.duration; 178 if (evt.message != undefined)returnObj.message = evt.message;179 if (evt.message != "") returnObj.message = evt.message; 179 180 if (evt.metadata != null) returnObj.metadata = evt.metadata; 180 181 if (evt.offset >= 0) returnObj.offset = evt.offset; … … 218 219 219 220 protected function js_getHeight():Number { 220 return _player.config.height;221 return RootReference.stage.stageHeight; 221 222 } 222 223 … … 246 247 247 248 protected function js_getWidth():Number { 248 return _player.config.width;249 return RootReference.stage.stageWidth; 249 250 } 250 251 -
trunk/fl5/src/com/longtailvideo/jwplayer/player/PlayerVersion.as
r1214 r1223 3 3 4 4 public class PlayerVersion { 5 protected static var _version:String = "5.3.12 14";5 protected static var _version:String = "5.3.1223"; 6 6 7 7 public static function get version():String {
Note: See TracChangeset
for help on using the changeset viewer.
