Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

JitsiTrack.js 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /**
  2. * Represents a single media track (either audio or video).
  3. * @constructor
  4. */
  5. function JitsiTrack(stream)
  6. {
  7. this.stream = stream;
  8. }
  9. /**
  10. * JitsiTrack video type.
  11. * @type {string}
  12. */
  13. JitsiTrack.VIDEO = "video";
  14. /**
  15. * JitsiTrack audio type.
  16. * @type {string}
  17. */
  18. JitsiTrack.AUDIO = "audio";
  19. /**
  20. * Returns the type (audio or video) of this track.
  21. */
  22. JitsiTrack.prototype.getType = function() {
  23. return this.stream.type;
  24. };
  25. /**
  26. * @returns {JitsiParticipant} to which this track belongs, or null if it is a local track.
  27. */
  28. JitsiTrack.prototype.getParitcipant = function() {
  29. };
  30. /**
  31. * Returns the RTCMediaStream from the browser (?).
  32. */
  33. JitsiTrack.prototype.getOriginalStream = function() {
  34. return this.stream.getOriginalStream();
  35. }
  36. /**
  37. * Mutes the track.
  38. */
  39. JitsiTrack.prototype.mute = function () {
  40. this.stream.setMute(true);
  41. }
  42. /**
  43. * Unmutes the stream.
  44. */
  45. JitsiTrack.prototype.unmute = function () {
  46. this.stream.setMute(false);
  47. }
  48. /**
  49. * Attaches the MediaStream of this track to an HTML container (?).
  50. * @param container the HTML container
  51. */
  52. JitsiTrack.prototype.attach = function (container) {
  53. }
  54. /**
  55. * Removes the track from the passed HTML container.
  56. * @param container the HTML container
  57. */
  58. JitsiTrack.prototype.detach = function (container) {
  59. }
  60. /**
  61. * Stops sending the media track. And removes it from the HTML.
  62. * NOTE: Works for local tracks only.
  63. */
  64. JitsiTrack.prototype.stop = function () {
  65. }
  66. /**
  67. * Starts sending the track.
  68. * NOTE: Works for local tracks only.
  69. */
  70. JitsiTrack.prototype.start = function() {
  71. }
  72. /**
  73. * Returns true if this is a video track and the source of the video is a
  74. * screen capture as opposed to a camera.
  75. */
  76. JitsiTrack.prototype.isScreenSharing = function(){
  77. }
  78. module.exports = JitsiTrack;