@lvce-editor/main-process 6.36.0 → 6.36.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1647,6 +1647,12 @@ const string = value => {
1647
1647
  throw new AssertionError('expected value to be of type string');
1648
1648
  }
1649
1649
  };
1650
+ const boolean = value => {
1651
+ const type = getType(value);
1652
+ if (type !== Boolean$1) {
1653
+ throw new AssertionError('expected value to be of type boolean');
1654
+ }
1655
+ };
1650
1656
 
1651
1657
  const setExitCode = code => {
1652
1658
  number(code);
@@ -7067,6 +7073,10 @@ const inspectElement = (view, x, y) => {
7067
7073
  const setBackgroundColor = (view, backgroundColor) => {
7068
7074
  view.setBackgroundColor(backgroundColor);
7069
7075
  };
7076
+ const setAudioMuted = (view, muted) => {
7077
+ boolean(muted);
7078
+ view.webContents.setAudioMuted(muted);
7079
+ };
7070
7080
 
7071
7081
  /**
7072
7082
  *
@@ -7097,11 +7107,13 @@ const getStats = view => {
7097
7107
  } = view;
7098
7108
  const canGoBack = webContents.navigationHistory.canGoBack();
7099
7109
  const canGoForward = webContents.navigationHistory.canGoForward();
7110
+ const isAudioMuted = webContents.isAudioMuted();
7100
7111
  const url = webContents.getURL();
7101
7112
  const title = webContents.getTitle();
7102
7113
  return {
7103
7114
  canGoBack,
7104
7115
  canGoForward,
7116
+ isAudioMuted,
7105
7117
  title,
7106
7118
  url
7107
7119
  };
@@ -7811,6 +7823,7 @@ const commandMap = {
7811
7823
  'ElectronWebContentsViewFunctions.openDevtools': wrapBrowserViewCommand(openDevtools),
7812
7824
  'ElectronWebContentsViewFunctions.reload': wrapBrowserViewCommand(reload),
7813
7825
  'ElectronWebContentsViewFunctions.resizeBrowserView': wrapBrowserViewCommand(resizeBrowserView),
7826
+ 'ElectronWebContentsViewFunctions.setAudioMuted': wrapBrowserViewCommand(setAudioMuted),
7814
7827
  'ElectronWebContentsViewFunctions.setBackgroundColor': wrapBrowserViewCommand(setBackgroundColor),
7815
7828
  'ElectronWebContentsViewFunctions.setFallthroughKeyBindings': wrapBrowserViewCommand(setFallThroughKeyBindings),
7816
7829
  'ElectronWebContentsViewFunctions.setIframeSrc': wrapBrowserViewCommand(setIframeSrc),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/main-process",
3
- "version": "6.36.0",
3
+ "version": "6.36.1",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "electron"