shaka-video-element 0.6.18 → 0.6.20

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.
package/dist/cjs/react.js CHANGED
@@ -84,7 +84,7 @@ function createComponent({
84
84
  continue;
85
85
  }
86
86
  const attrName = toAttributeName(reactPropToAttrNameMap[k] ?? k);
87
- if (k in elementClass.prototype && !(k in (((_a = globalThis.HTMLElement) == null ? void 0 : _a.prototype) ?? {})) && !((_b = elementClass.observedAttributes) == null ? void 0 : _b.some((attr) => attr === attrName))) {
87
+ if (elementClass.prototype && k in elementClass.prototype && !(k in (((_a = globalThis.HTMLElement) == null ? void 0 : _a.prototype) ?? {})) && !((_b = elementClass.observedAttributes) == null ? void 0 : _b.some((attr) => attr === attrName))) {
88
88
  elementProps[k] = v;
89
89
  continue;
90
90
  }
@@ -181,7 +181,12 @@ function setProperty(node, name, value) {
181
181
  var react_default = createComponent({
182
182
  react: import_react.default,
183
183
  tagName: "shaka-video",
184
- elementClass: import_shaka_video_element.default
184
+ elementClass: import_shaka_video_element.default,
185
+ toAttributeName(propName) {
186
+ if (propName === "muted") return "";
187
+ if (propName === "defaultMuted") return "muted";
188
+ return defaultToAttributeName(propName);
189
+ }
185
190
  });
186
191
  /*! Bundled license information:
187
192
 
package/dist/react.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import CustomMediaElement from './shaka-video-element.js';
3
3
 
4
- declare const _default: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<CustomMediaElement>, "disablePictureInPicture" | "height" | "onenterpictureinpicture" | "onleavepictureinpicture" | "playsInline" | "poster" | "videoHeight" | "videoWidth" | "width" | "cancelVideoFrameCallback" | "getVideoPlaybackQuality" | "requestPictureInPicture" | "requestVideoFrameCallback" | "autoplay" | "buffered" | "controls" | "crossOrigin" | "currentSrc" | "currentTime" | "defaultMuted" | "defaultPlaybackRate" | "disableRemotePlayback" | "duration" | "ended" | "error" | "loop" | "mediaKeys" | "muted" | "networkState" | "onencrypted" | "onwaitingforkey" | "paused" | "playbackRate" | "played" | "preload" | "preservesPitch" | "readyState" | "remote" | "seekable" | "seeking" | "sinkId" | "src" | "srcObject" | "textTracks" | "volume" | "addTextTrack" | "canPlayType" | "fastSeek" | "load" | "pause" | "play" | "setMediaKeys" | "setSinkId" | "NETWORK_EMPTY" | "NETWORK_IDLE" | "NETWORK_LOADING" | "NETWORK_NO_SOURCE" | "HAVE_NOTHING" | "HAVE_METADATA" | "HAVE_CURRENT_DATA" | "HAVE_FUTURE_DATA" | "HAVE_ENOUGH_DATA"> & {} & Partial<Omit<CustomMediaElement, keyof HTMLElement | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "adoptedCallback">> & React.RefAttributes<CustomMediaElement>>;
4
+ declare const _default: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<CustomMediaElement>, "muted" | "defaultMuted" | "disablePictureInPicture" | "height" | "onenterpictureinpicture" | "onleavepictureinpicture" | "playsInline" | "poster" | "videoHeight" | "videoWidth" | "width" | "cancelVideoFrameCallback" | "getVideoPlaybackQuality" | "requestPictureInPicture" | "requestVideoFrameCallback" | "autoplay" | "buffered" | "controls" | "crossOrigin" | "currentSrc" | "currentTime" | "defaultPlaybackRate" | "disableRemotePlayback" | "duration" | "ended" | "error" | "loop" | "mediaKeys" | "networkState" | "onencrypted" | "onwaitingforkey" | "paused" | "playbackRate" | "played" | "preload" | "preservesPitch" | "readyState" | "remote" | "seekable" | "seeking" | "sinkId" | "src" | "srcObject" | "textTracks" | "volume" | "addTextTrack" | "canPlayType" | "fastSeek" | "load" | "pause" | "play" | "setMediaKeys" | "setSinkId" | "NETWORK_EMPTY" | "NETWORK_IDLE" | "NETWORK_LOADING" | "NETWORK_NO_SOURCE" | "HAVE_NOTHING" | "HAVE_METADATA" | "HAVE_CURRENT_DATA" | "HAVE_FUTURE_DATA" | "HAVE_ENOUGH_DATA"> & {} & Partial<Omit<CustomMediaElement, keyof HTMLElement | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "adoptedCallback">> & React.RefAttributes<CustomMediaElement>>;
5
5
 
6
6
  export { _default as default };
package/dist/react.js CHANGED
@@ -52,7 +52,7 @@ function createComponent({
52
52
  continue;
53
53
  }
54
54
  const attrName = toAttributeName(reactPropToAttrNameMap[k] ?? k);
55
- if (k in elementClass.prototype && !(k in (((_a = globalThis.HTMLElement) == null ? void 0 : _a.prototype) ?? {})) && !((_b = elementClass.observedAttributes) == null ? void 0 : _b.some((attr) => attr === attrName))) {
55
+ if (elementClass.prototype && k in elementClass.prototype && !(k in (((_a = globalThis.HTMLElement) == null ? void 0 : _a.prototype) ?? {})) && !((_b = elementClass.observedAttributes) == null ? void 0 : _b.some((attr) => attr === attrName))) {
56
56
  elementProps[k] = v;
57
57
  continue;
58
58
  }
@@ -149,7 +149,12 @@ function setProperty(node, name, value) {
149
149
  var react_default = createComponent({
150
150
  react: React,
151
151
  tagName: "shaka-video",
152
- elementClass: CustomMediaElement
152
+ elementClass: CustomMediaElement,
153
+ toAttributeName(propName) {
154
+ if (propName === "muted") return "";
155
+ if (propName === "defaultMuted") return "muted";
156
+ return defaultToAttributeName(propName);
157
+ }
153
158
  });
154
159
  export {
155
160
  react_default as default
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shaka-video-element",
3
- "version": "0.6.18",
3
+ "version": "0.6.20",
4
4
  "description": "Custom element (web component) for Shaka Player",
5
5
  "author": "@muxinc",
6
6
  "license": "MIT",
@@ -56,7 +56,7 @@
56
56
  "shaka-player": "~4.15.4"
57
57
  },
58
58
  "devDependencies": {
59
- "build-react-wrapper": "^0.2.1",
59
+ "build-react-wrapper": "^0.2.3",
60
60
  "npm-run-all": "^4.1.5",
61
61
  "wet-run": "^1.2.5"
62
62
  },