tal icon indicating copy to clipboard operation
tal copied to clipboard

Mediaplayer `getSeekableRange` method throws TypeError

Open sanderlooijenga opened this issue 8 years ago • 1 comments

Hi guys,

In theory the use of the getSeekableRange method in the 'antie/devices/mediaplayer/mediaplayer' could resolve in a TypeError, because it could possibly return undefined (e.g. see getSeekableRange method in 'antie/devices/mediaplayer/html5'). In some methods (like _getClampedTime) it's expected that the getSeekableRange method returns an object containing start and end as keys. Therefore referencing these keys while undefined is being returned, results in a TypeError.

Is there something we should do about this?

Kind regards,

Sander Looijenga 24i

sanderlooijenga avatar Dec 29 '16 09:12 sanderlooijenga

Hi Sander,

Good spot!

I think we are protected by the fact that we only utilise the seekable range when we know it is available. For example, in HTML5 we do not make any calls to _getClampedTime until we have received the loadedmetadata event.

However, I agree that it would be a good thing to protect against this, perhaps by defaulting range to start: undefined, end: undefined?

Tom

tsadler1988 avatar Jan 05 '17 12:01 tsadler1988

We have deprecated this project and there are no plans for active development going forward. Therefore this bug will not be fixed.

Please see the deprecation notice.

kukulaka avatar Jan 04 '23 17:01 kukulaka