Commit 8edce687 by Christoph

Upgraded webpack and other depdencies due to npm warning…

Upgraded webpack and other depdencies due to npm warning (https://www.npmjs.com/advisories/803) + print error message if the browser autoplay feature blocks the video replay
parent 7a216f4c
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -12,16 +12,17 @@
"clean": "shx rm -rf ./build/awrtc ./build/bundle"
},
"devDependencies": {
"@types/jasmine": "^2.8.9",
"jasmine": "^2.4.1",
"@types/jasmine": "^2.8.16",
"jasmine": "^2.99.0",
"karma-firefox-launcher": "^1.1.0",
"shx": "^0.3.2",
"source-map-loader": "^0.2.4",
"ts-loader": "^5.2.2",
"ts-loader": "^5.4.5",
"tsconfig-paths-webpack-plugin": "^3.2.0",
"typescript": "^3.1.3",
"uglify-js": "^2.7.0",
"webpack": "^4.23.1",
"webpack-cli": "^3.1.2",
"webrtc-adapter": "^6.4.6"
"typescript": "^3.5.2",
"uglify-js": "^2.8.29",
"webpack": "^4.35.0",
"webpack-cli": "^3.3.5",
"webrtc-adapter": "^6.4.8"
}
}
......@@ -143,7 +143,20 @@ export class BrowserMediaStream {
if(this.mVideoElement == null)
return;
this.mVideoElement.play();
var playPromise = this.mVideoElement.play();
if (typeof playPromise !== "undefined")
{
playPromise.then(function() {
//all good
}).catch(function(error) {
//so far we can't handle this error automatically. Some situation this might trigger
//Chrome & Firefox: User only receives audio but doesn't send it & the call was initiated without the user pressing a button.
//Safari: This seems to trigger always on safari unless the user manually allows autoplay
SLog.LE("Replay of video failed. This error is likely caused due to autoplay restrictions of the browser. Try allowing autoplay.");
console.error(error);
});
}
if(this.InternalStreamAdded != null)
this.InternalStreamAdded(this);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment