mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-16 16:16:40 +03:00
b27ea82e7f
This adds attach/detach methods to replace the media element in the Player constructor. Now applications can take back control of the media element or provide a reference later in the Player's life cycle. This also allows applications to decide whether or not to set up MediaSource in advance, through an optional argument on attach and unload. The default will be to set up MediaSource in advance, which maintains current behavior. This advanced setup of MediaSource can improve load latency later. This change also introduces async/await for the first time in the project, which required changes to eslint config, Closure build arguments, Babel & Babel-polyfill setup, and the esprima parser used by our extern generator. The use of async/await will improve readability in many places, and these infrastructure changes to enable async/await should also unblock issues #1336 and #1337. Closes #1087 Change-Id: I0d6b4e0e2af27a6520a3d070fa92b7139b2cb8b0