@desynova-digital/player 3.13.12 → 3.13.14
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/components/Video.js +6 -2
- package/package.json +1 -1
- package/utils/index.js +1 -1
package/components/Video.js
CHANGED
|
@@ -95,7 +95,7 @@ var defaultProps = {
|
|
|
95
95
|
aspectRatio: 'auto',
|
|
96
96
|
crossOrigin: 'anonymous'
|
|
97
97
|
};
|
|
98
|
-
var SubTitleSection = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n font-family: SFUIText-Regular;\n font-size: 16px;\n bottom: 20px;\n width: 100%;\n display: flex;\n justify-content: center;\n text-align: center;\n color: #ffffff;\n height: 90%;\n align-items: center;\n\n .subtitleContainer {\n border-radius: 4px;\n width: fit-content;\n background: #000000;\n opacity: 0.9;\n padding: ", ";\n line-height: 20px;\n position: absolute;\n }\n .longSubtitleStyles {\n overflow-y:
|
|
98
|
+
var SubTitleSection = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n font-family: SFUIText-Regular;\n font-size: 16px;\n bottom: 20px;\n width: 100%;\n display: flex;\n justify-content: center;\n text-align: center;\n color: #ffffff;\n height: 90%;\n align-items: center;\n\n .subtitleContainer {\n border-radius: 4px;\n width: fit-content;\n background: #000000;\n opacity: 0.9;\n padding: ", ";\n line-height: 20px;\n position: absolute;\n }\n .longSubtitleStyles {\n overflow-y: auto;\n height: fit-content;\n max-height: 70px;\n max-width: 75%;\n width: fit-content;\n }\n"])), function (props) {
|
|
99
99
|
return props.currentSubtitleObj && props.currentSubtitleObj.line1 ? '8px 10px' : '0px';
|
|
100
100
|
});
|
|
101
101
|
var VideoBlock = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n &.video-react-player-block {\n position: relative;\n transition: all 0.1s ease-in-out;\n -moz-transition: all 0.1s ease-in-out;\n -webkit-transition: all 0.1s ease-in-out;\n -ms-transition: all 0.1s ease-in-out;\n -o-transition: all 0.1s ease-in-out;\n video {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n right: 0;\n bottom: 0;\n }\n .audio-tracks {\n position: relative;\n display: flex;\n background: rgba(0, 0, 0, 0.5);\n color: #fff;\n z-index: 10;\n position: absolute;\n width: 100%;\n bottom: 0;\n p {\n cursor: pointer;\n padding: 10px;\n }\n }\n .loader-container {\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n z-index: 10;\n background: rgba(0, 0, 0, 0.5);\n }\n }\n &.ratio-border {\n border: 1px solid rgba(255, 255, 255, 0.5);\n &:after {\n content: '16:9 Safe Area';\n position: absolute;\n color: #fff;\n font-family: SFUIText-Regular;\n font-size: 12px;\n transform: rotate(-90deg);\n top: 20%;\n left: -50px;\n }\n }\n"])));
|
|
@@ -474,6 +474,7 @@ var Video = /*#__PURE__*/function (_Component) {
|
|
|
474
474
|
var style = this.getSubtitleStyle(newProps.subtitleObj.field);
|
|
475
475
|
this.setState({
|
|
476
476
|
currentSubtitleObj: {
|
|
477
|
+
charactername: newProps.subtitleObj.field.charactername,
|
|
477
478
|
line1: newProps.subtitleObj.field.line1,
|
|
478
479
|
line2: newProps.subtitleObj.field.line2,
|
|
479
480
|
start_time: newProps.subtitleObj.field.in_time,
|
|
@@ -747,6 +748,7 @@ var Video = /*#__PURE__*/function (_Component) {
|
|
|
747
748
|
} else {
|
|
748
749
|
this.setState({
|
|
749
750
|
currentSubtitleObj: {
|
|
751
|
+
charactername: currentValue[0] && currentValue[0].charactername || '',
|
|
750
752
|
line1: currentValue[0] && currentValue[0].line1 || '',
|
|
751
753
|
line2: currentValue[0] && currentValue[0].line2 || '',
|
|
752
754
|
start_time: currentValue[0] && currentValue[0].start_time || 0,
|
|
@@ -1245,7 +1247,9 @@ var Video = /*#__PURE__*/function (_Component) {
|
|
|
1245
1247
|
},
|
|
1246
1248
|
className: "subtitleContainer longSubtitleStyles",
|
|
1247
1249
|
style: _objectSpread({}, currentSubtitleObj.style)
|
|
1248
|
-
}, currentSubtitleObj.
|
|
1250
|
+
}, currentSubtitleObj.charactername && /*#__PURE__*/_react["default"].createElement("p", {
|
|
1251
|
+
id: "charactername"
|
|
1252
|
+
}, " ", currentSubtitleObj.charactername, " ") || null, currentSubtitleObj.line1 && /*#__PURE__*/_react["default"].createElement("p", {
|
|
1249
1253
|
id: "subtitleLineOne"
|
|
1250
1254
|
}, " ", currentSubtitleObj.line1, " ") || null, currentSubtitleObj.line2 && /*#__PURE__*/_react["default"].createElement("p", {
|
|
1251
1255
|
id: "subtitleLineTwo"
|
package/package.json
CHANGED
package/utils/index.js
CHANGED
|
@@ -44,7 +44,7 @@ function secondsToTime() {
|
|
|
44
44
|
var frameRate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 25;
|
|
45
45
|
var initialTimecodeInSeconds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
46
46
|
if (seconds > -1) {
|
|
47
|
-
var totalFrames = Math.round((seconds + initialTimecodeInSeconds) * frameRate);
|
|
47
|
+
var totalFrames = Math.round((seconds + (initialTimecodeInSeconds || 0)) * frameRate);
|
|
48
48
|
|
|
49
49
|
// Calculate new timecode
|
|
50
50
|
var newFrames = totalFrames;
|