sampotts / plyr

A simple HTML5, YouTube and Vimeo player
https://plyr.io
MIT License
26.38k stars 2.92k forks source link

IE browser Set the plyr.source Enter the event ended #1008

Open An0nymous0 opened 6 years ago

An0nymous0 commented 6 years ago

Expected behaviour

Set the plyr.source,Do not enter the event ended

Actual behaviour

IE browser Set the plyr.source Enter the event ended

Environment

Steps to reproduce

1. this.plyrInstances.on('ended', () => { alert(1) });

2. this.plyrInstances.source = { type: 'video', title: 'video', sources: [{ src:'xx.mp4', type: 'video/mp4' }, ], }

-

friday commented 6 years ago

I think this could be another symptom of the same issue described in #1001

drsmall commented 6 years ago

I'm also experiencing this issue. I don't think it has anything to do with #1001. That error is about destroying the Plyr instance and using youtube. Our issue is that simply changing the source to a different mp4 is triggering the "onEnded" event, which it should not.

friday commented 6 years ago

Changing the source calls destroy(), which calls stop(). Calling stop() from destroy() is the problem in both cases as I see it. I haven't tried this though. I just read the code.

drsmall commented 6 years ago

Note that this only happens in IE. (I've seen it happen in IE11 and Edge)

friday commented 6 years ago

Alright! I could be wrong. Wouldn't be the first time.

friday commented 6 years ago

Added the label "Help wanted". If this issue is important to you, then please help us out. We have a lot of users, but few contributors.

nickngqs commented 6 years ago

Im getting this issue as well. On Edge, ended event is trigger when source changes. Any idea where to look for in the source code?