optionInterfaces.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. export interface AnswerOption {
  2. /**
  3. * Function which runs before create answer to modify sdp answer message.
  4. */
  5. sdpTransform?: Function;
  6. }
  7. export interface PeerJSOption {
  8. key?: string;
  9. host?: string;
  10. port?: number;
  11. path?: string;
  12. secure?: boolean;
  13. token?: string;
  14. config?: RTCConfiguration;
  15. debug?: number;
  16. referrerPolicy?: ReferrerPolicy;
  17. }
  18. export interface PeerConnectOption {
  19. /**
  20. * A unique label by which you want to identify this data connection.
  21. * If left unspecified, a label will be generated at random.
  22. *
  23. * Can be accessed with {@apilink DataConnection.label}
  24. */
  25. label?: string;
  26. /**
  27. * Metadata associated with the connection, passed in by whoever initiated the connection.
  28. *
  29. * Can be accessed with {@apilink DataConnection.metadata}.
  30. * Can be any serializable type.
  31. */
  32. metadata?: any;
  33. serialization?: string;
  34. reliable?: boolean;
  35. }
  36. export interface CallOption {
  37. /**
  38. * Metadata associated with the connection, passed in by whoever initiated the connection.
  39. *
  40. * Can be accessed with {@apilink MediaConnection.metadata}.
  41. * Can be any serializable type.
  42. */
  43. metadata?: any;
  44. /**
  45. * Function which runs before create offer to modify sdp offer message.
  46. */
  47. sdpTransform?: Function;
  48. }