nttcom / SkyWay-MultiParty

[Deprecated] This is a library for easy implementation of group video chat.
18 stars 15 forks source link

create interface to change video parameter #21

Open KensakuKOMATSU opened 8 years ago

KensakuKOMATSU commented 8 years ago

as shown below, currently there is no feature to set video parameter (video resolution etc.)

// video stream 取得開始
  MultiParty_.prototype.startMyStream_ = function() {
    var self = this;

    navigator.getUserMedia_({"video": self.opts.video_stream, "audio": self.opts.audio_stream},
      function(stream) {
        if(self.opts.audio_stream){
          self.tracks_.audio = stream.getAudioTracks()[0];
        }

        if(self.opts.video_stream){
          self.tracks_.video = stream.getVideoTracks()[0];
        }

        self.stream = stream;

        self.fire_('my_ms', {"src": URL.createObjectURL(self.stream), "id": self.opts.id});
        self.startCall_();

      }, function(err) {
        self.fire_('error', err)
      }
    );
  }
KensakuKOMATSU commented 8 years ago

misunderstood .... it support video parameter with adapter.js

ex.

{
  ...
  video: {
        width: { min: 1024, ideal: 1280, max: 1920 },
        height: { min: 576, ideal: 720, max: 1080 },
  }
}
KensakuKOMATSU commented 8 years ago

need to update readme.md.