mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-26 17:46:26 +03:00
698d4e5694
It is sometimes useful to load Shaka Player in nodejs, particularly a debug build, to access some internal part of Shaka Player in a nodejs script. For example, I am currently working on an MP4 box transformation for Shaka, but I am doing the R&D in node on the command line rather than in a browser. For this setup to work, Shaka should not refer to browser-specific classes and APIs at load-time. Thankfully, shaka.util.Lazy gives us an easy way to lazy-load those things so that they are not needed at load-time at all. This change uses shaka.util.Lazy to defer a reference to HTMLMediaElement in shaka.util.MediaReadyState. Tangentially related to #2759 Change-Id: I376d2a81cb45e7cbc94be0a88deab3abb08001bf