Closed germain-gg closed 5 years ago
Good spot! Good timing too as this fixes https://github.com/bbc/VideoContext/issues/135
Is
_endOnLastSourceEnd
no longer set?VideoContext/src/videocontext.js
Line 864 in 9310f43
if (this._currentTime > this.duration && this._endOnLastSourceEnd) {
Oops, you're right! on Line 67 I set this.endOnLastSourceEnd
but this is incorrect. It should be with a dangling underscore.
Thanks for the heads up, this is now fixed
Yeah, looks good to me!
I noticed that the way that options default were handled could be a bit problematic.
Essentially it is currently leveraging the ES6 default parameter feature. The big problem is that if you give an option hash that has only one of the option defined. All the other defaults will be lost. With this new approach we now take advantage of destructuring and default parameters.
I have also created a
VideoContext.EVENTS
hash that is aligned withVideoContext.STATE
.And last but not least, I have updated and fix some of the JSDoc comments. It still isn't perfect but I feel like that already hugely improve documentation.