mirror of https://github.com/OpenVidu/openvidu.git
parent
efbb4e7763
commit
6eb84cd072
|
@ -1,36 +1,36 @@
|
|||
{
|
||||
"author": "OpenVidu",
|
||||
"dependencies": {
|
||||
"freeice": "2.2.0",
|
||||
"hark": "1.1.6",
|
||||
"inherits": "2.0.3",
|
||||
"merge": "1.2.0",
|
||||
"sdp-translator": "0.1.24",
|
||||
"ua-parser-js": "0.7.17",
|
||||
"uuid": "3.1.0",
|
||||
"webrtc-adapter": "6.1.1",
|
||||
"wolfy87-eventemitter": "5.2.4"
|
||||
},
|
||||
"description": "OpenVidu Browser",
|
||||
"devDependencies": {
|
||||
"browserify": "15.1.0",
|
||||
"tsify": "3.0.4",
|
||||
"typescript": "2.6.2",
|
||||
"uglify-js": "3.3.5"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"main": "lib/OpenVidu/index.js",
|
||||
"name": "openvidu-browser",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/OpenVidu/openvidu"
|
||||
},
|
||||
"scripts": {
|
||||
"browserify": "VERSION=${VERSION:-}; cd ts/OpenVidu && browserify Main.ts -p [ tsify ] --exclude kurento-browser-extensions --debug -o ../../static/js/openvidu-browser-$VERSION.js -v",
|
||||
"browserify-prod": "VERSION=${VERSION:-}; cd ts/OpenVidu && browserify --debug Main.ts -p [ tsify ] --exclude kurento-browser-extensions | uglifyjs --source-map content=inline --output ../../static/js/openvidu-browser-$VERSION.min.js",
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"updatetsc": "cd ts/OpenViduInternal && tsc && cd ../OpenVidu && tsc && cd ../.. && tsc --declaration ts/OpenVidu/index.ts --outDir lib --sourceMap --lib dom,es5,es2015.promise,scripthost && tsc --declaration ts/OpenVidu/Main.ts --outDir lib --sourceMap --lib dom,es5,es2015.promise,scripthost"
|
||||
},
|
||||
"types": "lib/OpenVidu/index.d.ts",
|
||||
"version": "1.7.0"
|
||||
}
|
||||
"author": "OpenVidu",
|
||||
"dependencies": {
|
||||
"freeice": "2.2.0",
|
||||
"hark": "1.1.6",
|
||||
"inherits": "2.0.3",
|
||||
"merge": "1.2.0",
|
||||
"sdp-translator": "0.1.24",
|
||||
"ua-parser-js": "0.7.17",
|
||||
"uuid": "3.1.0",
|
||||
"webrtc-adapter": "6.1.1",
|
||||
"wolfy87-eventemitter": "5.2.4"
|
||||
},
|
||||
"description": "OpenVidu Browser",
|
||||
"devDependencies": {
|
||||
"browserify": "15.1.0",
|
||||
"tsify": "3.0.4",
|
||||
"typescript": "2.6.2",
|
||||
"uglify-js": "3.3.5"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"main": "lib/OpenVidu/index.js",
|
||||
"name": "openvidu-browser",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/OpenVidu/openvidu"
|
||||
},
|
||||
"scripts": {
|
||||
"browserify": "VERSION=${VERSION:-}; cd ts/OpenVidu && browserify Main.ts -p [ tsify ] --exclude kurento-browser-extensions --debug -o ../../static/js/openvidu-browser-$VERSION.js -v",
|
||||
"browserify-prod": "VERSION=${VERSION:-}; cd ts/OpenVidu && browserify --debug Main.ts -p [ tsify ] --exclude kurento-browser-extensions | uglifyjs --source-map content=inline --output ../../static/js/openvidu-browser-$VERSION.min.js",
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"updatetsc": "cd ts/OpenViduInternal && tsc && cd ../OpenVidu && tsc && cd ../.. && tsc --declaration ts/OpenVidu/index.ts --outDir lib --sourceMap --lib dom,es5,es2015.promise,scripthost && tsc --declaration ts/OpenVidu/Main.ts --outDir lib --sourceMap --lib dom,es5,es2015.promise,scripthost"
|
||||
},
|
||||
"types": "lib/OpenVidu/index.d.ts",
|
||||
"version": "1.8.0"
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,5 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
|
@ -13,7 +12,7 @@
|
|||
<packaging>jar</packaging>
|
||||
|
||||
<name>OpenVidu Server</name>
|
||||
<version>1.7.0</version>
|
||||
<version>1.8.0</version>
|
||||
<description>OpenVidu Server</description>
|
||||
<url>https://github.com/OpenVidu/openvidu</url>
|
||||
|
||||
|
|
|
@ -1,52 +1,52 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"@angular/animations": "5.0.5",
|
||||
"@angular/cdk": "5.0.0-rc.2",
|
||||
"@angular/common": "5.0.5",
|
||||
"@angular/compiler": "5.0.5",
|
||||
"@angular/core": "5.0.5",
|
||||
"@angular/flex-layout": "2.0.0-beta.10-4905443",
|
||||
"@angular/forms": "5.0.5",
|
||||
"@angular/http": "5.0.5",
|
||||
"@angular/material": "5.0.0-rc.1",
|
||||
"@angular/platform-browser": "5.0.5",
|
||||
"@angular/platform-browser-dynamic": "5.0.5",
|
||||
"@angular/router": "5.0.5",
|
||||
"core-js": "2.5.1",
|
||||
"hammerjs": "2.0.8",
|
||||
"openvidu-browser": "1.7.0",
|
||||
"rxjs": "5.5.3",
|
||||
"zone.js": "0.8.18"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/cli": "^1.6.0",
|
||||
"@angular/compiler-cli": "5.0.5",
|
||||
"@types/jasmine": "2.5.38",
|
||||
"@types/node": "~6.0.60",
|
||||
"codelyzer": "4.0.1",
|
||||
"jasmine-core": "~2.5.2",
|
||||
"jasmine-spec-reporter": "~3.2.0",
|
||||
"karma": "~1.4.1",
|
||||
"karma-chrome-launcher": "~2.0.0",
|
||||
"karma-cli": "~1.0.1",
|
||||
"karma-coverage-istanbul-reporter": "^0.2.0",
|
||||
"karma-jasmine": "~1.1.0",
|
||||
"karma-jasmine-html-reporter": "^0.2.2",
|
||||
"protractor": "~5.1.0",
|
||||
"ts-node": "3.3.0",
|
||||
"tslint": "5.8.0",
|
||||
"typescript": "2.4.2"
|
||||
},
|
||||
"license": "MIT",
|
||||
"name": "frontend",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "ng build",
|
||||
"e2e": "ng e2e",
|
||||
"lint": "ng lint",
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"test": "ng test"
|
||||
},
|
||||
"version": "0.0.0"
|
||||
}
|
||||
"dependencies": {
|
||||
"@angular/animations": "5.0.5",
|
||||
"@angular/cdk": "5.0.0-rc.2",
|
||||
"@angular/common": "5.0.5",
|
||||
"@angular/compiler": "5.0.5",
|
||||
"@angular/core": "5.0.5",
|
||||
"@angular/flex-layout": "2.0.0-beta.10-4905443",
|
||||
"@angular/forms": "5.0.5",
|
||||
"@angular/http": "5.0.5",
|
||||
"@angular/material": "5.0.0-rc.1",
|
||||
"@angular/platform-browser": "5.0.5",
|
||||
"@angular/platform-browser-dynamic": "5.0.5",
|
||||
"@angular/router": "5.0.5",
|
||||
"core-js": "2.5.1",
|
||||
"hammerjs": "2.0.8",
|
||||
"openvidu-browser": "1.8.0",
|
||||
"rxjs": "5.5.3",
|
||||
"zone.js": "0.8.18"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/cli": "^1.6.0",
|
||||
"@angular/compiler-cli": "5.0.5",
|
||||
"@types/jasmine": "2.5.38",
|
||||
"@types/node": "~6.0.60",
|
||||
"codelyzer": "4.0.1",
|
||||
"jasmine-core": "~2.5.2",
|
||||
"jasmine-spec-reporter": "~3.2.0",
|
||||
"karma": "~1.4.1",
|
||||
"karma-chrome-launcher": "~2.0.0",
|
||||
"karma-cli": "~1.0.1",
|
||||
"karma-coverage-istanbul-reporter": "^0.2.0",
|
||||
"karma-jasmine": "~1.1.0",
|
||||
"karma-jasmine-html-reporter": "^0.2.2",
|
||||
"protractor": "~5.1.0",
|
||||
"ts-node": "3.3.0",
|
||||
"tslint": "5.8.0",
|
||||
"typescript": "2.4.2"
|
||||
},
|
||||
"license": "MIT",
|
||||
"name": "frontend",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "ng build",
|
||||
"e2e": "ng e2e",
|
||||
"lint": "ng lint",
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"test": "ng test"
|
||||
},
|
||||
"version": "0.0.0"
|
||||
}
|
|
@ -1 +1 @@
|
|||
{"version":3,"sources":["webpack/bootstrap 3413aa92b576d57ef381"],"names":[],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAQ,oBAAoB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAY,2BAA2B;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA,kDAA0C,oBAAoB,WAAW","file":"inline.bundle.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t\"inline\": 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 3413aa92b576d57ef381"],"sourceRoot":"webpack:///"}
|
||||
{"version":3,"sources":["webpack/bootstrap a86aab8ac212e4073a88"],"names":[],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAQ,oBAAoB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAY,2BAA2B;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA,kDAA0C,oBAAoB,WAAW","file":"inline.bundle.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t\"inline\": 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap a86aab8ac212e4073a88"],"sourceRoot":"webpack:///"}
|
|
@ -2987,136 +2987,129 @@ var OpenVidu = /** @class */ (function () {
|
|||
}
|
||||
};
|
||||
OpenVidu.prototype.initPublisher = function (parentId, cameraOptions, callback) {
|
||||
if (this.checkSystemRequirements()) {
|
||||
var publisher_1;
|
||||
if (cameraOptions != null) {
|
||||
cameraOptions.audio = cameraOptions.audio != null ? cameraOptions.audio : true;
|
||||
cameraOptions.video = cameraOptions.video != null ? cameraOptions.video : true;
|
||||
if (!cameraOptions.screen) {
|
||||
// Webcam and/or microphone is being requested
|
||||
var cameraOptionsAux = {
|
||||
sendAudio: cameraOptions.audio != null ? cameraOptions.audio : true,
|
||||
sendVideo: cameraOptions.video != null ? cameraOptions.video : true,
|
||||
activeAudio: cameraOptions.audioActive != null ? cameraOptions.audioActive : true,
|
||||
activeVideo: cameraOptions.videoActive != null ? cameraOptions.videoActive : true,
|
||||
dataChannel: true,
|
||||
mediaConstraints: this.openVidu.generateMediaConstraints(cameraOptions)
|
||||
};
|
||||
cameraOptions = cameraOptionsAux;
|
||||
publisher_1 = new Publisher_1.Publisher(this.openVidu.initPublisherTagged(parentId, cameraOptions, true, callback), parentId, false);
|
||||
console.info("'Publisher' initialized");
|
||||
return publisher_1;
|
||||
}
|
||||
else {
|
||||
// Screen share is being requested
|
||||
publisher_1 = new Publisher_1.Publisher(this.openVidu.initPublisherScreen(parentId, true, callback), parentId, true);
|
||||
if (DetectRTC.browser.name === 'Firefox' && DetectRTC.browser.version >= 52) {
|
||||
screenSharingAuto.getScreenId(function (error, sourceId, screenConstraints) {
|
||||
cameraOptions = {
|
||||
sendAudio: cameraOptions.audio,
|
||||
sendVideo: cameraOptions.video,
|
||||
activeAudio: cameraOptions.audioActive != null ? cameraOptions.audioActive : true,
|
||||
activeVideo: cameraOptions.videoActive != null ? cameraOptions.videoActive : true,
|
||||
dataChannel: true,
|
||||
mediaConstraints: {
|
||||
video: screenConstraints.video,
|
||||
audio: false
|
||||
}
|
||||
};
|
||||
publisher_1.stream.configureScreenOptions(cameraOptions);
|
||||
console.info("'Publisher' initialized");
|
||||
publisher_1.stream.ee.emitEvent('can-request-screen');
|
||||
});
|
||||
return publisher_1;
|
||||
}
|
||||
else if (DetectRTC.browser.name === 'Chrome') {
|
||||
// Screen is being requested
|
||||
/*screenSharing.isChromeExtensionAvailable((availability) => {
|
||||
switch (availability) {
|
||||
case 'available':
|
||||
console.warn('EXTENSION AVAILABLE!!!');
|
||||
screenSharing.getScreenConstraints((error, screenConstraints) => {
|
||||
if (!error) {
|
||||
console.warn(screenConstraints);
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'unavailable':
|
||||
console.warn('EXTENSION NOT AVAILABLE!!!');
|
||||
break;
|
||||
case 'isFirefox':
|
||||
console.warn('IT IS FIREFOX!!!');
|
||||
screenSharing.getScreenConstraints((error, screenConstraints) => {
|
||||
if (!error) {
|
||||
console.warn(screenConstraints);
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
});*/
|
||||
screenSharingAuto.getScreenId(function (error, sourceId, screenConstraints) {
|
||||
if (error === 'not-installed') {
|
||||
var error_1 = new OpenViduError_1.OpenViduError("SCREEN_EXTENSION_NOT_INSTALLED" /* SCREEN_EXTENSION_NOT_INSTALLED */, 'https://chrome.google.com/webstore/detail/screen-capturing/ajhifddimkapgcifgcodmmfdlknahffk');
|
||||
console.error(error_1);
|
||||
if (callback)
|
||||
callback(error_1);
|
||||
return;
|
||||
}
|
||||
else if (error === 'permission-denied') {
|
||||
var error_2 = new OpenViduError_1.OpenViduError("SCREEN_CAPTURE_DENIED" /* SCREEN_CAPTURE_DENIED */, 'You must allow access to one window of your desktop');
|
||||
console.error(error_2);
|
||||
if (callback)
|
||||
callback(error_2);
|
||||
return;
|
||||
}
|
||||
cameraOptions = {
|
||||
sendAudio: cameraOptions.audio != null ? cameraOptions.audio : true,
|
||||
sendVideo: cameraOptions.video != null ? cameraOptions.video : true,
|
||||
activeAudio: cameraOptions.audioActive != null ? cameraOptions.audioActive : true,
|
||||
activeVideo: cameraOptions.videoActive != null ? cameraOptions.videoActive : true,
|
||||
dataChannel: true,
|
||||
mediaConstraints: {
|
||||
video: screenConstraints.video,
|
||||
audio: false
|
||||
}
|
||||
};
|
||||
publisher_1.stream.configureScreenOptions(cameraOptions);
|
||||
publisher_1.stream.ee.emitEvent('can-request-screen');
|
||||
}, function (error) {
|
||||
console.error('getScreenId error', error);
|
||||
return;
|
||||
});
|
||||
console.info("'Publisher' initialized");
|
||||
return publisher_1;
|
||||
}
|
||||
else {
|
||||
console.error('Screen sharing not supported on ' + DetectRTC.browser.name);
|
||||
if (!!callback)
|
||||
callback(new OpenViduError_1.OpenViduError("SCREEN_SHARING_NOT_SUPPORTED" /* SCREEN_SHARING_NOT_SUPPORTED */, 'Screen sharing not supported on ' + DetectRTC.browser.name + ' ' + DetectRTC.browser.version));
|
||||
}
|
||||
}
|
||||
var publisher;
|
||||
if (cameraOptions != null) {
|
||||
cameraOptions.audio = cameraOptions.audio != null ? cameraOptions.audio : true;
|
||||
cameraOptions.video = cameraOptions.video != null ? cameraOptions.video : true;
|
||||
if (!cameraOptions.screen) {
|
||||
// Webcam and/or microphone is being requested
|
||||
var cameraOptionsAux = {
|
||||
sendAudio: cameraOptions.audio != null ? cameraOptions.audio : true,
|
||||
sendVideo: cameraOptions.video != null ? cameraOptions.video : true,
|
||||
activeAudio: cameraOptions.audioActive != null ? cameraOptions.audioActive : true,
|
||||
activeVideo: cameraOptions.videoActive != null ? cameraOptions.videoActive : true,
|
||||
dataChannel: true,
|
||||
mediaConstraints: this.openVidu.generateMediaConstraints(cameraOptions)
|
||||
};
|
||||
cameraOptions = cameraOptionsAux;
|
||||
publisher = new Publisher_1.Publisher(this.openVidu.initPublisherTagged(parentId, cameraOptions, true, callback), parentId, false);
|
||||
console.info("'Publisher' initialized");
|
||||
return publisher;
|
||||
}
|
||||
else {
|
||||
cameraOptions = {
|
||||
sendAudio: true,
|
||||
sendVideo: true,
|
||||
activeAudio: true,
|
||||
activeVideo: true,
|
||||
dataChannel: true,
|
||||
mediaConstraints: {
|
||||
audio: true,
|
||||
video: { width: { ideal: 1280 } }
|
||||
}
|
||||
};
|
||||
publisher_1 = new Publisher_1.Publisher(this.openVidu.initPublisherTagged(parentId, cameraOptions, true, callback), parentId, false);
|
||||
console.info("'Publisher' initialized");
|
||||
return publisher_1;
|
||||
// Screen share is being requested
|
||||
publisher = new Publisher_1.Publisher(this.openVidu.initPublisherScreen(parentId, true, callback), parentId, true);
|
||||
if (DetectRTC.browser.name === 'Firefox' && DetectRTC.browser.version >= 52) {
|
||||
screenSharingAuto.getScreenId(function (error, sourceId, screenConstraints) {
|
||||
cameraOptions = {
|
||||
sendAudio: cameraOptions.audio,
|
||||
sendVideo: cameraOptions.video,
|
||||
activeAudio: cameraOptions.audioActive != null ? cameraOptions.audioActive : true,
|
||||
activeVideo: cameraOptions.videoActive != null ? cameraOptions.videoActive : true,
|
||||
dataChannel: true,
|
||||
mediaConstraints: {
|
||||
video: screenConstraints.video,
|
||||
audio: false
|
||||
}
|
||||
};
|
||||
publisher.stream.configureScreenOptions(cameraOptions);
|
||||
console.info("'Publisher' initialized");
|
||||
publisher.stream.ee.emitEvent('can-request-screen');
|
||||
});
|
||||
return publisher;
|
||||
}
|
||||
else if (DetectRTC.browser.name === 'Chrome') {
|
||||
// Screen is being requested
|
||||
/*screenSharing.isChromeExtensionAvailable((availability) => {
|
||||
switch (availability) {
|
||||
case 'available':
|
||||
console.warn('EXTENSION AVAILABLE!!!');
|
||||
screenSharing.getScreenConstraints((error, screenConstraints) => {
|
||||
if (!error) {
|
||||
console.warn(screenConstraints);
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'unavailable':
|
||||
console.warn('EXTENSION NOT AVAILABLE!!!');
|
||||
break;
|
||||
case 'isFirefox':
|
||||
console.warn('IT IS FIREFOX!!!');
|
||||
screenSharing.getScreenConstraints((error, screenConstraints) => {
|
||||
if (!error) {
|
||||
console.warn(screenConstraints);
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
});*/
|
||||
screenSharingAuto.getScreenId(function (error, sourceId, screenConstraints) {
|
||||
if (error === 'not-installed') {
|
||||
var error_1 = new OpenViduError_1.OpenViduError("SCREEN_EXTENSION_NOT_INSTALLED" /* SCREEN_EXTENSION_NOT_INSTALLED */, 'https://chrome.google.com/webstore/detail/screen-capturing/ajhifddimkapgcifgcodmmfdlknahffk');
|
||||
console.error(error_1);
|
||||
if (callback)
|
||||
callback(error_1);
|
||||
return;
|
||||
}
|
||||
else if (error === 'permission-denied') {
|
||||
var error_2 = new OpenViduError_1.OpenViduError("SCREEN_CAPTURE_DENIED" /* SCREEN_CAPTURE_DENIED */, 'You must allow access to one window of your desktop');
|
||||
console.error(error_2);
|
||||
if (callback)
|
||||
callback(error_2);
|
||||
return;
|
||||
}
|
||||
cameraOptions = {
|
||||
sendAudio: cameraOptions.audio != null ? cameraOptions.audio : true,
|
||||
sendVideo: cameraOptions.video != null ? cameraOptions.video : true,
|
||||
activeAudio: cameraOptions.audioActive != null ? cameraOptions.audioActive : true,
|
||||
activeVideo: cameraOptions.videoActive != null ? cameraOptions.videoActive : true,
|
||||
dataChannel: true,
|
||||
mediaConstraints: {
|
||||
video: screenConstraints.video,
|
||||
audio: false
|
||||
}
|
||||
};
|
||||
publisher.stream.configureScreenOptions(cameraOptions);
|
||||
publisher.stream.ee.emitEvent('can-request-screen');
|
||||
}, function (error) {
|
||||
console.error('getScreenId error', error);
|
||||
return;
|
||||
});
|
||||
console.info("'Publisher' initialized");
|
||||
return publisher;
|
||||
}
|
||||
else {
|
||||
console.error('Screen sharing not supported on ' + DetectRTC.browser.name);
|
||||
if (!!callback)
|
||||
callback(new OpenViduError_1.OpenViduError("SCREEN_SHARING_NOT_SUPPORTED" /* SCREEN_SHARING_NOT_SUPPORTED */, 'Screen sharing not supported on ' + DetectRTC.browser.name + ' ' + DetectRTC.browser.version));
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
console.error('Browser not supported');
|
||||
if (!!callback)
|
||||
callback(new OpenViduError_1.OpenViduError("BROWSER_NOT_SUPPORTED" /* BROWSER_NOT_SUPPORTED */, 'Browser ' + DetectRTC.browser.name + ' ' + DetectRTC.browser.version + ' is not supported in OpenVidu'));
|
||||
cameraOptions = {
|
||||
sendAudio: true,
|
||||
sendVideo: true,
|
||||
activeAudio: true,
|
||||
activeVideo: true,
|
||||
dataChannel: true,
|
||||
mediaConstraints: {
|
||||
audio: true,
|
||||
video: { width: { ideal: 1280 } }
|
||||
}
|
||||
};
|
||||
publisher = new Publisher_1.Publisher(this.openVidu.initPublisherTagged(parentId, cameraOptions, true, callback), parentId, false);
|
||||
console.info("'Publisher' initialized");
|
||||
return publisher;
|
||||
}
|
||||
};
|
||||
OpenVidu.prototype.reinitPublisher = function (publisher) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -15,7 +15,7 @@
|
|||
"colormap": "^2.2.0",
|
||||
"core-js": "^2.4.1",
|
||||
"hammerjs": "^2.0.8",
|
||||
"openvidu-browser": "1.7.0",
|
||||
"openvidu-browser": "1.8.0",
|
||||
"openvidu-node-client": "1.7.0",
|
||||
"rxjs": "^5.4.2",
|
||||
"zone.js": "^0.8.14"
|
||||
|
@ -52,5 +52,5 @@
|
|||
"start": "ng serve",
|
||||
"test": "ng test"
|
||||
},
|
||||
"version": "1.7.0"
|
||||
}
|
||||
"version": "1.8.0"
|
||||
}
|
Loading…
Reference in New Issue