MediaControls update() now more resilient to invalid data provided (including invalid data types)
update() now rounds data into the valid range if the value provided is the valid type, but beyond the valid range.
e.g. if a currentTime of -1 is given, it will be rounded to 0.
MediaControls slider functions now use parseFloat() to sanitize the data before calling the appropriate logical functions
Changes:
update()
now more resilient to invalid data provided (including invalid data types)update()
now rounds data into the valid range if the value provided is the valid type, but beyond the valid range. e.g. if acurrentTime
of-1
is given, it will be rounded to0
.parseFloat()
to sanitize the data before calling the appropriate logical functions