Skip to content

Commit

Permalink
fix: MediaStreamTrack
Browse files Browse the repository at this point in the history
  • Loading branch information
arthur committed Nov 26, 2018
1 parent d606294 commit 13438a5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions dev/parameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ if (typeof arguments[0].getStats === 'function') {
} else {
throw '1st argument is not exit getStats function';
}
if (!MediaStreamTrack) {
return
}
// MediaStreamTrack 或 RTCPeerConnection 不存在时,Android/IOS环境中,不作检测
if (arguments[0] instanceof RTCPeerConnection) {
if (!!navigator.mozGetUserMedia && !(mediaStreamTrack instanceof MediaStreamTrack)) {
Expand Down
5 changes: 4 additions & 1 deletion getStats.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

// Last time updated: 2018-11-26 3:26:22 AM UTC
// Last time updated: 2018-11-26 6:19:49 AM UTC

// _______________
// getStats v1.0.10
Expand Down Expand Up @@ -181,6 +181,9 @@ window.getStats = function(mediaStreamTrack, callback, interval) {
} else {
throw '1st argument is not exit getStats function';
}
if (!MediaStreamTrack) {
return
}
// MediaStreamTrack 或 RTCPeerConnection 不存在时,Android/IOS环境中,不作检测
if (arguments[0] instanceof RTCPeerConnection) {
if (!!navigator.mozGetUserMedia && !(mediaStreamTrack instanceof MediaStreamTrack)) {
Expand Down
Loading

0 comments on commit 13438a5

Please sign in to comment.