[16827] Disable transparent video looping (#17000)

This commit is contained in:
Ibrahem Khalil 2023-08-21 11:49:41 +03:00 committed by GitHub
parent 95ec35343c
commit bdfdf687a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 9 deletions

View File

@ -66,13 +66,13 @@
"react-native-randombytes": "^3.6.1", "react-native-randombytes": "^3.6.1",
"react-native-reanimated": "2.11.0", "react-native-reanimated": "2.11.0",
"react-native-redash": "^16.0.11", "react-native-redash": "^16.0.11",
"react-native-svg": "13.10.0",
"react-native-shake": "^3.3.1", "react-native-shake": "^3.3.1",
"react-native-share": "^8.2.2", "react-native-share": "^8.2.2",
"react-native-static-safe-area-insets": "^2.2.0", "react-native-static-safe-area-insets": "^2.2.0",
"react-native-status-keycard": "git+https://github.com/status-im/react-native-status-keycard.git#refs/tags/v2.5.39", "react-native-status-keycard": "git+https://github.com/status-im/react-native-status-keycard.git#refs/tags/v2.5.39",
"react-native-svg": "13.10.0",
"react-native-touch-id": "^4.4.1", "react-native-touch-id": "^4.4.1",
"react-native-transparent-video": "git+https://github.com/status-im/react-native-transparent-video.git#refs/tags/0.0.9", "react-native-transparent-video": "git+https://github.com/status-im/react-native-transparent-video.git#refs/tags/0.1.1",
"react-native-webview": "git+https://github.com/status-im/react-native-webview.git#refs/tags/v11.16.0-status", "react-native-webview": "git+https://github.com/status-im/react-native-webview.git#refs/tags/v11.16.0-status",
"react-syntax-highlighter": "^15.5.0", "react-syntax-highlighter": "^15.5.0",
"rn-emoji-keyboard": "0.7.0", "rn-emoji-keyboard": "0.7.0",

View File

@ -6,7 +6,7 @@
[status-im2.common.parallax.style :as style])) [status-im2.common.parallax.style :as style]))
(defn f-sensor-animated-video (defn f-sensor-animated-video
[{:keys [offset stretch order source disable-parallax?]}] [{:keys [offset stretch order source disable-parallax? enable-looping?]}]
(let [double-stretch (* 2 stretch) (let [double-stretch (* 2 stretch)
{window-width :width {window-width :width
window-height :height} (rn/get-window) window-height :height} (rn/get-window)
@ -25,14 +25,15 @@
image-style]} image-style]}
[transparent-video/view [transparent-video/view
{:source source {:source source
:style style/video}]]))) :style style/video
:loop enable-looping?}]])))
(defn sensor-animated-video (defn sensor-animated-video
[props] [props]
[:f> f-sensor-animated-video props]) [:f> f-sensor-animated-video props])
(defn f-video (defn f-video
[{:keys [layers disable-parallax? offset stretch container-style] [{:keys [layers disable-parallax? offset stretch container-style enable-looping?]
:or {offset 50 :or {offset 50
stretch 0}}] stretch 0}}]
[rn/view [rn/view
@ -44,7 +45,8 @@
:offset offset :offset offset
:stretch stretch :stretch stretch
:order (inc idx) :order (inc idx)
:disable-parallax? disable-parallax?}]) :disable-parallax? disable-parallax?
:enable-looping? enable-looping?}])
layers)]) layers)])
(defn video (defn video

View File

@ -125,7 +125,8 @@
:container-style {:top 40 :container-style {:top 40
:left 20} :left 20}
:layers (:generate-keys resources/parallax-video) :layers (:generate-keys resources/parallax-video)
:disable-parallax? true}] :disable-parallax? true
:enable-looping? false}]
[:f> f-page-title insets]]) [:f> f-page-title insets]])
(defn f-simple-page (defn f-simple-page

View File

@ -9012,9 +9012,9 @@ react-native-touch-id@^4.4.1:
resolved "https://registry.yarnpkg.com/react-native-touch-id/-/react-native-touch-id-4.4.1.tgz#8b1bb2d04c30bac36bb9696d2d723e719c4a8b08" resolved "https://registry.yarnpkg.com/react-native-touch-id/-/react-native-touch-id-4.4.1.tgz#8b1bb2d04c30bac36bb9696d2d723e719c4a8b08"
integrity sha512-1jTl8fC+0fxvqegy/XXTyo6vMvPhjzkoDdaqoYZx0OH8AT250NuXnNPyKktvigIcys3+2acciqOeaCall7lrvg== integrity sha512-1jTl8fC+0fxvqegy/XXTyo6vMvPhjzkoDdaqoYZx0OH8AT250NuXnNPyKktvigIcys3+2acciqOeaCall7lrvg==
"react-native-transparent-video@git+https://github.com/status-im/react-native-transparent-video.git#refs/tags/0.0.9": "react-native-transparent-video@git+https://github.com/status-im/react-native-transparent-video.git#refs/tags/0.1.1":
version "0.1.0" version "0.1.0"
resolved "git+https://github.com/status-im/react-native-transparent-video.git#97d8c773eae82851b170b53c9fc13020f74eefe7" resolved "git+https://github.com/status-im/react-native-transparent-video.git#1327fc622f7521269f66299c3aca610494c76fe1"
"react-native-webview@git+https://github.com/status-im/react-native-webview.git#refs/tags/v11.16.0-status": "react-native-webview@git+https://github.com/status-im/react-native-webview.git#refs/tags/v11.16.0-status":
version "11.16.0" version "11.16.0"