Skip to content

Commit

Permalink
Merge pull request #7 from yydounai1234/main
Browse files Browse the repository at this point in the history
fix demo js sdk version
  • Loading branch information
BoleLiu authored Mar 10, 2022
2 parents 19cf75a + 25dc48b commit e54f318
Show file tree
Hide file tree
Showing 13 changed files with 51 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var __extends = (this && this.__extends) || (function () {
})();
exports.__esModule = true;
var RTCLocalVideoTrack_1 = require("./RTCLocalVideoTrack");
var QNRtcTrack = uni.requireNativePlugin('QNRtcUniPlugin-QNRtcTrack');
var QNRtcTrack = uni.requireNativePlugin('QNRTC-UniPlugin-QNRtcTrack');
var QNCameraVideoTrack = (function (_super) {
__extends(QNCameraVideoTrack, _super);
function QNCameraVideoTrack() {
Expand All @@ -43,8 +43,8 @@ var QNCameraVideoTrack = (function (_super) {
QNCameraVideoTrack.prototype.turnLightOff = function () {
return QNRtcTrack.turnLightOff(this.identifyID);
};
QNCameraVideoTrack.prototype.manualFocus = function (x, y, viewWidth, viewHeight) {
return QNRtcTrack.manualFocus(this.identifyID, x, y, viewWidth, viewHeight);
QNCameraVideoTrack.prototype.manualFocus = function (x, y) {
return QNRtcTrack.manualFocus(this.identifyID, x, y);
};
QNCameraVideoTrack.prototype.setExposureCompensation = function (value) {
return QNRtcTrack.setExposureCompensation(this.identifyID, value);
Expand All @@ -61,12 +61,6 @@ var QNCameraVideoTrack = (function (_super) {
QNCameraVideoTrack.prototype.getVideoOrientation = function () {
return QNRtcTrack.getVideoOrientation(this.identifyID);
};
QNCameraVideoTrack.prototype.setFillMode = function (fillMode) {
return QNRtcTrack.setFillMode(this.identifyID, fillMode);
};
QNCameraVideoTrack.prototype.getFillMode = function () {
return QNRtcTrack.getFillMode(this.identifyID);
};
QNCameraVideoTrack.prototype.setZoom = function (zoom) {
return QNRtcTrack.setZoom(this.identifyID, zoom);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ exports.__esModule = true;
var RTCEnum_1 = require("../enum/RTCEnum");
var RTCRemoteVideoTrack_1 = require("./RTCRemoteVideoTrack");
var RTCRemoteAudioTrack_1 = require("./RTCRemoteAudioTrack");
var QNRTCClient = uni.requireNativePlugin('QNRtcUniPlugin-QNRtcClient');
var QNRTCClient = uni.requireNativePlugin('QNRTC-UniPlugin-QNRtcClient');
var QNEvent = uni.requireNativePlugin('globalEvent');
var RTCClient = (function () {
function RTCClient() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ var RTCCameraVideoTrack_1 = require("./RTCCameraVideoTrack");
var RTCMicrophoneAudioTrack_1 = require("./RTCMicrophoneAudioTrack");
var RTCScreenVideoTrack_1 = require("./RTCScreenVideoTrack");
var RTCTrack_1 = require("./RTCTrack");
var QNRtcEngine = uni.requireNativePlugin('QNRtcUniPlugin-QNRtcEngine');
var QNRtcEngine = uni.requireNativePlugin('QNRTC-UniPlugin-QNRtcEngine');
var QNEvent = uni.requireNativePlugin('globalEvent');
var QNRtcTrack = uni.requireNativePlugin('QNRTC-UniPlugin-QNRtcTrack');
var QNRTCClientPlugin = uni.requireNativePlugin('QNRTC-UniPlugin-QNRtcClient');
var RTCEngine = (function () {
function RTCEngine() {
}
Expand All @@ -28,8 +30,16 @@ var RTCEngine = (function () {
RTCEngine.off = function (name, listener) {
QNEvent.removeEventListener(name, listener);
};
RTCEngine.requestPermission = function (callback) {
return QNRtcTrack.requestPermission(callback);
};
RTCEngine.isScreenCaptureSupported = function () {
return QNRtcTrack.isScreenCaptureSupported();
};
RTCEngine.configRTC = function (config) {
var _config = __assign(__assign({}, RTCPreset_1.QNRTCConfigurationPreset), config);
QNRtcTrack.initDelegate();
QNRTCClientPlugin.initDelegate();
return QNRtcEngine.configRTC(_config);
};
RTCEngine.deinit = function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var __extends = (this && this.__extends) || (function () {
})();
exports.__esModule = true;
var RTCTrack_1 = require("./RTCTrack");
var QNRtcTrack = uni.requireNativePlugin('QNRtcUniPlugin-QNRtcTrack');
var QNRtcTrack = uni.requireNativePlugin('QNRTC-UniPlugin-QNRtcTrack');
var QNLocalTrack = (function (_super) {
__extends(QNLocalTrack, _super);
function QNLocalTrack() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var __extends = (this && this.__extends) || (function () {
})();
exports.__esModule = true;
var RTCLocalTrack_1 = require("./RTCLocalTrack");
var QNRtcTrack = uni.requireNativePlugin('QNRtcUniPlugin-QNRtcTrack');
var QNRtcTrack = uni.requireNativePlugin('QNRTC-UniPlugin-QNRtcTrack');
var QNLocalVideoTrack = (function (_super) {
__extends(QNLocalVideoTrack, _super);
function QNLocalVideoTrack() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ var __extends = (this && this.__extends) || (function () {
})();
exports.__esModule = true;
var RTCLocalAudioTrack_1 = require("./RTCLocalAudioTrack");
var RTCAudioMixer_1 = require("../class/RTCAudioMixer");
var QNRtcTrack = uni.requireNativePlugin('QNRtcUniPlugin-QNRtcTrack');
var QNRtcTrack = uni.requireNativePlugin('QNRTC-UniPlugin-QNRtcTrack');
var QNMicrophoneAudioTrack = (function (_super) {
__extends(QNMicrophoneAudioTrack, _super);
function QNMicrophoneAudioTrack() {
Expand All @@ -26,10 +25,6 @@ var QNMicrophoneAudioTrack = (function (_super) {
QNMicrophoneAudioTrack.prototype.setVolume = function (volume) {
return QNRtcTrack.setVolume(this.identifyID, volume);
};
QNMicrophoneAudioTrack.prototype.createAudioMixer = function (url) {
QNRtcTrack.createAudioMixer(this.identifyID, url);
return new RTCAudioMixer_1["default"](this.identifyID, url);
};
return QNMicrophoneAudioTrack;
}(RTCLocalAudioTrack_1["default"]));
exports["default"] = QNMicrophoneAudioTrack;
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var __extends = (this && this.__extends) || (function () {
})();
exports.__esModule = true;
var RTCRemoteTrack_1 = require("./RTCRemoteTrack");
var QNRtcTrack = uni.requireNativePlugin('QNRtcUniPlugin-QNRtcTrack');
var QNRtcTrack = uni.requireNativePlugin('QNRTC-UniPlugin-QNRtcTrack');
var QNRemoteAudioTrack = (function (_super) {
__extends(QNRemoteAudioTrack, _super);
function QNRemoteAudioTrack() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var __extends = (this && this.__extends) || (function () {
})();
exports.__esModule = true;
var RTCTrack_1 = require("./RTCTrack");
var QNRtcTrack = uni.requireNativePlugin('QNRtcUniPlugin-QNRtcTrack');
var QNRtcTrack = uni.requireNativePlugin('QNRTC-UniPlugin-QNRtcTrack');
var QNRemoteTrack = (function (_super) {
__extends(QNRemoteTrack, _super);
function QNRemoteTrack() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var __extends = (this && this.__extends) || (function () {
})();
exports.__esModule = true;
var RTCRemoteTrack_1 = require("./RTCRemoteTrack");
var QNRtcTrack = uni.requireNativePlugin('QNRtcUniPlugin-QNRtcTrack');
var QNRtcTrack = uni.requireNativePlugin('QNRTC-UniPlugin-QNRtcTrack');
var QNRemoteVideoTrack = (function (_super) {
__extends(QNRemoteVideoTrack, _super);
function QNRemoteVideoTrack() {
Expand All @@ -28,8 +28,8 @@ var QNRemoteVideoTrack = (function (_super) {
QNRemoteVideoTrack.prototype.isMultiProfileEnabled = function () {
return QNRtcTrack.isMultiProfileEnabled(this.identifyID);
};
QNRemoteVideoTrack.prototype.getProfiles = function () {
return QNRtcTrack.getProfiles(this.identifyID);
QNRemoteVideoTrack.prototype.getProfile = function () {
return QNRtcTrack.getProfile(this.identifyID);
};
return QNRemoteVideoTrack;
}(RTCRemoteTrack_1["default"]));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,12 @@ var __extends = (this && this.__extends) || (function () {
})();
exports.__esModule = true;
var RTCLocalVideoTrack_1 = require("./RTCLocalVideoTrack");
var QNRtcTrack = uni.requireNativePlugin('QNRtcUniPlugin-QNRtcTrack');
var QNRtcTrack = uni.requireNativePlugin('QNRTC-UniPlugin-QNRtcTrack');
var QNScreenVideoTrack = (function (_super) {
__extends(QNScreenVideoTrack, _super);
function QNScreenVideoTrack() {
return _super !== null && _super.apply(this, arguments) || this;
}
QNScreenVideoTrack.prototype.requestPermission = function () {
return QNRtcTrack.requestPermission(this.identifyID);
};
QNScreenVideoTrack.prototype.isScreenCaptureSupported = function () {
return QNRtcTrack.isScreenCaptureSupported(this.identifyID);
};
QNScreenVideoTrack.prototype.setScreenRecorderFrameRate = function (screenRecorderFrameRate) {
return QNRtcTrack.setScreenRecorderFrameRate(this.identifyID, screenRecorderFrameRate);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
"use strict";
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
exports.__esModule = true;
var QNRtcTrack = uni.requireNativePlugin('QNRtcUniPlugin-QNRtcTrack');
var QNRtcTrack = uni.requireNativePlugin('QNRTC-UniPlugin-QNRtcTrack');
var QNEvent = uni.requireNativePlugin('globalEvent');
var QNTrack = (function () {
function QNTrack(_a) {
var identifyID = _a.identifyID, kind = _a.kind, tag = _a.tag, trackID = _a.trackID, raw = _a.raw, userID = _a.userID;
Expand All @@ -11,6 +23,19 @@ var QNTrack = (function () {
this.raw = raw;
this.userID = userID;
}
QNTrack.prototype.on = function (name, listener) {
var _this = this;
var _listener = function (params) {
var trackID = params.trackID, arguv = __rest(params, ["trackID"]);
if (trackID && trackID === _this.trackID) {
listener(arguv);
}
};
QNEvent.addEventListener(name, _listener);
};
QNTrack.prototype.off = function (name, listener) {
QNEvent.removeEventListener(name, listener);
};
QNTrack.prototype.getMuted = function () {
return QNRtcTrack.getMuted(this.identifyID);
};
Expand Down
2 changes: 1 addition & 1 deletion demo/js_sdk/QNRTC-UniPlugin-JS/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "QNRTC-UniPlugin-JS",
"name": "七牛云WebRTC JS插件",
"version": "1.0.2",
"version": "1.0.3",
"description": "集成 QNDroidRTC 与 QNRTCKit SDK ",
"keywords": [
"音视频",
Expand Down
8 changes: 0 additions & 8 deletions lib/class/aa.js

This file was deleted.

0 comments on commit e54f318

Please sign in to comment.