Skip to content

Commit

Permalink
Rename Open Media Streamer(OMS) to Open WebRTC Toolkit(OWT).
Browse files Browse the repository at this point in the history
  • Loading branch information
jianjunz committed Feb 27, 2019
1 parent b052529 commit 92f6322
Show file tree
Hide file tree
Showing 24 changed files with 373 additions and 371 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ Run `grunt debug` in "scripts" folder and get files in "dist/sdk-debug".
Run `grunt jsdoc` in "scripts" folder and get docs in "dist/docs".

## How to contribute
We warmly welcome community contributions to Open Media Streamer JavaScript SDK repository. If you are willing to contribute your features and ideas to OMS, follow the process below:
We warmly welcome community contributions to Open WebRTC Toolkit JavaScript SDK repository. If you are willing to contribute your features and ideas to OWT, follow the process below:
- Make sure your patch will not break anything, including all the build and tests
- Submit a pull request onto https://github.com/open-media-streamer/oms-client-javascript/pulls
- Submit a pull request onto https://github.com/open-webrtc-toolkit/owt-client-javascript/pulls
- Watch your patch for review comments if any, until it is accepted and merged
OMS project is licensed under Apache License, Version 2.0. By contributing to the project, you agree to the license and copyright terms therein and release your contributions under these terms.
OWT project is licensed under Apache License, Version 2.0. By contributing to the project, you agree to the license and copyright terms therein and release your contributions under these terms.

## How to report issues
Use the "Issues" tab on Github.
Expand Down
12 changes: 6 additions & 6 deletions src/samples/conference/public/scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const runSocketIOSample = function() {

var subscribeForward = getParameterByName('forward') === 'true'?true:false;

conference = new Oms.Conference.ConferenceClient();
conference = new Owt.Conference.ConferenceClient();
function renderVideo(stream){
conference.subscribe(stream)
.then((subscriptions)=>{
Expand Down Expand Up @@ -107,14 +107,14 @@ const runSocketIOSample = function() {
startStreamingIn(myRoom, mediaUrl);
}
if (isPublish !== 'false') {
const audioConstraintsForMic = new Oms.Base.AudioTrackConstraints(Oms.Base.AudioSourceInfo.MIC);
const videoConstraintsForCamera = new Oms.Base.VideoTrackConstraints(Oms.Base.VideoSourceInfo.CAMERA);
const audioConstraintsForMic = new Owt.Base.AudioTrackConstraints(Owt.Base.AudioSourceInfo.MIC);
const videoConstraintsForCamera = new Owt.Base.VideoTrackConstraints(Owt.Base.VideoSourceInfo.CAMERA);
let mediaStream;
Oms.Base.MediaStreamFactory.createMediaStream(new Oms.Base.StreamConstraints(
Owt.Base.MediaStreamFactory.createMediaStream(new Owt.Base.StreamConstraints(
audioConstraintsForMic, videoConstraintsForCamera)).then(stream => {
mediaStream = stream;
localStream = new Oms.Base.LocalStream(
mediaStream, new Oms.Base.StreamSourceInfo(
localStream = new Owt.Base.LocalStream(
mediaStream, new Owt.Base.StreamSourceInfo(
'mic', 'camera'));
$('.local video').get(0).srcObject = stream;
conference.publish(localStream).then(publication => {
Expand Down
14 changes: 7 additions & 7 deletions src/samples/p2p/peercall.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ <h2>ScreenView</h2>
const signaling = new SignalingChannel();
let publicationForCamera;
let publicationForScreen;
var p2p = new Oms.P2P.P2PClient({
var p2p = new Owt.P2P.P2PClient({
audioEncodings: true,
videoEncodings: [{codec:{name: 'h264'}}, {codec: {name: 'vp9'}}, {codec: {name: 'vp8'}}],
rtcConfiguration:{
Expand Down Expand Up @@ -153,9 +153,9 @@ <h2>ScreenView</h2>
extensionId:'pndohhifhheefbpeljcmnhnkphepimhe'
}
let mediaStream;
Oms.Base.MediaStreamFactory.createMediaStream(config).then(stream => {
Owt.Base.MediaStreamFactory.createMediaStream(config).then(stream => {
mediaStream = stream;
ScreenStream = new Oms.Base.LocalStream(mediaStream, new Oms.Base.StreamSourceInfo('screen-cast', 'screen-cast'));
ScreenStream = new Owt.Base.LocalStream(mediaStream, new Owt.Base.StreamSourceInfo('screen-cast', 'screen-cast'));
$('#local').children('video').get(0).srcObject = ScreenStream.mediaStream;
p2p.publish(getTargetId(), ScreenStream).then(publication=>{
publicationForScreen = publication;
Expand Down Expand Up @@ -187,12 +187,12 @@ <h2>ScreenView</h2>
console.log('Failed to share video.');
}); // Publish local stream to remote client
} else {
const audioConstraintsForMic = new Oms.Base.AudioTrackConstraints(Oms.Base.AudioSourceInfo.MIC);
const videoConstraintsForCamera = new Oms.Base.VideoTrackConstraints(Oms.Base.VideoSourceInfo.CAMERA);
const audioConstraintsForMic = new Owt.Base.AudioTrackConstraints(Owt.Base.AudioSourceInfo.MIC);
const videoConstraintsForCamera = new Owt.Base.VideoTrackConstraints(Owt.Base.VideoSourceInfo.CAMERA);
let mediaStream;
Oms.Base.MediaStreamFactory.createMediaStream(new Oms.Base.StreamConstraints(audioConstraintsForMic, videoConstraintsForCamera)).then(stream=>{
Owt.Base.MediaStreamFactory.createMediaStream(new Owt.Base.StreamConstraints(audioConstraintsForMic, videoConstraintsForCamera)).then(stream=>{
mediaStream=stream;
localStream = new Oms.Base.LocalStream(mediaStream, new Oms.Base.StreamSourceInfo('mic', 'camera'));
localStream = new Owt.Base.LocalStream(mediaStream, new Owt.Base.StreamSourceInfo('mic', 'camera'));
$('#local').children('video').get(0).srcObject = localStream.mediaStream;
p2p.publish(getTargetId(), localStream).then(publication=>{
publicationForCamera = publication;
Expand Down
34 changes: 17 additions & 17 deletions src/sdk/base/codec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const AudioCodec = {
};
/**
* @class AudioCodecParameters
* @memberOf Oms.Base
* @memberOf Owt.Base
* @classDesc Codec parameters for an audio track.
* @hideconstructor
*/
Expand All @@ -26,21 +26,21 @@ export class AudioCodecParameters {
constructor(name, channelCount, clockRate) {
/**
* @member {string} name
* @memberof Oms.Base.AudioCodecParameters
* @memberof Owt.Base.AudioCodecParameters
* @instance
* @desc Name of a codec. Please a value in Oms.Base.AudioCodec. However, some functions do not support all the values in Oms.Base.AudioCodec.
* @desc Name of a codec. Please a value in Owt.Base.AudioCodec. However, some functions do not support all the values in Owt.Base.AudioCodec.
*/
this.name = name;
/**
* @member {?number} channelCount
* @memberof Oms.Base.AudioCodecParameters
* @memberof Owt.Base.AudioCodecParameters
* @instance
* @desc Numbers of channels for an audio track.
*/
this.channelCount = channelCount;
/**
* @member {?number} clockRate
* @memberof Oms.Base.AudioCodecParameters
* @memberof Owt.Base.AudioCodecParameters
* @instance
* @desc The codec clock rate expressed in Hertz.
*/
Expand All @@ -50,23 +50,23 @@ export class AudioCodecParameters {

/**
* @class AudioEncodingParameters
* @memberOf Oms.Base
* @memberOf Owt.Base
* @classDesc Encoding parameters for sending an audio track.
* @hideconstructor
*/
export class AudioEncodingParameters {
// eslint-disable-next-line require-jsdoc
constructor(codec, maxBitrate) {
/**
* @member {?Oms.Base.AudioCodecParameters} codec
* @member {?Owt.Base.AudioCodecParameters} codec
* @instance
* @memberof Oms.Base.AudioEncodingParameters
* @memberof Owt.Base.AudioEncodingParameters
*/
this.codec = codec;
/**
* @member {?number} maxBitrate
* @instance
* @memberof Oms.Base.AudioEncodingParameters
* @memberof Owt.Base.AudioEncodingParameters
* @desc Max bitrate expressed in kbps.
*/
this.maxBitrate = maxBitrate;
Expand All @@ -82,7 +82,7 @@ export const VideoCodec = {

/**
* @class VideoCodecParameters
* @memberOf Oms.Base
* @memberOf Owt.Base
* @classDesc Codec parameters for a video track.
* @hideconstructor
*/
Expand All @@ -91,14 +91,14 @@ export class VideoCodecParameters {
constructor(name, profile) {
/**
* @member {string} name
* @memberof Oms.Base.VideoCodecParameters
* @memberof Owt.Base.VideoCodecParameters
* @instance
* @desc Name of a codec.Please a value in Oms.Base.AudioCodec.However, some functions do not support all the values in Oms.Base.AudioCodec.
* @desc Name of a codec. Please a value in Owt.Base.AudioCodec. However, some functions do not support all the values in Owt.Base.AudioCodec.
*/
this.name = name;
/**
* @member {?string} profile
* @memberof Oms.Base.VideoCodecParameters
* @memberof Owt.Base.VideoCodecParameters
* @instance
* @desc The profile of a codec. Profile may not apply to all codecs.
*/
Expand All @@ -108,23 +108,23 @@ export class VideoCodecParameters {

/**
* @class VideoEncodingParameters
* @memberOf Oms.Base
* @memberOf Owt.Base
* @classDesc Encoding parameters for sending a video track.
* @hideconstructor
*/
export class VideoEncodingParameters {
// eslint-disable-next-line require-jsdoc
constructor(codec, maxBitrate) {
/**
* @member {?Oms.Base.VideoCodecParameters} codec
* @member {?Owt.Base.VideoCodecParameters} codec
* @instance
* @memberof Oms.Base.VideoEncodingParameters
* @memberof Owt.Base.VideoEncodingParameters
*/
this.codec = codec;
/**
* @member {?number} maxBitrate
* @instance
* @memberof Oms.Base.VideoEncodingParameters
* @memberof Owt.Base.VideoEncodingParameters
* @desc Max bitrate expressed in kbps.
*/
this.maxBitrate = maxBitrate;
Expand Down
42 changes: 21 additions & 21 deletions src/sdk/base/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
/**
* @class EventDispatcher
* @classDesc A shim for EventTarget. Might be changed to EventTarget later.
* @memberof Oms.Base
* @memberof Owt.Base
* @hideconstructor
*/
export const EventDispatcher = function() {
Expand All @@ -44,7 +44,7 @@ export const EventDispatcher = function() {
* @function addEventListener
* @desc This function registers a callback function as a handler for the corresponding event. It's shortened form is on(eventType, listener). See the event description in the following table.
* @instance
* @memberof Oms.Base.EventDispatcher
* @memberof Owt.Base.EventDispatcher
* @param {string} eventType Event string.
* @param {function} listener Callback function.
*/
Expand All @@ -59,7 +59,7 @@ export const EventDispatcher = function() {
* @function removeEventListener
* @desc This function removes a registered event listener.
* @instance
* @memberof Oms.Base.EventDispatcher
* @memberof Owt.Base.EventDispatcher
* @param {string} eventType Event string.
* @param {function} listener Callback function.
*/
Expand All @@ -77,7 +77,7 @@ export const EventDispatcher = function() {
* @function clearEventListener
* @desc This function removes all event listeners for one type.
* @instance
* @memberof Oms.Base.EventDispatcher
* @memberof Owt.Base.EventDispatcher
* @param {string} eventType Event string.
*/
this.clearEventListener = function(eventType) {
Expand All @@ -97,12 +97,12 @@ export const EventDispatcher = function() {
};

/**
* @class OmsEvent
* @classDesc Class OmsEvent represents a generic Event in the library.
* @memberof Oms.Base
* @class OwtEvent
* @classDesc Class OwtEvent represents a generic Event in the library.
* @memberof Owt.Base
* @hideconstructor
*/
export class OmsEvent {
export class OwtEvent {
// eslint-disable-next-line require-jsdoc
constructor(type) {
this.type = type;
Expand All @@ -112,31 +112,31 @@ export class OmsEvent {
/**
* @class MessageEvent
* @classDesc Class MessageEvent represents a message Event in the library.
* @memberof Oms.Base
* @memberof Owt.Base
* @hideconstructor
*/
export class MessageEvent extends OmsEvent {
export class MessageEvent extends OwtEvent {
// eslint-disable-next-line require-jsdoc
constructor(type, init) {
super(type);
/**
* @member {string} origin
* @instance
* @memberof Oms.Base.MessageEvent
* @memberof Owt.Base.MessageEvent
* @desc ID of the remote endpoint who published this stream.
*/
this.origin = init.origin;
/**
* @member {string} message
* @instance
* @memberof Oms.Base.MessageEvent
* @memberof Owt.Base.MessageEvent
*/
this.message = init.message;
/**
* @member {string} to
* @instance
* @memberof Oms.Base.MessageEvent
* @desc Values could be "all", "me" in conference mode, or undefined in P2P mode.
* @memberof Owt.Base.MessageEvent
* @desc Values could be "all", "me" in conference mode, or undefined in P2P mode..
*/
this.to = init.to;
}
Expand All @@ -145,17 +145,17 @@ export class MessageEvent extends OmsEvent {
/**
* @class ErrorEvent
* @classDesc Class ErrorEvent represents an error Event in the library.
* @memberof Oms.Base
* @memberof Owt.Base
* @hideconstructor
*/
export class ErrorEvent extends OmsEvent {
export class ErrorEvent extends OwtEvent {
// eslint-disable-next-line require-jsdoc
constructor(type, init) {
super(type);
/**
* @member {Error} error
* @instance
* @memberof Oms.Base.ErrorEvent
* @memberof Owt.Base.ErrorEvent
*/
this.error = init.error;
}
Expand All @@ -164,17 +164,17 @@ export class ErrorEvent extends OmsEvent {
/**
* @class MuteEvent
* @classDesc Class MuteEvent represents a mute or unmute event.
* @memberof Oms.Base
* @memberof Owt.Base
* @hideconstructor
*/
export class MuteEvent extends OmsEvent {
export class MuteEvent extends OwtEvent {
// eslint-disable-next-line require-jsdoc
constructor(type, init) {
super(type);
/**
* @member {Oms.Base.TrackKind} kind
* @member {Owt.Base.TrackKind} kind
* @instance
* @memberof Oms.Base.MuteEvent
* @memberof Owt.Base.MuteEvent
*/
this.kind = init.kind;
}
Expand Down
12 changes: 6 additions & 6 deletions src/sdk/base/mediaformat.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'use strict';
/**
* Source info about an audio track. Values: 'mic', 'screen-cast', 'file', 'mixed'.
* @memberOf Oms.Base
* @memberOf Owt.Base
* @readonly
* @enum {string}
*/
Expand All @@ -18,7 +18,7 @@ export const AudioSourceInfo = {

/**
* Source info about a video track. Values: 'camera', 'screen-cast', 'file', 'mixed'.
* @memberOf Oms.Base
* @memberOf Owt.Base
* @readonly
* @enum {string}
*/
Expand All @@ -31,7 +31,7 @@ export const VideoSourceInfo = {

/**
* Kind of a track. Values: 'audio' for audio track, 'video' for video track, 'av' for both audio and video tracks.
* @memberOf Oms.Base
* @memberOf Owt.Base
* @readonly
* @enum {string}
*/
Expand All @@ -54,7 +54,7 @@ export const TrackKind = {
};
/**
* @class Resolution
* @memberOf Oms.Base
* @memberOf Owt.Base
* @classDesc The Resolution defines the size of a rectangle.
* @constructor
* @param {number} width
Expand All @@ -66,13 +66,13 @@ export class Resolution {
/**
* @member {number} width
* @instance
* @memberof Oms.Base.Resolution
* @memberof Owt.Base.Resolution
*/
this.width = width;
/**
* @member {number} height
* @instance
* @memberof Oms.Base.Resolution
* @memberof Owt.Base.Resolution
*/
this.height = height;
}
Expand Down
Loading

0 comments on commit 92f6322

Please sign in to comment.