Skip to content

Commit

Permalink
Release v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
童捷 authored and 童捷 committed Apr 19, 2022
1 parent e54f318 commit 4800b93
Show file tree
Hide file tree
Showing 523 changed files with 54,682 additions and 21,955 deletions.
326 changes: 32 additions & 294 deletions README.md

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions ReleaseNotes/release-notes-1.0.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# QNRTC-Uniapp Release Notes for 1.0.1

## 内容

- [简介](#简介)
- [功能](#功能)
- [问题反馈](#问题反馈)


## 简介

**QNRTC-Uniapp** 是基于 **[UNIAPP](https://uniapp.dcloud.io/)****[QNRTC-Android](https://developer.qiniu.com/rtc/8764/an-overview-of-the-android-sdk)** 以及 **[QNRTC-iOS](https://developer.qiniu.com/rtc/8830/an-overview-of-the-ios-sdk)** 三者所实现的。前端可通过 **QNRTC-Uniapp** 所提供的 JS 插件调用原生 Android 以及 iOS 的 RTC 接口来实现实时音视频通话。提供了包括美颜、滤镜、水印、音视频通话等多种功能,提供灵活的接口,支持高度定制以及二次开发。


## 功能
- 新增混音功能及相关事件

## 修复
- 修复部分事件返回数据为空的问题


## 问题反馈

当你遇到任何问题时,可以通过在 GitHub 的 repo 提交 ```issues``` 来反馈问题,请尽可能的描述清楚遇到的问题,如果有错误信息也一同附带,并且在 ```Labels``` 中指明类型为 bug 或者其他。

[通过这里查看已有的 issues 和提交 bug](https://github.com/pili-engineering/QNRTC-Uniapp/issues)
18 changes: 0 additions & 18 deletions api-extractor.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,14 @@ exports["default"] = RTCEngine_1["default"];
__exportStar(require("./enum/RTCEnum"), exports);
__exportStar(require("./interface/RTCInterface"), exports);
__exportStar(require("./RTCEvent"), exports);
__exportStar(require("./class/RTCClient"), exports);
__exportStar(require("./class/RTCCameraVideoTrack"), exports);
__exportStar(require("./class/RTCLocalAudioTrack"), exports);
__exportStar(require("./class/RTCLocalTrack"), exports);
__exportStar(require("./class/RTCLocalVideoTrack"), exports);
__exportStar(require("./class/RTCMicrophoneAudioTrack"), exports);
__exportStar(require("./class/RTCRemoteAudioTrack"), exports);
__exportStar(require("./class/RTCRemoteTrack"), exports);
__exportStar(require("./class/RTCRemoteVideoTrack"), exports);
__exportStar(require("./class/RTCScreenVideoTrack"), exports);
__exportStar(require("./class/RTCTrack"), exports);
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
"use strict";
exports.__esModule = true;
var QNRtcAudioMixer = uni.requireNativePlugin('QNRtcUniPlugin-QNRtcAudioMixer');
var QNRtcAudioMixer = uni.requireNativePlugin('QNRTC-UniPlugin-QNRtcAudioMixer');
var QNEvent = uni.requireNativePlugin('globalEvent');
var RTCAudioMixer = (function () {
function RTCAudioMixer(identifyID, url) {
this.variationList = ["onStateChanged"];
this.identifyID = identifyID;
this.url = url;
}
RTCAudioMixer.prototype.createAudioMixerCallback = function (name, listener) {
if (name === "onStateChanged") {
var variationCallback = function (params) {
if (params.state) {
listener(params);
}
};
return variationCallback;
}
};
RTCAudioMixer.prototype.on = function (name, listener) {
QNEvent.addEventListener(name, listener);
if (this.variationList.some(function (item) { return item === name; })) {
var callback = this.createAudioMixerCallback(name, listener);
QNEvent.addEventListener(name, callback);
}
else {
QNEvent.addEventListener(name, listener);
}
};
RTCAudioMixer.prototype.off = function (name, listener) {
QNEvent.removeEventListener(name, listener);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var __extends = (this && this.__extends) || (function () {
};
})();
exports.__esModule = true;
exports.QNCameraVideoTrack = void 0;
var RTCLocalVideoTrack_1 = require("./RTCLocalVideoTrack");
var QNRtcTrack = uni.requireNativePlugin('QNRTC-UniPlugin-QNRtcTrack');
var QNCameraVideoTrack = (function (_super) {
Expand Down Expand Up @@ -95,5 +96,5 @@ var QNCameraVideoTrack = (function (_super) {
return QNRtcTrack.clearWaterMark(this.identifyID);
};
return QNCameraVideoTrack;
}(RTCLocalVideoTrack_1["default"]));
exports["default"] = QNCameraVideoTrack;
}(RTCLocalVideoTrack_1.QNLocalVideoTrack));
exports.QNCameraVideoTrack = QNCameraVideoTrack;
142 changes: 79 additions & 63 deletions demo/js_sdk/QNRTC-UniPlugin-JS/QNRTC-UniPlugin-JS/class/RTCClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,49 @@ var __assign = (this && this.__assign) || function () {
return __assign.apply(this, arguments);
};
exports.__esModule = true;
exports.QNRTCClient = void 0;
var RTCEnum_1 = require("../enum/RTCEnum");
var RTCRemoteVideoTrack_1 = require("./RTCRemoteVideoTrack");
var RTCRemoteAudioTrack_1 = require("./RTCRemoteAudioTrack");
var QNRTCClient = uni.requireNativePlugin('QNRTC-UniPlugin-QNRtcClient');
var RTCLocalTrack_1 = require("./RTCLocalTrack");
var RTCClient = uni.requireNativePlugin('QNRTC-UniPlugin-QNRtcClient');
var QNEvent = uni.requireNativePlugin('globalEvent');
var RTCClient = (function () {
function RTCClient() {
var QNRTCClient = (function () {
function QNRTCClient() {
this.variationList = ['onUserPublished', 'onUserUnpublished', 'onVideoSubscribed', 'onAudioSubscribed'];
}
RTCClient.prototype.transformRTCTrack = function (trackList) {
QNRTCClient.prototype.transformRemoteRTCTrack = function (trackList) {
var result = [];
for (var _i = 0, trackList_1 = trackList; _i < trackList_1.length; _i++) {
var i = trackList_1[_i];
var config = __assign({ identifyID: i.trackID, raw: i }, i);
if (i.kind === RTCEnum_1.QNRTCTrackKind.audio) {
result.push(new RTCRemoteAudioTrack_1["default"](config));
result.push(new RTCRemoteAudioTrack_1.QNRemoteAudioTrack(config));
}
else {
result.push(new RTCRemoteVideoTrack_1["default"](config));
result.push(new RTCRemoteVideoTrack_1.QNRemoteVideoTrack(config));
}
}
return result;
};
RTCClient.prototype.createRemoteTrackDataCallback = function (listener) {
QNRTCClient.prototype.transformLocalRTCTrack = function (trackList) {
var result = [];
for (var _i = 0, trackList_2 = trackList; _i < trackList_2.length; _i++) {
var i = trackList_2[_i];
var config = __assign({ identifyID: i.trackID, userID: '', raw: i }, i);
if (i.kind === RTCEnum_1.QNRTCTrackKind.audio) {
result.push(new RTCLocalTrack_1.QNLocalTrack(config));
}
else {
result.push(new RTCLocalTrack_1.QNLocalTrack(config));
}
}
return result;
};
QNRTCClient.prototype.createRemoteTrackDataCallback = function (listener) {
var _this = this;
var variationCallback = function (params) {
var result = _this.transformRTCTrack(params.trackList);
var result = _this.transformRemoteRTCTrack(params.trackList);
var callbackData = {
remoteUserID: params.remoteUserID,
trackList: result
Expand All @@ -47,7 +63,7 @@ var RTCClient = (function () {
};
return variationCallback;
};
RTCClient.prototype.on = function (name, listener) {
QNRTCClient.prototype.on = function (name, listener) {
if (this.variationList.some(function (item) { return item === name; })) {
var callback = this.createRemoteTrackDataCallback(listener);
QNEvent.addEventListener(name, callback);
Expand All @@ -56,17 +72,17 @@ var RTCClient = (function () {
QNEvent.addEventListener(name, listener);
}
};
RTCClient.prototype.off = function (name, listener) {
QNRTCClient.prototype.off = function (name, listener) {
QNEvent.removeEventListener(name, listener);
};
RTCClient.prototype.join = function (token, userData) {
return QNRTCClient.join(token, userData);
QNRTCClient.prototype.join = function (token, userData) {
return RTCClient.join(token, userData);
};
RTCClient.prototype.leave = function () {
return QNRTCClient.leave();
QNRTCClient.prototype.leave = function () {
return RTCClient.leave();
};
RTCClient.prototype.publish = function (tracks, callback) {
return QNRTCClient.publish(tracks, function (_a) {
QNRTCClient.prototype.publish = function (tracks, callback) {
return RTCClient.publish(tracks, function (_a) {
var onPublished = _a.onPublished, data = _a.data, error = _a.error;
if (onPublished) {
var _loop_1 = function (key) {
Expand All @@ -79,44 +95,44 @@ var RTCClient = (function () {
_loop_1(key);
}
}
callback({ onPublished: onPublished, data: data, error: error });
callback(onPublished, error);
});
};
RTCClient.prototype.unpublish = function (tracks) {
return QNRTCClient.unpublish(tracks);
QNRTCClient.prototype.unpublish = function (tracks) {
return RTCClient.unpublish(tracks);
};
RTCClient.prototype.subscribe = function (tracks) {
return QNRTCClient.subscribe(tracks);
QNRTCClient.prototype.subscribe = function (tracks) {
return RTCClient.subscribe(tracks);
};
RTCClient.prototype.unsubscribe = function (tracks) {
return QNRTCClient.unsubscribe(tracks);
QNRTCClient.prototype.unsubscribe = function (tracks) {
return RTCClient.unsubscribe(tracks);
};
RTCClient.prototype.getSubscribedTracks = function (userID) {
var remoteTrack = QNRTCClient.getSubscribedTracks(userID);
return this.transformRTCTrack(remoteTrack);
QNRTCClient.prototype.getSubscribedTracks = function (userID) {
var remoteTrack = RTCClient.getSubscribedTracks(userID);
return this.transformRemoteRTCTrack(remoteTrack);
};
RTCClient.prototype.getLocalAudioTrackStats = function () {
return QNRTCClient.getLocalAudioTrackStats();
QNRTCClient.prototype.getLocalAudioTrackStats = function () {
return RTCClient.getLocalAudioTrackStats();
};
RTCClient.prototype.getLocalVideoTrackStats = function () {
return QNRTCClient.getLocalVideoTrackStats();
QNRTCClient.prototype.getLocalVideoTrackStats = function () {
return RTCClient.getLocalVideoTrackStats();
};
RTCClient.prototype.getRemoteAudioTrackStats = function () {
return QNRTCClient.getRemoteAudioTrackStats();
QNRTCClient.prototype.getRemoteAudioTrackStats = function () {
return RTCClient.getRemoteAudioTrackStats();
};
RTCClient.prototype.getRemoteVideoTrackStats = function () {
return QNRTCClient.getRemoteVideoTrackStats();
QNRTCClient.prototype.getRemoteVideoTrackStats = function () {
return RTCClient.getRemoteVideoTrackStats();
};
RTCClient.prototype.getUserNetworkQuality = function (userID) {
return QNRTCClient.getUserNetworkQuality(userID);
QNRTCClient.prototype.getUserNetworkQuality = function (userID) {
return RTCClient.getUserNetworkQuality(userID);
};
RTCClient.prototype.getRemoteUsers = function () {
var remoteUser = QNRTCClient.getRemoteUsers();
QNRTCClient.prototype.getRemoteUsers = function () {
var remoteUser = RTCClient.getRemoteUsers();
var result = [];
for (var _i = 0, remoteUser_1 = remoteUser; _i < remoteUser_1.length; _i++) {
var i = remoteUser_1[_i];
var audioTracks = this.transformRTCTrack(i.audioTracks);
var videoTracks = this.transformRTCTrack(i.videoTracks);
var audioTracks = this.transformRemoteRTCTrack(i.audioTracks);
var videoTracks = this.transformRemoteRTCTrack(i.videoTracks);
result.push({
userID: i.userID,
videoTracks: videoTracks,
Expand All @@ -126,37 +142,37 @@ var RTCClient = (function () {
}
return result;
};
RTCClient.prototype.getPublishedTracks = function () {
var remoteTrack = QNRTCClient.getPublishedTracks();
return this.transformRTCTrack(remoteTrack);
QNRTCClient.prototype.getPublishedTracks = function () {
var locakTrack = RTCClient.getPublishedTracks();
return this.transformLocalRTCTrack(locakTrack);
};
RTCClient.prototype.sendMessage = function (message, users, messageId) {
return QNRTCClient.sendMessage(message, users, messageId);
QNRTCClient.prototype.sendMessage = function (message, users, messageId) {
return RTCClient.sendMessage(message, users, messageId);
};
RTCClient.prototype.getConnectionState = function () {
return QNRTCClient.getConnectionState();
QNRTCClient.prototype.getConnectionState = function () {
return RTCClient.getConnectionState();
};
RTCClient.prototype.setAutoSubscribe = function (autoSubscribe) {
return QNRTCClient.setAutoSubscribe(autoSubscribe);
QNRTCClient.prototype.setAutoSubscribe = function (autoSubscribe) {
return RTCClient.setAutoSubscribe(autoSubscribe);
};
RTCClient.prototype.startLiveStreamingWithDirect = function (config) {
return QNRTCClient.startLiveStreamingWithDirect(config);
QNRTCClient.prototype.startLiveStreamingWithDirect = function (config) {
return RTCClient.startLiveStreamingWithDirect(config);
};
RTCClient.prototype.startLiveStreamingWithTranscoding = function (config) {
return QNRTCClient.startLiveStreamingWithTranscoding(config);
QNRTCClient.prototype.startLiveStreamingWithTranscoding = function (config) {
return RTCClient.startLiveStreamingWithTranscoding(config);
};
RTCClient.prototype.stopLiveStreamingWithDirect = function (config) {
return QNRTCClient.stopLiveStreamingWithDirect(config);
QNRTCClient.prototype.stopLiveStreamingWithDirect = function (config) {
return RTCClient.stopLiveStreamingWithDirect(config);
};
RTCClient.prototype.stopLiveStreamingWithTranscoding = function (config) {
return QNRTCClient.stopLiveStreamingWithTranscoding(config);
QNRTCClient.prototype.stopLiveStreamingWithTranscoding = function (config) {
return RTCClient.stopLiveStreamingWithTranscoding(config);
};
RTCClient.prototype.setTranscodingLiveStreamingTracks = function (streamID, transcodingTracks) {
return QNRTCClient.setTranscodingLiveStreamingTracks(streamID, transcodingTracks);
QNRTCClient.prototype.setTranscodingLiveStreamingTracks = function (streamID, transcodingTracks) {
return RTCClient.setTranscodingLiveStreamingTracks(streamID, transcodingTracks);
};
RTCClient.prototype.removeTranscodingLiveStreamingTracks = function (streamID, transcodingTracks) {
return QNRTCClient.removeTranscodingLiveStreamingTracks(streamID, transcodingTracks);
QNRTCClient.prototype.removeTranscodingLiveStreamingTracks = function (streamID, transcodingTracks) {
return RTCClient.removeTranscodingLiveStreamingTracks(streamID, transcodingTracks);
};
return RTCClient;
return QNRTCClient;
}());
exports["default"] = RTCClient;
exports.QNRTCClient = QNRTCClient;
Loading

0 comments on commit 4800b93

Please sign in to comment.