您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

JitsiTrackErrors.js 1.5KB

12345678910111213141516171819202122232425262728293031323334353637
  1. module.exports = {
  2. /**
  3. * Returns JitsiTrackErrors based on the error object passed by GUM
  4. * @param error the error
  5. * @param {Array} devices Array with the requested devices
  6. */
  7. parseError: function (error, devices) {
  8. devices = devices || [];
  9. if (typeof error == "object" && error.constraintName && error.name
  10. && (error.name == "ConstraintNotSatisfiedError" ||
  11. error.name == "OverconstrainedError") &&
  12. (error.constraintName == "minWidth" ||
  13. error.constraintName == "maxWidth" ||
  14. error.constraintName == "minHeight" ||
  15. error.constraintName == "maxHeight") &&
  16. devices.indexOf("video") !== -1) {
  17. return this.UNSUPPORTED_RESOLUTION;
  18. } else if(typeof error === "object" && error.type === "jitsiError") {
  19. return error.errorObject;
  20. } else {
  21. return this.GENERAL;
  22. }
  23. },
  24. UNSUPPORTED_RESOLUTION: "gum.unsupported_resolution",
  25. /**
  26. * An event which indicates that the jidesha extension for Firefox is
  27. * needed to proceed with screen sharing, and that it is not installed.
  28. */
  29. FIREFOX_EXTENSION_NEEDED: "gum.firefox_extension_needed",
  30. CHROME_EXTENSION_INSTALLATION_ERROR:
  31. "gum.chrome_extension_installation_error",
  32. CHROME_EXTENSION_USER_CANCELED:
  33. "gum.chrome_extension_user_canceled",
  34. GENERAL: "gum.general",
  35. TRACK_IS_DISPOSED: "track.track_is_disposed",
  36. TRACK_MUTE_UNMUTE_IN_PROGRESS: "track.mute_unmute_inprogress"
  37. };