@ray-js/ipc-player-integration 0.0.1-beta-32 → 0.0.1-beta-33
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
2
|
import { Text, View } from '@ray-js/ray';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import Strings from '../../i18n';
|
|
@@ -24,8 +24,7 @@ export const FullResolutionControl = props => {
|
|
|
24
24
|
resolution: props.resolution
|
|
25
25
|
});
|
|
26
26
|
const [shouldHide] = useComponentHideState(screenType);
|
|
27
|
-
const changeResolution = value => {
|
|
28
|
-
console.log('________', value);
|
|
27
|
+
const changeResolution = useCallback(value => {
|
|
29
28
|
if (value === resolution) {
|
|
30
29
|
ty.showToast({
|
|
31
30
|
icon: 'none',
|
|
@@ -33,11 +32,12 @@ export const FullResolutionControl = props => {
|
|
|
33
32
|
});
|
|
34
33
|
} else {
|
|
35
34
|
setResolution(value);
|
|
36
|
-
setFullResolutionActive(false);
|
|
35
|
+
// setFullResolutionActive(false);
|
|
37
36
|
}
|
|
38
|
-
};
|
|
37
|
+
}, [resolution]);
|
|
39
38
|
return /*#__PURE__*/React.createElement(View, {
|
|
40
39
|
className: clsx('ipc-player-plugin-full-resolution-control', {
|
|
40
|
+
'ipc-player-plugin-full-resolution-control-show': fullResolutionActive,
|
|
41
41
|
'ipc-player-plugin-full-resolution-control-hide': shouldHide || !fullResolutionActive
|
|
42
42
|
})
|
|
43
43
|
}, resolutionList.map(item => /*#__PURE__*/React.createElement(Text, {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@animation-time: 0.3s;
|
|
2
|
+
|
|
1
3
|
.ipc-player-plugin-resolution {
|
|
2
4
|
background-color: rgba(255,255,255,0.2);
|
|
3
5
|
padding: calc(4px * var(--ipc-player-size-scale, 1)) calc(5px * var(--ipc-player-size-scale, 1)) !important;
|
|
@@ -15,15 +17,16 @@
|
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
.ipc-player-plugin-full-resolution-control {
|
|
18
|
-
transform: translate(
|
|
20
|
+
transform: translate(300%, 0);
|
|
19
21
|
height: 100%;
|
|
20
|
-
transition: transform
|
|
22
|
+
transition: transform @animation-time ease-in, opacity @animation-time ease-in, width @animation-time ease-in;
|
|
21
23
|
width: 200px;
|
|
22
24
|
display: flex;
|
|
23
25
|
flex-direction: column;
|
|
24
26
|
justify-content: center;
|
|
25
27
|
align-items: center;
|
|
26
28
|
background-color: rgba(0,0,0,0.9);
|
|
29
|
+
animation: ipc-player-plugin-full-resolution-control-move-in @animation-time ease-in-out forwards;
|
|
27
30
|
&.ipc-player-plugin-full-resolution-control-hide {
|
|
28
31
|
transform: translate(300%, 0);
|
|
29
32
|
opacity: 0;
|
|
@@ -43,6 +46,15 @@
|
|
|
43
46
|
z-index: 345;
|
|
44
47
|
}
|
|
45
48
|
|
|
49
|
+
@keyframes ipc-player-plugin-full-resolution-control-move-in {
|
|
50
|
+
form {
|
|
51
|
+
transform: translate(300%, 0);
|
|
52
|
+
}
|
|
53
|
+
to {
|
|
54
|
+
transform: translate(0, 0);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
46
58
|
.ipc-player-plugin-full-resolution-control-text {
|
|
47
59
|
font-size: 14px;
|
|
48
60
|
font-weight: 400;
|