Prevent the audio track playback percentage from being set to INFINITY
if the track position appears to be INFINITY. This can happen before the
track starts playing.
Description
There already exists code to set the 'track position' metadata to 0 if the track position is INFINITY or not a number. The key is to do that before the playback percentage is calculated. The playback percentage is ultimately serialised to JSON, and if that value is INFINITY, the plugin will crash.
Related Issue
4
Motivation and Context
Streaming tracks from SoundCloud on iOS can produce a playback position of INFINITY before the track starts playing. This can cause the entire app to crash.
How Has This Been Tested?
Before and after test on a live device with multiple SoundCloud tracks
Prevent the audio track playback percentage from being set to INFINITY if the track position appears to be INFINITY. This can happen before the track starts playing.
Description
There already exists code to set the 'track position' metadata to 0 if the track position is INFINITY or not a number. The key is to do that before the playback percentage is calculated. The playback percentage is ultimately serialised to JSON, and if that value is INFINITY, the plugin will crash.
Related Issue
4
Motivation and Context
Streaming tracks from SoundCloud on iOS can produce a playback position of INFINITY before the track starts playing. This can cause the entire app to crash.
How Has This Been Tested?
Before and after test on a live device with multiple SoundCloud tracks
Screenshots (if appropriate):
None appropriate, but logs before:
Logs after:
Types of changes
Checklist: