Skip to content

Commit

Permalink
fix(MOO-803): react-native-video version update to 6.4.5 (MIN-10.13) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmad-Elsayed authored Sep 6, 2024
2 parents 3506a33 + eb44c34 commit d1976d9
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 61 deletions.
2 changes: 1 addition & 1 deletion packages/jsActions/mobile-resources-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@
"rimraf": "^2.7.1",
"rollup": "^2.68.0"
}
}
}
4 changes: 4 additions & 0 deletions packages/pluggableWidgets/video-player-native/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Changed

- We have updated `react-native-video` version to 6.4.5

## [5.0.1] - 2024-8-29

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions packages/pluggableWidgets/video-player-native/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "video-player-native",
"widgetName": "VideoPlayer",
"version": "5.0.1",
"version": "6.0.0",
"license": "Apache-2.0",
"repository": {
"type": "git",
Expand All @@ -23,7 +23,7 @@
"deprecated-react-native-prop-types": "^4.0.0",
"react-native-system-navigation-bar": "2.6.3",
"react-native-vector-icons": "10.0.3",
"react-native-video": "5.2.1"
"react-native-video": "6.4.5"
},
"devDependencies": {
"@mendix/piw-utils-internal": "1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
NativeModules,
Pressable
} from "react-native";
import Video, { OnProgressData, VideoProperties } from "react-native-video";
import Video, { OnProgressData, ReactVideoProps, VideoRef } from "react-native-video";
import Icon from "react-native-vector-icons/MaterialIcons";
import { VideoPlayerProps } from "../typings/VideoPlayerProps";
import { defaultVideoStyle, VideoStyle } from "./ui/Styles";
Expand All @@ -29,8 +29,8 @@ const enum StatusEnum {
export function VideoPlayer(props: VideoPlayerProps<VideoStyle>): ReactElement {
const [styles, setStyles] = useState(flattenStyles(defaultVideoStyle, props.style));
const timeoutRef = useRef<NodeJS.Timeout>();
const playerRef = useRef<Video>(null);
const fullScreenPlayerRef = useRef<Video>(null);
const playerRef = useRef<VideoRef>(null);
const fullScreenPlayerRef = useRef<VideoRef>(null);
const [status, setStatus] = useState(StatusEnum.NOT_READY);
const [videoAspectRatio, setVideoAspectRatio] = useState(0);
const [fullScreen, setFullScreen] = useState(false);
Expand Down Expand Up @@ -100,7 +100,7 @@ export function VideoPlayer(props: VideoPlayerProps<VideoStyle>): ReactElement {
}
}

const videoProps: VideoProperties = {
const videoProps: ReactVideoProps = {
testID: props.name,
source: { uri: isAvailable(props.videoUrl) ? props.videoUrl.value : undefined },
muted: props.muted,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { dynamicValue } from "@mendix/piw-utils-internal";
import { createElement } from "react";
import { Modal, View } from "react-native";
import { fireEvent, render, waitFor } from "@testing-library/react-native";
import { VideoProperties } from "react-native-video";
import { ReactVideoProps } from "react-native-video";

import { VideoPlayer } from "../VideoPlayer";
import { VideoPlayerProps } from "../../typings/VideoPlayerProps";
Expand Down Expand Up @@ -38,7 +38,7 @@ describe("VideoPlayer", () => {

it("passes the right props to the video player", () => {
const component = render(<VideoPlayer {...defaultProps} />);
const props = component.getByTestId("video-player-test").props as VideoProperties;
const props = component.getByTestId("video-player-test").props as ReactVideoProps;

expect(props.source).toEqual({ uri: "https://mendix.com/video.mp4" });
expect(props.paused).toBe(true);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<package xmlns="http://www.mendix.com/package/1.0/">
<clientModule name="VideoPlayer" version="5.0.1" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="VideoPlayer" version="6.0.0" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="VideoPlayer.xml" />
</widgetFiles>
Expand Down
59 changes: 8 additions & 51 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3916,13 +3916,6 @@ __metadata:
languageName: node
linkType: hard

"@react-native/normalize-color@npm:*":
version: 2.1.0
resolution: "@react-native/normalize-color@npm:2.1.0"
checksum: 10/a72b98538e6b7e265fb0669b8767d5f788777fb1a0ac1df7b0c82d8b3a804c8122aa7b819688c5e36fcf90b5ba93050b0070e29d3f0d70ab9530c2abd2bb9f9e
languageName: node
linkType: hard

"@react-native/normalize-color@npm:^2.0.0":
version: 2.0.0
resolution: "@react-native/normalize-color@npm:2.0.0"
Expand Down Expand Up @@ -7633,17 +7626,6 @@ __metadata:
languageName: node
linkType: hard

"deprecated-react-native-prop-types@npm:^2.2.0":
version: 2.3.0
resolution: "deprecated-react-native-prop-types@npm:2.3.0"
dependencies:
"@react-native/normalize-color": "npm:*"
invariant: "npm:*"
prop-types: "npm:*"
checksum: 10/5abbad5b6d6830ca92151167f42611256ada1e8991b5066ed3659f3bbe909ae87949f3e7f075f1b685256138cad81423222220f4c6d5740376db19cb9f793312
languageName: node
linkType: hard

"deprecated-react-native-prop-types@npm:^4.0.0":
version: 4.0.0
resolution: "deprecated-react-native-prop-types@npm:4.0.0"
Expand Down Expand Up @@ -7925,13 +7907,6 @@ __metadata:
languageName: node
linkType: hard

"eme-encryption-scheme-polyfill@npm:^2.0.1":
version: 2.1.1
resolution: "eme-encryption-scheme-polyfill@npm:2.1.1"
checksum: 10/312fab39d5f2d59fcca97148c9f85c50081591b465f6f43b6ab30dc0cab27609ce32a59b67849a8b9316bdcc25b3ff7ebb1f923ae470d10c3136ba95e5496371
languageName: node
linkType: hard

"emittery@npm:^0.13.1":
version: 0.13.1
resolution: "emittery@npm:0.13.1"
Expand Down Expand Up @@ -11754,13 +11729,6 @@ __metadata:
languageName: node
linkType: hard

"keymirror@npm:^0.1.1":
version: 0.1.1
resolution: "keymirror@npm:0.1.1"
checksum: 10/be8f0bc5ff7d561d729f935ef55b4dbbea7b56a4714f044a2212088730f4d52f73935c38c5a9604e0f1157611725ee493cb7d08d1f3eb34151c0aa999236206a
languageName: node
linkType: hard

"kind-of@npm:^5.0.0":
version: 5.1.0
resolution: "kind-of@npm:5.1.0"
Expand Down Expand Up @@ -15573,15 +15541,13 @@ __metadata:
languageName: node
linkType: hard

"react-native-video@npm:5.2.1":
version: 5.2.1
resolution: "react-native-video@npm:5.2.1"
dependencies:
deprecated-react-native-prop-types: "npm:^2.2.0"
keymirror: "npm:^0.1.1"
prop-types: "npm:^15.7.2"
shaka-player: "npm:^2.5.9"
checksum: 10/bd44c45bbcfa13209bf317ec7e5bf63aa73778ab38a7868d74ea1e4b9b7d781fd155cbc8612d5cd1579f89ae324e3c7956de47a20645c026cf91784b9db7d714
"react-native-video@npm:6.4.5":
version: 6.4.5
resolution: "react-native-video@npm:6.4.5"
peerDependencies:
react: "*"
react-native: "*"
checksum: 10/dfaf802c5dbde81d022528e325babd443bd0d08e77eef3cc959c7c2a9087632dd4b7b35efa2ba92dab202f2f3aeb52aa97334d2499b532d13cfd78d6599a787e
languageName: node
linkType: hard

Expand Down Expand Up @@ -16668,15 +16634,6 @@ __metadata:
languageName: node
linkType: hard

"shaka-player@npm:^2.5.9":
version: 2.5.23
resolution: "shaka-player@npm:2.5.23"
dependencies:
eme-encryption-scheme-polyfill: "npm:^2.0.1"
checksum: 10/985ec3baaeb239d68e8af6a631eed53cb7a3d7b2eb877c95954cf645ef9d946421c94fc52fc4a305ce7fce1931426f26c401278a27e87a9479d82ddb729d1fa8
languageName: node
linkType: hard

"shallow-clone@npm:^1.0.0":
version: 1.0.0
resolution: "shallow-clone@npm:1.0.0"
Expand Down Expand Up @@ -18623,7 +18580,7 @@ __metadata:
eslint: "npm:^7.20.0"
react-native-system-navigation-bar: "npm:2.6.3"
react-native-vector-icons: "npm:10.0.3"
react-native-video: "npm:5.2.1"
react-native-video: "npm:6.4.5"
languageName: unknown
linkType: soft

Expand Down

0 comments on commit d1976d9

Please sign in to comment.