let constPlayer: any = {
  startPlayOnTimeCheckRef: false,
  playerModeRef: 'video',
  playerTimeRef: 0,
  playRecordRef: {},
  isHandlePlayerToTimeEmit: false,
  stopListenPlayStatusChange: false,
  playerStatusRef: {
    volume: 0.5, // 音量大小
    muted: false, // 是否静音
    rate: 1, // 播放速率
    skipBlankSegment: false, // 是否跳过空白片段
  },
  playerPlayingRef: false, // 播放器是否正在播放(播放器切换时候需要同步)
};

const setPlayerData = (key, val) => {
  constPlayer[key] = val;
};

const getPlayerData = (key) => {
  return constPlayer[key];
};

const destroyPlayerData = () => {
  constPlayer = {};
};

export { setPlayerData, getPlayerData, destroyPlayerData };
