UNPKG

rx-player

Version:
20 lines (19 loc) 830 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = shouldWaitForHaveEnoughData; var browser_detection_1 = require("./browser_detection"); /** * An `HTMLMediaElement`'s readyState allows the browser to communicate whether * it can play a content reliably. * Usually, we may consider that a `HAVE_FUTURE_DATA` (readyState `3`) or even * a `HAVE_CURRENT_DATA` (readyState `2`) is enough to begin playing the content * and consider it as loaded. * * However some devices wrongly anounce those readyStates before being actually * able to decode the content. For those devices we wait for the * `HAVE_ENOUGH_DATA` readyState before considering the content as loaded. * @returns {boolean} */ function shouldWaitForHaveEnoughData() { return browser_detection_1.isPlayStation5; }