Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@100mslive/hms-video-store

Package Overview
Dependencies
Maintainers
17
Versions
731
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@100mslive/hms-video-store - npm Package Compare versions

Comparing version 0.12.17-alpha.7 to 0.12.17-alpha.8

4

package.json
{
"version": "0.12.17-alpha.7",
"version": "0.12.17-alpha.8",
"license": "MIT",

@@ -76,3 +76,3 @@ "repository": {

],
"gitHead": "a3858015ba34995efa28cd6e7ce1be842fc8b000"
"gitHead": "1b1b22f648b766dd8d23974f0062da49dec42145"
}

@@ -87,3 +87,3 @@ import isEqual from 'lodash.isequal';

this.setFirstTrackId(this.trackId);
if (isBrowser && source === 'regular') {
if (isBrowser && source === 'regular' && isMobile()) {
document.addEventListener('visibilitychange', this.handleVisibilityChange);

@@ -523,31 +523,22 @@ }

if (document.visibilityState === 'hidden') {
if (isMobile()) {
this.enabledStateBeforeBackground = this.enabled;
this.nativeTrack.enabled = false;
HMSLogger.d(this.TAG, 'visibility hidden muting track');
this.replaceSenderTrack(this.nativeTrack);
// started interruption event
this.eventBus.analytics.publish(
this.sendInterruptionEvent({
started: true,
}),
);
}
this.enabledStateBeforeBackground = this.enabled;
this.nativeTrack.enabled = false;
HMSLogger.d(this.TAG, 'visibility hidden muting track');
this.replaceSenderTrack(this.nativeTrack);
// started interruption event
this.eventBus.analytics.publish(
this.sendInterruptionEvent({
started: true,
}),
);
} else {
const newEnabledState = isMobile() ? this.enabledStateBeforeBackground : this.enabled;
if (this.nativeTrack.muted || this.nativeTrack.readyState === 'ended') {
HMSLogger.d(this.TAG, 'visibility visible, restarting track', `${this}`);
const track = await this.replaceTrackWith(this.settings);
this.nativeTrack?.stop();
this.nativeTrack = track;
if (newEnabledState) {
await this.processPlugins();
await this.pluginsManager.waitForRestart();
}
await this.replaceSender(this.nativeTrack, newEnabledState);
this.videoHandler.updateSinks();
} else if (isMobile()) {
this.nativeTrack.enabled = this.enabledStateBeforeBackground;
await this.replaceSender(this.nativeTrack, this.enabledStateBeforeBackground);
}
this.nativeTrack.enabled = this.enabledStateBeforeBackground;
HMSLogger.d(this.TAG, 'visibility visibile, restoring track state', this.enabledStateBeforeBackground);
this.replaceSender(this.nativeTrack, this.enabledStateBeforeBackground);
// started interruption event
this.eventBus.analytics.publish(
this.sendInterruptionEvent({
started: false,
}),
);
}

@@ -554,0 +545,0 @@ this.eventBus.localVideoEnabled.publish({ enabled: this.nativeTrack.enabled, track: this });

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc