"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.canRequestBackgroundPlaybackByPlayerType=exports.canRequestAnyBackgroundPlaybackContext=void 0;var BACKGROUND_PLAYBACK_CAN_I_USE_KEY={VIDEO:"VideoContext.requestBackgroundPlayback",LIVE_PLAYER:"LivePlayerContext.requestBackgroundPlayback"},canIUseBackgroundPlayback=function(a){var e;if("function"!=typeof(null===(e=wx)||void 0===e?void 0:e.canIUse))return!1;try{return!!wx.canIUse(a)}catch(a){return!1}},canRequestBackgroundPlaybackByPlayerType=function(a){return"live-player"===a?canIUseBackgroundPlayback(BACKGROUND_PLAYBACK_CAN_I_USE_KEY.LIVE_PLAYER):"video"===a&&canIUseBackgroundPlayback(BACKGROUND_PLAYBACK_CAN_I_USE_KEY.VIDEO)};exports.canRequestBackgroundPlaybackByPlayerType=canRequestBackgroundPlaybackByPlayerType;var canRequestAnyBackgroundPlaybackContext=function(){return canIUseBackgroundPlayback(BACKGROUND_PLAYBACK_CAN_I_USE_KEY.VIDEO)||canIUseBackgroundPlayback(BACKGROUND_PLAYBACK_CAN_I_USE_KEY.LIVE_PLAYER)};exports.canRequestAnyBackgroundPlaybackContext=canRequestAnyBackgroundPlaybackContext;