diff --git a/com.twin.app.shoptime/src/components/TabLayout/iconComponents/OnSaleIcon.jsx b/com.twin.app.shoptime/src/components/TabLayout/iconComponents/OnSaleIcon.jsx index 0ae88c78..02107299 100644 --- a/com.twin.app.shoptime/src/components/TabLayout/iconComponents/OnSaleIcon.jsx +++ b/com.twin.app.shoptime/src/components/TabLayout/iconComponents/OnSaleIcon.jsx @@ -14,8 +14,8 @@ const OnSaleIcon = ({ iconType = "normal" }) => { xmlns="http://www.w3.org/2000/svg" > diff --git a/com.twin.app.shoptime/src/components/VideoPlayer/TReactPlayer.jsx b/com.twin.app.shoptime/src/components/VideoPlayer/TReactPlayer.jsx index 82d1ee82..c99e3b95 100644 --- a/com.twin.app.shoptime/src/components/VideoPlayer/TReactPlayer.jsx +++ b/com.twin.app.shoptime/src/components/VideoPlayer/TReactPlayer.jsx @@ -66,7 +66,9 @@ export default function TReactPlayer({ !Object.prototype.hasOwnProperty.call(videoNode, "proportionPlayed") ) { //youtube - window.videoNode = videoNode; + if (typeof window && !window.PalmSystem) { + window.videoNode = videoNode; + } videoNode.play = videoNode.playVideo; videoNode.pause = videoNode.pauseVideo; videoNode.seek = videoNode.seekTo; @@ -101,7 +103,7 @@ export default function TReactPlayer({ }, proportionLoaded: { get: function () { - return videoNode?.playerInfo?.videoBytesLoaded >= 1; //todo + return videoNode?.getVideoBytesLoaded() ?? 0; }, }, proportionPlayed: { @@ -119,7 +121,7 @@ export default function TReactPlayer({ videoNode.setPlaybackRate(playbackRate); } }, - } + }, }); } } diff --git a/com.twin.app.shoptime/src/components/VideoPlayer/VideoPlayer.js b/com.twin.app.shoptime/src/components/VideoPlayer/VideoPlayer.js index dc0a031a..c6477503 100644 --- a/com.twin.app.shoptime/src/components/VideoPlayer/VideoPlayer.js +++ b/com.twin.app.shoptime/src/components/VideoPlayer/VideoPlayer.js @@ -2209,7 +2209,10 @@ const VideoPlayerBase = class extends React.Component { mediaProps.height = height; mediaProps.videoRef = this.setVideoRef; mediaProps.config = reactPlayerConfig; - mediaProps.isYoutube = isYoutube; + delete mediaProps.onUpdate; + delete mediaProps.mediaComponent; + delete mediaProps.ref; + // mediaProps.isYoutube = isYoutube; } const controlsAriaProps = this.getControlsAriaProps();