Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(vgMedia): playPromise failures now remove the playPromise referen…
…ce to play can be attempted aga playPromise attempts that are rejected drop into the catch block and were not clearing the playPromise reference causing all subsequent attempts to play the media to fail. The initial if-statement checks for the existence of a playPromise and returns out if it currently exists. This meant that autoplay videos rejected by Safari or Chrome could not be played, even by clicking the play button. This change nulls out of the playPromise reference with both successful and unsuccessful play attempts allowing future calls to play() (for example, during a click event of the play button) the possiblity to succeed. #724
- Loading branch information