@videosdk.live/react
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -519,23 +519,2 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var setTrack = function setTrack(stream) { | ||
var mediaStream = new MediaStream(); | ||
mediaStream.addTrack(stream.track); | ||
if (stream.track.readyState === 'live') { | ||
switch (stream.kind) { | ||
case 'video': | ||
setwebcamStream(mediaStream); | ||
break; | ||
case 'audio': | ||
setMicStream(mediaStream); | ||
break; | ||
case 'share': | ||
setScreenShareStream(mediaStream); | ||
break; | ||
} | ||
} | ||
}; | ||
var unSetTrack = function unSetTrack(stream) { | ||
@@ -560,3 +539,2 @@ if (stream.track.readyState !== 'live') { | ||
var _handleStreamEnabled = function _handleStreamEnabled(stream) { | ||
setTrack(stream); | ||
onStreamEnabled(stream); | ||
@@ -595,3 +573,2 @@ }; | ||
streams.forEach(function (stream) { | ||
setTrack(stream); | ||
}); | ||
@@ -598,0 +575,0 @@ } |
@@ -516,23 +516,2 @@ import React, { createContext, useEffect, useContext, useState, useRef } from 'react'; | ||
var setTrack = function setTrack(stream) { | ||
var mediaStream = new MediaStream(); | ||
mediaStream.addTrack(stream.track); | ||
if (stream.track.readyState === 'live') { | ||
switch (stream.kind) { | ||
case 'video': | ||
setwebcamStream(mediaStream); | ||
break; | ||
case 'audio': | ||
setMicStream(mediaStream); | ||
break; | ||
case 'share': | ||
setScreenShareStream(mediaStream); | ||
break; | ||
} | ||
} | ||
}; | ||
var unSetTrack = function unSetTrack(stream) { | ||
@@ -557,3 +536,2 @@ if (stream.track.readyState !== 'live') { | ||
var _handleStreamEnabled = function _handleStreamEnabled(stream) { | ||
setTrack(stream); | ||
onStreamEnabled(stream); | ||
@@ -592,3 +570,2 @@ }; | ||
streams.forEach(function (stream) { | ||
setTrack(stream); | ||
}); | ||
@@ -595,0 +572,0 @@ } |
{ | ||
"name": "@videosdk.live/react", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"license": "ISC", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
132229
1051