@desynova-digital/components 9.0.26 → 9.1.0

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.
Files changed (170) hide show
  1. package/_helpers/globals.js +9 -10
  2. package/_helpers/pagination.js +10 -15
  3. package/_helpers/story-example.js +16 -39
  4. package/_helpers/story-helpers.js +15 -14
  5. package/_helpers/story-stack.js +22 -43
  6. package/_helpers/uniqueId.js +2 -5
  7. package/_helpers/utils.js +28 -4
  8. package/atoms/avatar/avatar.js +19 -42
  9. package/atoms/avatar/avatar.story.js +25 -58
  10. package/atoms/avatar/index.js +13 -11
  11. package/atoms/badge/badge.js +14 -37
  12. package/atoms/badge/badge.story.js +45 -103
  13. package/atoms/badge/index.js +12 -10
  14. package/atoms/button/button.js +85 -161
  15. package/atoms/button/button.story.js +354 -508
  16. package/atoms/button/index.js +5 -9
  17. package/atoms/card/card.js +26 -55
  18. package/atoms/card/card.story.js +39 -88
  19. package/atoms/card/index.js +12 -10
  20. package/atoms/cardStack/cardStack.js +88 -147
  21. package/atoms/cardStack/cardStack.story.js +106 -210
  22. package/atoms/cardStack/index.js +12 -10
  23. package/atoms/cardV2/cardV2.js +57 -106
  24. package/atoms/cardV2/cardV2.story.js +184 -232
  25. package/atoms/cardV2/content.js +154 -256
  26. package/atoms/cardV2/index.js +4 -8
  27. package/atoms/cardV2/thumbnail.js +138 -208
  28. package/atoms/cardV2/timeline.js +167 -123
  29. package/atoms/checkbox/checkbox.js +85 -157
  30. package/atoms/checkbox/checkbox.story.js +237 -365
  31. package/atoms/checkbox/index.js +4 -9
  32. package/atoms/customSelect/customSelect.js +136 -215
  33. package/atoms/customSelect/customSelect.story.js +745 -851
  34. package/atoms/customSelect/index.js +4 -8
  35. package/atoms/datePicker/datePicker.js +299 -431
  36. package/atoms/datePicker/datePicker.story.js +453 -501
  37. package/atoms/datePicker/index.js +4 -8
  38. package/atoms/dateTime/dateTime.js +3 -6
  39. package/atoms/dateTime/dateTime.story.js +17 -63
  40. package/atoms/dateTime/index.js +5 -9
  41. package/atoms/draftInputText/draftInputText.js +121 -189
  42. package/atoms/draftInputText/draftInputText.story.js +200 -249
  43. package/atoms/draftInputText/index.js +5 -9
  44. package/atoms/dropdown/dropdown.js +38 -66
  45. package/atoms/dropdown/dropdown.story.js +102 -262
  46. package/atoms/dropdown/index.js +4 -8
  47. package/atoms/dropdownList/dropdownList.js +78 -108
  48. package/atoms/dropdownList/dropdownList.story.js +1546 -1621
  49. package/atoms/dropdownList/index.js +4 -8
  50. package/atoms/graphs/barGraph/barGraph.js +95 -146
  51. package/atoms/graphs/barGraph/barGraph.story.js +65 -87
  52. package/atoms/graphs/barGraph/index.js +4 -8
  53. package/atoms/graphs/circleDonut/circleDonut.js +177 -229
  54. package/atoms/graphs/circleDonut/circleDonut.story.js +328 -394
  55. package/atoms/graphs/circleDonut/index.js +5 -9
  56. package/atoms/graphs/circleGraph/circleGraph.js +60 -90
  57. package/atoms/graphs/circleGraph/circleGraph.story.js +36 -54
  58. package/atoms/graphs/circleGraph/index.js +4 -8
  59. package/atoms/graphs/circleNested/circleNested.js +216 -262
  60. package/atoms/graphs/circleNested/circleNested.story.js +91 -116
  61. package/atoms/graphs/circleNested/index.js +5 -9
  62. package/atoms/graphs/pieChart/index.js +4 -8
  63. package/atoms/graphs/pieChart/pieChart.js +162 -191
  64. package/atoms/graphs/pieChart/pieChart.story.js +147 -176
  65. package/atoms/graphs/verticalBarGraph/index.js +5 -9
  66. package/atoms/graphs/verticalBarGraph/verticalBarGraph.js +75 -98
  67. package/atoms/graphs/verticalBarGraph/verticalBarGraph.story.js +26 -45
  68. package/atoms/icon/icon.js +41 -72
  69. package/atoms/icon/icon.story.js +831 -260
  70. package/atoms/icon/index.js +19 -12
  71. package/atoms/image/image.js +18 -32
  72. package/atoms/image/image.story.js +10 -19
  73. package/atoms/image/index.js +4 -8
  74. package/atoms/inputText/index.js +4 -8
  75. package/atoms/inputText/inputText.js +86 -131
  76. package/atoms/inputText/inputText.story.js +191 -255
  77. package/atoms/label/index.js +4 -8
  78. package/atoms/label/label.js +25 -50
  79. package/atoms/label/label.story.js +42 -83
  80. package/atoms/loader/CircleLoader.js +29 -63
  81. package/atoms/loader/ShimmerComponent/CollabShimmerCard.js +39 -50
  82. package/atoms/loader/ShimmerComponent/CollabShimmerCardTray.js +41 -42
  83. package/atoms/loader/ShimmerComponent/FiltersShimmer.js +30 -30
  84. package/atoms/loader/ShimmerComponent/GraphDetailShimmer.js +21 -34
  85. package/atoms/loader/ShimmerComponent/GraphTitleShimmer.js +30 -34
  86. package/atoms/loader/ShimmerComponent/GraphsComponentShimmer.js +23 -32
  87. package/atoms/loader/ShimmerComponent/Shimmer.js +24 -32
  88. package/atoms/loader/ThreeDotLoader.js +14 -29
  89. package/atoms/loader/index.js +13 -11
  90. package/atoms/loader/loader.js +34 -58
  91. package/atoms/loader/loader.story.js +48 -52
  92. package/atoms/loader/spinningLoader.js +23 -34
  93. package/atoms/popup/index.js +5 -9
  94. package/atoms/popup/popup.js +123 -208
  95. package/atoms/popup/popup.story.js +97 -131
  96. package/atoms/radio/index.js +18 -11
  97. package/atoms/radio/radio.js +58 -112
  98. package/atoms/radio/radio.story.js +197 -420
  99. package/atoms/select/index.js +4 -8
  100. package/atoms/select/select.js +48 -86
  101. package/atoms/sideBar/index.js +5 -9
  102. package/atoms/sideBar/sidebar.js +89 -140
  103. package/atoms/switch/index.js +4 -8
  104. package/atoms/switch/switch.js +56 -86
  105. package/atoms/switch/switch.story.js +268 -415
  106. package/atoms/tag/index.js +12 -10
  107. package/atoms/tag/tag.js +29 -63
  108. package/atoms/tag/tag.story.js +135 -209
  109. package/atoms/textarea/index.js +5 -9
  110. package/atoms/textarea/textarea.js +55 -99
  111. package/atoms/textarea/textarea.story.js +48 -41
  112. package/atoms/thematicBreak/index.js +12 -10
  113. package/atoms/thematicBreak/thematicBreak.js +20 -38
  114. package/atoms/thematicBreak/thematicBreak.story.js +25 -37
  115. package/atoms/timeCodeInput/index.js +4 -8
  116. package/atoms/timeCodeInput/timCodeInput.story.js +21 -35
  117. package/atoms/timeCodeInput/timeCodeInput.js +33 -51
  118. package/atoms/timer/index.js +5 -9
  119. package/atoms/timer/timer.js +57 -108
  120. package/atoms/timer/timer.story.js +13 -26
  121. package/atoms/toast/index.js +5 -9
  122. package/atoms/toast/toast.js +81 -116
  123. package/atoms/toast/toast.story.js +50 -76
  124. package/atoms/videoCard/index.js +12 -10
  125. package/atoms/videoCard/videoCard.js +265 -447
  126. package/atoms/videoCard/videoCard.story.js +495 -710
  127. package/components.js +411 -294
  128. package/index.js +350 -61
  129. package/molecules/carousel/carousel.js +121 -207
  130. package/molecules/carousel/carousel.story.js +240 -223
  131. package/molecules/carousel/index.js +5 -9
  132. package/molecules/errorScreen/CollabErrorScreen.js +35 -66
  133. package/molecules/errorScreen/TableErrorScreen.js +109 -102
  134. package/molecules/errorScreen/TableErrorScreen.jsx +7 -6
  135. package/molecules/errorScreen/errorScreen.js +41 -94
  136. package/molecules/filter/constants.js +1 -0
  137. package/molecules/filter/filter.js +378 -562
  138. package/molecules/filter/filter.story.js +79 -104
  139. package/molecules/filter/index.js +5 -9
  140. package/molecules/graphCard/graphCard.js +97 -193
  141. package/molecules/graphCard/graphCard.story.js +159 -191
  142. package/molecules/graphCard/index.js +4 -8
  143. package/molecules/graphCard/loader.js +28 -68
  144. package/molecules/graphDetailCard/graphDetailCard.js +115 -183
  145. package/molecules/graphDetailCard/graphDetailCard.story.js +218 -254
  146. package/molecules/graphDetailCard/index.js +5 -9
  147. package/molecules/pageHeader/index.js +12 -10
  148. package/molecules/pageHeader/pageHeader.js +38 -79
  149. package/molecules/pageHeader/pageHeader.story.js +34 -55
  150. package/molecules/pagination/index.js +4 -8
  151. package/molecules/pagination/pagination.js +126 -202
  152. package/molecules/pagination/pagination.story.js +40 -52
  153. package/molecules/richTextInput/RichTextInput.js +354 -0
  154. package/molecules/richTextInput/RichTextInput.story.js +50 -0
  155. package/molecules/richTextInput/index.js +9 -0
  156. package/molecules/table/index.js +4 -8
  157. package/molecules/table/table-column.js +10 -16
  158. package/molecules/table/table-header.js +31 -72
  159. package/molecules/table/table.js +743 -1075
  160. package/molecules/table/table.story.js +274 -304
  161. package/molecules/tabs/index.js +4 -8
  162. package/molecules/tabs/tabs.js +112 -184
  163. package/molecules/tabs/tabs.story.js +66 -133
  164. package/molecules/videoCardList/index.js +4 -8
  165. package/molecules/videoCardList/videoCardList.js +24 -41
  166. package/molecules/videoCardList/videoCardList.story.js +449 -664
  167. package/molecules/videoPlayer/index.js +4 -8
  168. package/molecules/videoPlayer/videoPlayer.js +1019 -1097
  169. package/molecules/videoPlayer/videoPlayer.story.js +10 -21
  170. package/package.json +2 -2
@@ -1,1118 +1,1040 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
- value: true
5
+ value: true
5
6
  });
6
-
7
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
8
-
9
- var _templateObject = _taggedTemplateLiteral(['\n display: flex;\n height: 100%;\n'], ['\n display: flex;\n height: 100%;\n']),
10
- _templateObject2 = _taggedTemplateLiteral(['\n position: relative;\n width: 63.67%;\n background: #000;\n .player-block {\n width: 100%;\n }\n'], ['\n position: relative;\n width: 63.67%;\n background: #000;\n .player-block {\n width: 100%;\n }\n']),
11
- _templateObject3 = _taggedTemplateLiteral(['\n height: 91px;\n background: #000000;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n ', ' {\n margin: inherit;\n margin-left: 20px;\n }\n'], ['\n height: 91px;\n background: #000000;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n ', ' {\n margin: inherit;\n margin-left: 20px;\n }\n']),
12
- _templateObject4 = _taggedTemplateLiteral(['\n margin-left: 20px;\n color: #fff;\n text-align: left;\n .video-title {\n font-family: SFUIText-Medium;\n font-size: 18px;\n line-height: 1.11;\n margin-bottom: 10px;\n color: #ffffff;\n }\n .video-details-block {\n display: flex;\n align-items: center;\n p.video-number {\n font-family: SFUIText-Regular;\n font-size: 12px;\n color: #cccccc;\n }\n .video-files-block {\n display: flex;\n align-items: center;\n margin: 0 30px 0 20px;\n p.video-file-type {\n font-family: SFUIText-Medium;\n font-size: 10px;\n font-weight: 500;\n font-style: normal;\n font-stretch: normal;\n line-height: 1;\n letter-spacing: 0.4px;\n color: #ffffff;\n text-transform: uppercase;\n }\n p.video-file-versions {\n font-family: SFUIText-Regular;\n font-size: 10px;\n width: 20px;\n color: #00cec6;\n border: 1px solid #00cec6;\n border-radius: 100%;\n height: 20px;\n box-sizing: border-box;\n padding: 4px 2px;\n text-align: center;\n margin: 0 2px;\n }\n }\n .video-time-block {\n display: flex;\n align-items: center;\n font-family: SFUIText-Regular;\n font-size: 12px;\n line-height: 1;\n letter-spacing: -0.4px;\n color: #cccccc;\n .time {\n ', ' {\n vertical-align: bottom;\n }\n p{\n display: inline-block;\n margin: 0 5px;\n vertical-align: sub;\n line-height: 10px;\n }\n }\n }\n }\n'], ['\n margin-left: 20px;\n color: #fff;\n text-align: left;\n .video-title {\n font-family: SFUIText-Medium;\n font-size: 18px;\n line-height: 1.11;\n margin-bottom: 10px;\n color: #ffffff;\n }\n .video-details-block {\n display: flex;\n align-items: center;\n p.video-number {\n font-family: SFUIText-Regular;\n font-size: 12px;\n color: #cccccc;\n }\n .video-files-block {\n display: flex;\n align-items: center;\n margin: 0 30px 0 20px;\n p.video-file-type {\n font-family: SFUIText-Medium;\n font-size: 10px;\n font-weight: 500;\n font-style: normal;\n font-stretch: normal;\n line-height: 1;\n letter-spacing: 0.4px;\n color: #ffffff;\n text-transform: uppercase;\n }\n p.video-file-versions {\n font-family: SFUIText-Regular;\n font-size: 10px;\n width: 20px;\n color: #00cec6;\n border: 1px solid #00cec6;\n border-radius: 100%;\n height: 20px;\n box-sizing: border-box;\n padding: 4px 2px;\n text-align: center;\n margin: 0 2px;\n }\n }\n .video-time-block {\n display: flex;\n align-items: center;\n font-family: SFUIText-Regular;\n font-size: 12px;\n line-height: 1;\n letter-spacing: -0.4px;\n color: #cccccc;\n .time {\n ', ' {\n vertical-align: bottom;\n }\n p{\n display: inline-block;\n margin: 0 5px;\n vertical-align: sub;\n line-height: 10px;\n }\n }\n }\n }\n']),
13
- _templateObject5 = _taggedTemplateLiteral(['\n position: relative;\n background: #000000;\n width: 100%;\n padding-top: 56.25%;\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'], ['\n position: relative;\n background: #000000;\n width: 100%;\n padding-top: 56.25%;\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']),
14
- _templateObject6 = _taggedTemplateLiteral(['\n background: linear-gradient(to right, rgb(0,200,231, 0.6), rgb(0,230,185, 0.6));\n width: 100px;\n height: 100px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n border: none;\n'], ['\n background: linear-gradient(to right, rgb(0,200,231, 0.6), rgb(0,230,185, 0.6));\n width: 100px;\n height: 100px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n border: none;\n']),
15
- _templateObject7 = _taggedTemplateLiteral(['\n opacity: 0.3;\n border: solid 1px #ffffff;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%,-50%);\n -ms-transform: translate(-50%,-50%);\n -o-transform: translate(-50%,-50%);\n -moz-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n position: absolute;\n padding-left: 75%;\n height: 100%;\n'], ['\n opacity: 0.3;\n border: solid 1px #ffffff;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%,-50%);\n -ms-transform: translate(-50%,-50%);\n -o-transform: translate(-50%,-50%);\n -moz-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n position: absolute;\n padding-left: 75%;\n height: 100%;\n']),
16
- _templateObject8 = _taggedTemplateLiteral(['\n width: 100%;\n height: 60px;\n position: relative;\n'], ['\n width: 100%;\n height: 60px;\n position: relative;\n']),
17
- _templateObject9 = _taggedTemplateLiteral(['\n width: 100%;\n height: 4px;\n position: relative;\n cursor: pointer;\n .seekbar-bg {\n background: rgba(0,0,0,0.3);\n width: 100%;\n height: 100%;\n }\n .play-progress {\n position: absolute;\n width: 0px;\n height: 100%;\n left: 0;\n top: 0;\n background: #00cec6;\n &:after {\n content: \'\';\n width: 12px;\n height: 12px;\n position: absolute;\n background: #00cec6;\n border-radius: 100%;\n right: -6px;\n top: -5px;\n box-shadow: 0 0 14px 1px #00cec6;\n }\n }\n'], ['\n width: 100%;\n height: 4px;\n position: relative;\n cursor: pointer;\n .seekbar-bg {\n background: rgba(0,0,0,0.3);\n width: 100%;\n height: 100%;\n }\n .play-progress {\n position: absolute;\n width: 0px;\n height: 100%;\n left: 0;\n top: 0;\n background: #00cec6;\n &:after {\n content: \'\';\n width: 12px;\n height: 12px;\n position: absolute;\n background: #00cec6;\n border-radius: 100%;\n right: -6px;\n top: -5px;\n box-shadow: 0 0 14px 1px #00cec6;\n }\n }\n']),
18
- _templateObject10 = _taggedTemplateLiteral(['\n height: calc(100% - 4px);\n background: #000000;\n display: flex;\n justify-content: space-between;\n padding: 0 10px;\n align-items: center;\n .controls-left, .controls-right {\n display: flex;\n align-items: center;\n ', ' {\n background: transparent;\n border: none;\n margin: 0 10px;\n }\n }\n .controls-left{\n .video-time-display {\n display: flex;\n align-items: center;\n font-family: SFUIText-Regular;\n font-size: 12px;\n letter-spacing: -0.6px;\n .video-time {\n margin: 0 2px;\n &.video-end-time, &.video-time-seperator {\n color: #888888;\n }\n &.video-current-time {\n color: #ffffff;\n min-width: 64px;\n }\n }\n }\n }\n'], ['\n height: calc(100% - 4px);\n background: #000000;\n display: flex;\n justify-content: space-between;\n padding: 0 10px;\n align-items: center;\n .controls-left, .controls-right {\n display: flex;\n align-items: center;\n ', ' {\n background: transparent;\n border: none;\n margin: 0 10px;\n }\n }\n .controls-left{\n .video-time-display {\n display: flex;\n align-items: center;\n font-family: SFUIText-Regular;\n font-size: 12px;\n letter-spacing: -0.6px;\n .video-time {\n margin: 0 2px;\n &.video-end-time, &.video-time-seperator {\n color: #888888;\n }\n &.video-current-time {\n color: #ffffff;\n min-width: 64px;\n }\n }\n }\n }\n']),
19
- _templateObject11 = _taggedTemplateLiteral(['\n display: flex;\n background-color: #333333;\n align-items: center;\n justify-content: space-between;\n ', ' {\n height: 100%;\n color: #ccc;\n padding: 15px 10px 15px 20px;\n border-bottom: none;\n }\n ', ' {\n margin: 0;\n background: #333333;\n border: none;\n ', ' {\n svg {\n path {\n fill: #00cec6;\n }\n }\n }\n }\n'], ['\n display: flex;\n background-color: #333333;\n align-items: center;\n justify-content: space-between;\n ', ' {\n height: 100%;\n color: #ccc;\n padding: 15px 10px 15px 20px;\n border-bottom: none;\n }\n ', ' {\n margin: 0;\n background: #333333;\n border: none;\n ', ' {\n svg {\n path {\n fill: #00cec6;\n }\n }\n }\n }\n']),
20
- _templateObject12 = _taggedTemplateLiteral(['\n height: 91px;\n background: #000000;\n'], ['\n height: 91px;\n background: #000000;\n']),
21
- _templateObject13 = _taggedTemplateLiteral(['\n width: 36.33%;\n .tab-block {\n height: 100%;\n .tab-container {\n padding: 20px;\n text-align: left;\n .info-block {\n width: 33.33%;\n display: inline-block;\n padding-bottom: 25px;\n &:last-child{\n width: 100%;\n }\n .info-header {\n font-family: SFUIText-Regular;\n font-size: 10px;\n color: #666666;\n color: #cccccc;\n margin-bottom: 20px;\n }\n .info-value {\n font-family: SFUIText-Regular;\n font-size: 14px;\n color: #333333;\n color: #ffffff;\n }\n }\n &.scenes-tab {\n hr {\n border-color: #eeeeee;\n border-color: #4e5c6c;\n }\n .scenes-synopsis {\n .info-header {\n font-family: SFUIText-Regular;\n font-size: 12px;\n color: #333333;\n color: #cccccc;\n text-transform: uppercase;\n margin-bottom: 10px;\n }\n .synopsis {\n font-family: SFUIText-Regular;\n font-size: 12px;\n line-height: 1.33;\n color: #666666;\n color: #ffffff;\n margin-bottom: 10px;\n }\n }\n .scenes-wrapper {\n .scene-container{\n &:last-child {\n hr {\n display: none;\n }\n }\n .scene-block {\n display: flex;\n justify-content: flex-start;\n align-items: flex-start;\n cursor: pointer;\n &:hover{\n .scene-image {\n ', ' {\n display: inline-block;\n }\n }\n }\n .scene-image {\n width: 70px;\n height: 70px;\n border-radius: 100%;\n overflow: hidden;\n position: relative;\n ', ' {\n display: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n -webkit-transform: translate(-50%, -50%);\n -moz-transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n -o-transform: translate(-50%, -50%);\n }\n }\n .scene-details {\n margin-left: 15px;\n .scene-name {\n font-family: SFUIText-Medium;\n font-size: 12px;\n font-weight: 500;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n color: #333333;\n color: #ffffff;\n margin-bottom: 5px;\n }\n .scene-time {\n font-family: SFUIText-Medium;\n font-size: 12px;\n font-weight: 500;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n color: #888888;\n color: #aaaaaa;\n margin-bottom: 5px;\n }\n .scene-tags-block {\n display: flex;\n justify-content: flex-start;\n align-items: flex-start;\n .scene-tags {\n font-family: SFUIText-Medium;\n font-size: 12px;\n font-weight: 500;\n font-style: normal;\n font-stretch: normal;\n line-height: 1.17;\n letter-spacing: normal;\n color: #c7c5c5;\n color: #999999;\n margin-right: 5px;\n }\n }\n }\n }\n }\n }\n }\n &.comments-tab {\n padding: 0;\n position: relative;\n width: 100%;\n height: 100%;\n .comments-section {\n padding: 10px 0;\n height: calc(100% - 73px);\n overflow: auto;\n top: 0;\n position: absolute;\n left: 0;\n width: 100%;\n .comments-details {\n padding: 10px 20px 10px 20px;\n .comments-count {\n font-size: 14px;\n font-weight: normal;\n font-family: SFUIText-Regular;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n color: #333333;\n color: #cccccc;\n }\n }\n .comments-container {\n .comment-wrapper {\n padding: 20px;\n cursor: pointer;\n &:hover {\n background: #f5f5f5;\n background: #304153;\n }\n .comment-block, .reply-block {\n .comment-header {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin-bottom: 10px;\n position: relative;\n z-index: 2;\n img {\n width: 30px;\n height: 30px;\n border-radius: 100%;\n left: auto;\n top: auto;\n transform: none;\n }\n .user-name {\n padding: 0px 20px 0px 10px;\n font-family: SFUIText-Medium;\n font-size: 12px;\n font-weight: 500;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n color: #333333;\n color: #ffffff;\n }\n .video-time {\n opacity: 0.8;\n font-family: SFUIText-Regular;\n font-size: 12px;\n font-weight: normal;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n color: #626260;\n color: #cccccc;\n text-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);\n }\n .comment-time {\n opacity: 0.2;\n opacity: 1;\n font-family: SFUIText-Regular;\n font-size: 12px;\n font-weight: normal;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n color: #000000;\n color: #aaaaaa;\n margin-left: 20px;\n }\n }\n .comment-body {\n p {\n font-family: SFUIText-Regular;\n font-size: 13px;\n font-weight: 300;\n font-style: normal;\n font-stretch: normal;\n line-height: 1.38;\n letter-spacing: normal;\n color: #333333;\n color: #ffffff;\n }\n }\n }\n .reply-wrapper {\n .reply-block {\n padding-left: 20px;\n padding-top: 15px;\n position: relative;\n &:after {\n content: \'\';\n position: absolute;\n width: 1px;\n height: 100%;\n background: #cccccc;\n background: #4e5c6c;\n top: 15px;\n z-index: 0;\n left: 35px;\n }\n &:last-child {\n &:after {\n display: none;\n }\n }\n .comment-body {\n padding-left: 40px;\n }\n }\n }\n }\n }\n }\n .approval-block {\n height: 73px;\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n padding: 0 10px;\n background: #121d29;\n background: #ffffff;\n position: absolute;\n width: 100%;\n bottom: 0;\n ', ' {\n font-size: 12px;\n margin: 0 10px;\n }\n }\n }\n &.tags-tab {\n .tag-header {\n font-family: SFUIText-Regular;\n font-size: 12px;\n font-weight: normal;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n color: #cccccc;\n }\n .characters-list {\n margin: 10px 0;\n .actor-tag {\n width: 70px;\n height: 70px;\n border-radius: 100%;\n background: #121d29;\n display: inline-block;\n vertical-align: middle;\n margin: 10px;\n position: relative;\n overflow: hidden;\n cursor: pointer;\n border: 1px solid transparent;\n &.actor-selected, &:hover {\n border: 1px solid #00cec6;\n .actor-name-wrapper {\n display: block;\n }\n }\n ', ' {\n positon: absolute;\n }\n .actor-name-wrapper {\n display: none;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n background: rgba(0,0,0,0.8);\n .actor-name {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n -webkit-transform: translate(-50%, -50%);\n -moz-transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n -o-transform: translate(-50%, -50%);\n width: 60px;\n text-align: center;\n font-family: SFUIText-Medium;\n font-size: 10px;\n letter-spacing: 0px;\n color: #ffffff;\n word-break: break-word;\n }\n }\n }\n }\n }\n }\n }\n'], ['\n width: 36.33%;\n .tab-block {\n height: 100%;\n .tab-container {\n padding: 20px;\n text-align: left;\n .info-block {\n width: 33.33%;\n display: inline-block;\n padding-bottom: 25px;\n &:last-child{\n width: 100%;\n }\n .info-header {\n font-family: SFUIText-Regular;\n font-size: 10px;\n color: #666666;\n color: #cccccc;\n margin-bottom: 20px;\n }\n .info-value {\n font-family: SFUIText-Regular;\n font-size: 14px;\n color: #333333;\n color: #ffffff;\n }\n }\n &.scenes-tab {\n hr {\n border-color: #eeeeee;\n border-color: #4e5c6c;\n }\n .scenes-synopsis {\n .info-header {\n font-family: SFUIText-Regular;\n font-size: 12px;\n color: #333333;\n color: #cccccc;\n text-transform: uppercase;\n margin-bottom: 10px;\n }\n .synopsis {\n font-family: SFUIText-Regular;\n font-size: 12px;\n line-height: 1.33;\n color: #666666;\n color: #ffffff;\n margin-bottom: 10px;\n }\n }\n .scenes-wrapper {\n .scene-container{\n &:last-child {\n hr {\n display: none;\n }\n }\n .scene-block {\n display: flex;\n justify-content: flex-start;\n align-items: flex-start;\n cursor: pointer;\n &:hover{\n .scene-image {\n ', ' {\n display: inline-block;\n }\n }\n }\n .scene-image {\n width: 70px;\n height: 70px;\n border-radius: 100%;\n overflow: hidden;\n position: relative;\n ', ' {\n display: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n -webkit-transform: translate(-50%, -50%);\n -moz-transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n -o-transform: translate(-50%, -50%);\n }\n }\n .scene-details {\n margin-left: 15px;\n .scene-name {\n font-family: SFUIText-Medium;\n font-size: 12px;\n font-weight: 500;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n color: #333333;\n color: #ffffff;\n margin-bottom: 5px;\n }\n .scene-time {\n font-family: SFUIText-Medium;\n font-size: 12px;\n font-weight: 500;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n color: #888888;\n color: #aaaaaa;\n margin-bottom: 5px;\n }\n .scene-tags-block {\n display: flex;\n justify-content: flex-start;\n align-items: flex-start;\n .scene-tags {\n font-family: SFUIText-Medium;\n font-size: 12px;\n font-weight: 500;\n font-style: normal;\n font-stretch: normal;\n line-height: 1.17;\n letter-spacing: normal;\n color: #c7c5c5;\n color: #999999;\n margin-right: 5px;\n }\n }\n }\n }\n }\n }\n }\n &.comments-tab {\n padding: 0;\n position: relative;\n width: 100%;\n height: 100%;\n .comments-section {\n padding: 10px 0;\n height: calc(100% - 73px);\n overflow: auto;\n top: 0;\n position: absolute;\n left: 0;\n width: 100%;\n .comments-details {\n padding: 10px 20px 10px 20px;\n .comments-count {\n font-size: 14px;\n font-weight: normal;\n font-family: SFUIText-Regular;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n color: #333333;\n color: #cccccc;\n }\n }\n .comments-container {\n .comment-wrapper {\n padding: 20px;\n cursor: pointer;\n &:hover {\n background: #f5f5f5;\n background: #304153;\n }\n .comment-block, .reply-block {\n .comment-header {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin-bottom: 10px;\n position: relative;\n z-index: 2;\n img {\n width: 30px;\n height: 30px;\n border-radius: 100%;\n left: auto;\n top: auto;\n transform: none;\n }\n .user-name {\n padding: 0px 20px 0px 10px;\n font-family: SFUIText-Medium;\n font-size: 12px;\n font-weight: 500;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n color: #333333;\n color: #ffffff;\n }\n .video-time {\n opacity: 0.8;\n font-family: SFUIText-Regular;\n font-size: 12px;\n font-weight: normal;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n color: #626260;\n color: #cccccc;\n text-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);\n }\n .comment-time {\n opacity: 0.2;\n opacity: 1;\n font-family: SFUIText-Regular;\n font-size: 12px;\n font-weight: normal;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n color: #000000;\n color: #aaaaaa;\n margin-left: 20px;\n }\n }\n .comment-body {\n p {\n font-family: SFUIText-Regular;\n font-size: 13px;\n font-weight: 300;\n font-style: normal;\n font-stretch: normal;\n line-height: 1.38;\n letter-spacing: normal;\n color: #333333;\n color: #ffffff;\n }\n }\n }\n .reply-wrapper {\n .reply-block {\n padding-left: 20px;\n padding-top: 15px;\n position: relative;\n &:after {\n content: \'\';\n position: absolute;\n width: 1px;\n height: 100%;\n background: #cccccc;\n background: #4e5c6c;\n top: 15px;\n z-index: 0;\n left: 35px;\n }\n &:last-child {\n &:after {\n display: none;\n }\n }\n .comment-body {\n padding-left: 40px;\n }\n }\n }\n }\n }\n }\n .approval-block {\n height: 73px;\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n padding: 0 10px;\n background: #121d29;\n background: #ffffff;\n position: absolute;\n width: 100%;\n bottom: 0;\n ', ' {\n font-size: 12px;\n margin: 0 10px;\n }\n }\n }\n &.tags-tab {\n .tag-header {\n font-family: SFUIText-Regular;\n font-size: 12px;\n font-weight: normal;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n color: #cccccc;\n }\n .characters-list {\n margin: 10px 0;\n .actor-tag {\n width: 70px;\n height: 70px;\n border-radius: 100%;\n background: #121d29;\n display: inline-block;\n vertical-align: middle;\n margin: 10px;\n position: relative;\n overflow: hidden;\n cursor: pointer;\n border: 1px solid transparent;\n &.actor-selected, &:hover {\n border: 1px solid #00cec6;\n .actor-name-wrapper {\n display: block;\n }\n }\n ', ' {\n positon: absolute;\n }\n .actor-name-wrapper {\n display: none;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n background: rgba(0,0,0,0.8);\n .actor-name {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n -webkit-transform: translate(-50%, -50%);\n -moz-transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n -o-transform: translate(-50%, -50%);\n width: 60px;\n text-align: center;\n font-family: SFUIText-Medium;\n font-size: 10px;\n letter-spacing: 0px;\n color: #ffffff;\n word-break: break-word;\n }\n }\n }\n }\n }\n }\n }\n']),
22
- _templateObject14 = _taggedTemplateLiteral(['\n position: absolute;\n width: 100%;\n height: 10px;\n left:0;\n bottom: 15px;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n .scene-marker {\n background: #00cec6;\n position: relative;\n height: 100%;\n display: inline-block;\n vertical-align: top;\n }\n'], ['\n position: absolute;\n width: 100%;\n height: 10px;\n left:0;\n bottom: 15px;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n .scene-marker {\n background: #00cec6;\n position: relative;\n height: 100%;\n display: inline-block;\n vertical-align: top;\n }\n']);
23
-
24
- var _react = require('react');
25
-
26
- var _react2 = _interopRequireDefault(_react);
27
-
28
- var _styledComponents = require('styled-components');
29
-
30
- var _styledComponents2 = _interopRequireDefault(_styledComponents);
31
-
32
- var _propTypes = require('prop-types');
33
-
34
- var _propTypes2 = _interopRequireDefault(_propTypes);
35
-
36
- var _inputText = require('../../atoms/inputText');
37
-
38
- var _inputText2 = _interopRequireDefault(_inputText);
39
-
40
- var _button = require('../../atoms/button');
41
-
42
- var _button2 = _interopRequireDefault(_button);
43
-
44
- var _icon = require('../../atoms/icon');
45
-
46
- var _icon2 = _interopRequireDefault(_icon);
47
-
48
- var _image = require('../../atoms/image');
49
-
50
- var _image2 = _interopRequireDefault(_image);
51
-
52
- var _thematicBreak = require('../../atoms/thematicBreak');
53
-
54
- var _thematicBreak2 = _interopRequireDefault(_thematicBreak);
55
-
56
- var _tabs = require('../../molecules/tabs');
57
-
58
- var _tabs2 = _interopRequireDefault(_tabs);
59
-
60
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
61
-
62
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
63
-
64
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
65
-
66
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
67
-
68
- function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
69
-
70
- var PlayerContainer = _styledComponents2.default.div(_templateObject);
71
- var PlayerWrapper = _styledComponents2.default.div(_templateObject2);
72
- var PlayerHeader = _styledComponents2.default.div(_templateObject3, _button2.default.Element);
73
-
74
- var PlayerDetails = _styledComponents2.default.div(_templateObject4, _icon2.default.Element);
75
-
76
- var PlayerBlock = _styledComponents2.default.div(_templateObject5);
77
- var BigPlayButton = (0, _styledComponents2.default)(_button2.default)(_templateObject6);
78
- var SDPlayerBorder = _styledComponents2.default.div(_templateObject7);
79
-
80
- var PlayerControlBlock = _styledComponents2.default.div(_templateObject8);
81
-
82
- var SeekBar = _styledComponents2.default.div(_templateObject9);
83
-
84
- var PlayerControls = _styledComponents2.default.div(_templateObject10, _button2.default.Element);
85
- var CommentBox = _styledComponents2.default.div(_templateObject11, _inputText2.default.Element, _button2.default.Element, _icon2.default.Element);
86
- var Carousal = _styledComponents2.default.div(_templateObject12);
87
- var VideoDetailsWrapper = _styledComponents2.default.div(_templateObject13, _icon2.default.Element, _icon2.default.Element, _button2.default.Element, _image2.default.Element);
88
- var MarkerBlock = _styledComponents2.default.div(_templateObject14);
89
-
90
- var Player = function (_React$Component) {
91
- _inherits(Player, _React$Component);
92
-
93
- function Player(props) {
94
- _classCallCheck(this, Player);
95
-
96
- var _this = _possibleConstructorReturn(this, (Player.__proto__ || Object.getPrototypeOf(Player)).call(this, props));
97
-
98
- _this.state = {
99
- playerState: 'pause',
100
- seekbarDrag: false,
101
- currentTime: 0,
102
- totalDuration: 0,
103
- frameRate: 25,
104
- initialTime: 35990,
105
- framePerSecond: 0,
106
- currentSrc: _this.props.videoData.active_version.video_url,
107
- sceneActive: false,
108
- tagActive: false,
109
- activeScene: null,
110
- activeTag: [],
111
- showFullScreen: false,
112
- currentPlaybackRate: 1,
113
- comment: '',
114
- selectedTab: 0,
115
- comments: [{
116
- "comment": "watching",
117
- "isResolved": 0,
118
- "notified": true,
119
- "timeFrame": 0.68,
120
- "timestamp": 1521268584906,
121
- "userId": "606C93Cca05D684c500EC",
122
- "userName": "Ramkumar S&P",
123
- "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/ramkumarps%40vijaytv.com.png",
124
- "version": 1
125
- }, {
126
- "comment": "Mute the actress name \"Gauthami\"",
127
- "isResolved": 0,
128
- "notified": true,
129
- "replies": [{
130
- "message": "ok",
131
- "notified": true,
132
- "timestamp": 1521276253624,
133
- "userId": "666aB3Dc20B04703fB29F",
134
- "userName": "Rajv Pgm",
135
- "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/rajv%40vijaytv.com.png"
136
- }],
137
- "timeFrame": 779.12,
138
- "timestamp": 1521269881993,
139
- "userId": "606C93Cca05D684c500EC",
140
- "userName": "Ramkumar S&P",
141
- "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/ramkumarps%40vijaytv.com.png",
142
- "version": 1
143
- }, {
144
- "comment": "Mute the actress name \"Gauthami\"",
145
- "isResolved": 0,
146
- "notified": true,
147
- "replies": [{
148
- "message": "ok",
149
- "notified": true,
150
- "timestamp": 1521276262138,
151
- "userId": "666aB3Dc20B04703fB29F",
152
- "userName": "Rajv Pgm",
153
- "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/rajv%40vijaytv.com.png"
154
- }],
155
- "timeFrame": 780.76,
156
- "timestamp": 1521269900206,
157
- "userId": "606C93Cca05D684c500EC",
158
- "userName": "Ramkumar S&P",
159
- "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/ramkumarps%40vijaytv.com.png",
160
- "version": 1
161
- }, {
162
- "comment": "Mute the actress name \"Gauthami\"",
163
- "isResolved": 0,
164
- "notified": true,
165
- "replies": [{
166
- "message": "ok",
167
- "notified": true,
168
- "timestamp": 1521276273281,
169
- "userId": "666aB3Dc20B04703fB29F",
170
- "userName": "Rajv Pgm",
171
- "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/rajv%40vijaytv.com.png"
172
- }],
173
- "timeFrame": 786.2,
174
- "timestamp": 1521269924421,
175
- "userId": "606C93Cca05D684c500EC",
176
- "userName": "Ramkumar S&P",
177
- "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/ramkumarps%40vijaytv.com.png",
178
- "version": 1
179
- }, {
180
- "comment": "Mute the actress name \"Gauthami\"",
181
- "isResolved": 0,
182
- "notified": true,
183
- "replies": [{
184
- "message": "ok",
185
- "notified": true,
186
- "timestamp": 1521276294476,
187
- "userId": "666aB3Dc20B04703fB29F",
188
- "userName": "Rajv Pgm",
189
- "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/rajv%40vijaytv.com.png"
190
- }],
191
- "timeFrame": 809.04,
192
- "timestamp": 1521270030864,
193
- "userId": "606C93Cca05D684c500EC",
194
- "userName": "Ramkumar S&P",
195
- "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/ramkumarps%40vijaytv.com.png",
196
- "version": 1
197
- }, {
198
- "comment": "Delete the dialogue \"Flash adichaley black ah dhaan therivan\"",
199
- "isResolved": 0,
200
- "notified": true,
201
- "replies": [{
202
- "message": "Will mute the word \"black\"",
203
- "notified": true,
204
- "timestamp": 1521276335276,
205
- "userId": "666aB3Dc20B04703fB29F",
206
- "userName": "Rajv Pgm",
207
- "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/rajv%40vijaytv.com.png"
208
- }, {
209
- "message": "Thanks",
210
- "notified": true,
211
- "timestamp": 1521283688592,
212
- "userId": "606C93Cca05D684c500EC",
213
- "userName": "Ramkumar S&P",
214
- "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/ramkumarps%40vijaytv.com.png"
215
- }],
216
- "timeFrame": 2247.16,
217
- "timestamp": 1521272658618,
218
- "userId": "606C93Cca05D684c500EC",
219
- "userName": "Ramkumar S&P",
220
- "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/ramkumarps%40vijaytv.com.png",
221
- "version": 1
222
- }]
223
- };
224
- _this.timeInterval = null;
225
- _this.intervalRewind = null;
226
- _this.video = null;
227
- _this.playPause = _this.playPause.bind(_this);
228
- _this.frameChange = _this.frameChange.bind(_this);
229
- _this.handleMouseDown = _this.handleMouseDown.bind(_this);
230
- _this.handleMouseMove = _this.handleMouseMove.bind(_this);
231
- _this.handleMouseUp = _this.handleMouseUp.bind(_this);
232
- _this.selectScene = _this.selectScene.bind(_this);
233
- _this.fullScreenToggle = _this.fullScreenToggle.bind(_this);
234
- _this.changePlaybackRate = _this.changePlaybackRate.bind(_this);
235
- return _this;
7
+ exports["default"] = void 0;
8
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
11
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
12
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
13
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
14
+ var _react = _interopRequireDefault(require("react"));
15
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
16
+ var _propTypes = _interopRequireDefault(require("prop-types"));
17
+ var _inputText = _interopRequireDefault(require("../../atoms/inputText"));
18
+ var _button = _interopRequireDefault(require("../../atoms/button"));
19
+ var _icon = _interopRequireDefault(require("../../atoms/icon"));
20
+ var _image = _interopRequireDefault(require("../../atoms/image"));
21
+ var _thematicBreak = _interopRequireDefault(require("../../atoms/thematicBreak"));
22
+ var _tabs = _interopRequireDefault(require("../../molecules/tabs"));
23
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
24
+ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
25
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
26
+ var PlayerContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n height: 100%;\n"])));
27
+ var PlayerWrapper = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n width: 63.67%;\n background: #000;\n .player-block {\n width: 100%;\n }\n"])));
28
+ var PlayerHeader = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n height: 91px;\n background: #000000;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n ", " {\n margin: inherit;\n margin-left: 20px;\n }\n"])), _button["default"].Element);
29
+ var PlayerDetails = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n margin-left: 20px;\n color: #fff;\n text-align: left;\n .video-title {\n font-family: SFUIText-Medium;\n font-size: 18px;\n line-height: 1.11;\n margin-bottom: 10px;\n color: #ffffff;\n }\n .video-details-block {\n display: flex;\n align-items: center;\n p.video-number {\n font-family: SFUIText-Regular;\n font-size: 12px;\n color: #cccccc;\n }\n .video-files-block {\n display: flex;\n align-items: center;\n margin: 0 30px 0 20px;\n p.video-file-type {\n font-family: SFUIText-Medium;\n font-size: 10px;\n font-weight: 500;\n font-style: normal;\n font-stretch: normal;\n line-height: 1;\n letter-spacing: 0.4px;\n color: #ffffff;\n text-transform: uppercase;\n }\n p.video-file-versions {\n font-family: SFUIText-Regular;\n font-size: 10px;\n width: 20px;\n color: #00cec6;\n border: 1px solid #00cec6;\n border-radius: 100%;\n height: 20px;\n box-sizing: border-box;\n padding: 4px 2px;\n text-align: center;\n margin: 0 2px;\n }\n }\n .video-time-block {\n display: flex;\n align-items: center;\n font-family: SFUIText-Regular;\n font-size: 12px;\n line-height: 1;\n letter-spacing: -0.4px;\n color: #cccccc;\n .time {\n ", " {\n vertical-align: bottom;\n }\n p{\n display: inline-block;\n margin: 0 5px;\n vertical-align: sub;\n line-height: 10px;\n }\n }\n }\n }\n"])), _icon["default"].Element);
30
+ var PlayerBlock = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n background: #000000;\n width: 100%;\n padding-top: 56.25%;\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"])));
31
+ var BigPlayButton = (0, _styledComponents["default"])(_button["default"])(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n background: linear-gradient(to right, rgb(0,200,231, 0.6), rgb(0,230,185, 0.6));\n width: 100px;\n height: 100px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n border: none;\n"])));
32
+ var SDPlayerBorder = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n opacity: 0.3;\n border: solid 1px #ffffff;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%,-50%);\n -ms-transform: translate(-50%,-50%);\n -o-transform: translate(-50%,-50%);\n -moz-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n position: absolute;\n padding-left: 75%;\n height: 100%;\n"])));
33
+ var PlayerControlBlock = _styledComponents["default"].div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n width: 100%;\n height: 60px;\n position: relative;\n"])));
34
+ var SeekBar = _styledComponents["default"].div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n width: 100%;\n height: 4px;\n position: relative;\n cursor: pointer;\n .seekbar-bg {\n background: rgba(0,0,0,0.3);\n width: 100%;\n height: 100%;\n }\n .play-progress {\n position: absolute;\n width: 0px;\n height: 100%;\n left: 0;\n top: 0;\n background: #00cec6;\n &:after {\n content: '';\n width: 12px;\n height: 12px;\n position: absolute;\n background: #00cec6;\n border-radius: 100%;\n right: -6px;\n top: -5px;\n box-shadow: 0 0 14px 1px #00cec6;\n }\n }\n"])));
35
+ var PlayerControls = _styledComponents["default"].div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2["default"])(["\n height: calc(100% - 4px);\n background: #000000;\n display: flex;\n justify-content: space-between;\n padding: 0 10px;\n align-items: center;\n .controls-left, .controls-right {\n display: flex;\n align-items: center;\n ", " {\n background: transparent;\n border: none;\n margin: 0 10px;\n }\n }\n .controls-left{\n .video-time-display {\n display: flex;\n align-items: center;\n font-family: SFUIText-Regular;\n font-size: 12px;\n letter-spacing: -0.6px;\n .video-time {\n margin: 0 2px;\n &.video-end-time, &.video-time-seperator {\n color: #888888;\n }\n &.video-current-time {\n color: #ffffff;\n min-width: 64px;\n }\n }\n }\n }\n"])), _button["default"].Element);
36
+ var CommentBox = _styledComponents["default"].div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n background-color: #333333;\n align-items: center;\n justify-content: space-between;\n ", " {\n height: 100%;\n color: #ccc;\n padding: 15px 10px 15px 20px;\n border-bottom: none;\n }\n ", " {\n margin: 0;\n background: #333333;\n border: none;\n ", " {\n svg {\n path {\n fill: #00cec6;\n }\n }\n }\n }\n"])), _inputText["default"].Element, _button["default"].Element, _icon["default"].Element);
37
+ var Carousal = _styledComponents["default"].div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2["default"])(["\n height: 91px;\n background: #000000;\n"])));
38
+ var VideoDetailsWrapper = _styledComponents["default"].div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2["default"])(["\n width: 36.33%;\n .tab-block {\n height: 100%;\n .tab-container {\n padding: 20px;\n text-align: left;\n .info-block {\n width: 33.33%;\n display: inline-block;\n padding-bottom: 25px;\n &:last-child{\n width: 100%;\n }\n .info-header {\n font-family: SFUIText-Regular;\n font-size: 10px;\n color: #666666;\n color: #cccccc;\n margin-bottom: 20px;\n }\n .info-value {\n font-family: SFUIText-Regular;\n font-size: 14px;\n color: #333333;\n color: #ffffff;\n }\n }\n &.scenes-tab {\n hr {\n border-color: #eeeeee;\n border-color: #4e5c6c;\n }\n .scenes-synopsis {\n .info-header {\n font-family: SFUIText-Regular;\n font-size: 12px;\n color: #333333;\n color: #cccccc;\n text-transform: uppercase;\n margin-bottom: 10px;\n }\n .synopsis {\n font-family: SFUIText-Regular;\n font-size: 12px;\n line-height: 1.33;\n color: #666666;\n color: #ffffff;\n margin-bottom: 10px;\n }\n }\n .scenes-wrapper {\n .scene-container{\n &:last-child {\n hr {\n display: none;\n }\n }\n .scene-block {\n display: flex;\n justify-content: flex-start;\n align-items: flex-start;\n cursor: pointer;\n &:hover{\n .scene-image {\n ", " {\n display: inline-block;\n }\n }\n }\n .scene-image {\n width: 70px;\n height: 70px;\n border-radius: 100%;\n overflow: hidden;\n position: relative;\n ", " {\n display: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n -webkit-transform: translate(-50%, -50%);\n -moz-transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n -o-transform: translate(-50%, -50%);\n }\n }\n .scene-details {\n margin-left: 15px;\n .scene-name {\n font-family: SFUIText-Medium;\n font-size: 12px;\n font-weight: 500;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n color: #333333;\n color: #ffffff;\n margin-bottom: 5px;\n }\n .scene-time {\n font-family: SFUIText-Medium;\n font-size: 12px;\n font-weight: 500;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n color: #888888;\n color: #aaaaaa;\n margin-bottom: 5px;\n }\n .scene-tags-block {\n display: flex;\n justify-content: flex-start;\n align-items: flex-start;\n .scene-tags {\n font-family: SFUIText-Medium;\n font-size: 12px;\n font-weight: 500;\n font-style: normal;\n font-stretch: normal;\n line-height: 1.17;\n letter-spacing: normal;\n color: #c7c5c5;\n color: #999999;\n margin-right: 5px;\n }\n }\n }\n }\n }\n }\n }\n &.comments-tab {\n padding: 0;\n position: relative;\n width: 100%;\n height: 100%;\n .comments-section {\n padding: 10px 0;\n height: calc(100% - 73px);\n overflow: auto;\n top: 0;\n position: absolute;\n left: 0;\n width: 100%;\n .comments-details {\n padding: 10px 20px 10px 20px;\n .comments-count {\n font-size: 14px;\n font-weight: normal;\n font-family: SFUIText-Regular;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n color: #333333;\n color: #cccccc;\n }\n }\n .comments-container {\n .comment-wrapper {\n padding: 20px;\n cursor: pointer;\n &:hover {\n background: #f5f5f5;\n background: #304153;\n }\n .comment-block, .reply-block {\n .comment-header {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin-bottom: 10px;\n position: relative;\n z-index: 2;\n img {\n width: 30px;\n height: 30px;\n border-radius: 100%;\n left: auto;\n top: auto;\n transform: none;\n }\n .user-name {\n padding: 0px 20px 0px 10px;\n font-family: SFUIText-Medium;\n font-size: 12px;\n font-weight: 500;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n color: #333333;\n color: #ffffff;\n }\n .video-time {\n opacity: 0.8;\n font-family: SFUIText-Regular;\n font-size: 12px;\n font-weight: normal;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n color: #626260;\n color: #cccccc;\n text-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);\n }\n .comment-time {\n opacity: 0.2;\n opacity: 1;\n font-family: SFUIText-Regular;\n font-size: 12px;\n font-weight: normal;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n color: #000000;\n color: #aaaaaa;\n margin-left: 20px;\n }\n }\n .comment-body {\n p {\n font-family: SFUIText-Regular;\n font-size: 13px;\n font-weight: 300;\n font-style: normal;\n font-stretch: normal;\n line-height: 1.38;\n letter-spacing: normal;\n color: #333333;\n color: #ffffff;\n }\n }\n }\n .reply-wrapper {\n .reply-block {\n padding-left: 20px;\n padding-top: 15px;\n position: relative;\n &:after {\n content: '';\n position: absolute;\n width: 1px;\n height: 100%;\n background: #cccccc;\n background: #4e5c6c;\n top: 15px;\n z-index: 0;\n left: 35px;\n }\n &:last-child {\n &:after {\n display: none;\n }\n }\n .comment-body {\n padding-left: 40px;\n }\n }\n }\n }\n }\n }\n .approval-block {\n height: 73px;\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n padding: 0 10px;\n background: #121d29;\n background: #ffffff;\n position: absolute;\n width: 100%;\n bottom: 0;\n ", " {\n font-size: 12px;\n margin: 0 10px;\n }\n }\n }\n &.tags-tab {\n .tag-header {\n font-family: SFUIText-Regular;\n font-size: 12px;\n font-weight: normal;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n color: #cccccc;\n }\n .characters-list {\n margin: 10px 0;\n .actor-tag {\n width: 70px;\n height: 70px;\n border-radius: 100%;\n background: #121d29;\n display: inline-block;\n vertical-align: middle;\n margin: 10px;\n position: relative;\n overflow: hidden;\n cursor: pointer;\n border: 1px solid transparent;\n &.actor-selected, &:hover {\n border: 1px solid #00cec6;\n .actor-name-wrapper {\n display: block;\n }\n }\n ", " {\n positon: absolute;\n }\n .actor-name-wrapper {\n display: none;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n background: rgba(0,0,0,0.8);\n .actor-name {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n -webkit-transform: translate(-50%, -50%);\n -moz-transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n -o-transform: translate(-50%, -50%);\n width: 60px;\n text-align: center;\n font-family: SFUIText-Medium;\n font-size: 10px;\n letter-spacing: 0px;\n color: #ffffff;\n word-break: break-word;\n }\n }\n }\n }\n }\n }\n }\n"])), _icon["default"].Element, _icon["default"].Element, _button["default"].Element, _image["default"].Element);
39
+ var MarkerBlock = _styledComponents["default"].div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n width: 100%;\n height: 10px;\n left:0;\n bottom: 15px;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n .scene-marker {\n background: #00cec6;\n position: relative;\n height: 100%;\n display: inline-block;\n vertical-align: top;\n }\n"])));
40
+ var Player = /*#__PURE__*/function (_React$Component) {
41
+ function Player(props) {
42
+ var _this;
43
+ (0, _classCallCheck2["default"])(this, Player);
44
+ _this = _callSuper(this, Player, [props]);
45
+ _this.state = {
46
+ playerState: 'pause',
47
+ seekbarDrag: false,
48
+ currentTime: 0,
49
+ totalDuration: 0,
50
+ frameRate: 25,
51
+ initialTime: 35990,
52
+ framePerSecond: 0,
53
+ currentSrc: _this.props.videoData.active_version.video_url,
54
+ sceneActive: false,
55
+ tagActive: false,
56
+ activeScene: null,
57
+ activeTag: [],
58
+ showFullScreen: false,
59
+ currentPlaybackRate: 1,
60
+ comment: '',
61
+ selectedTab: 0,
62
+ comments: [{
63
+ "comment": "watching",
64
+ "isResolved": 0,
65
+ "notified": true,
66
+ "timeFrame": 0.68,
67
+ "timestamp": 1521268584906,
68
+ "userId": "606C93Cca05D684c500EC",
69
+ "userName": "Ramkumar S&P",
70
+ "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/ramkumarps%40vijaytv.com.png",
71
+ "version": 1
72
+ }, {
73
+ "comment": "Mute the actress name \"Gauthami\"",
74
+ "isResolved": 0,
75
+ "notified": true,
76
+ "replies": [{
77
+ "message": "ok",
78
+ "notified": true,
79
+ "timestamp": 1521276253624,
80
+ "userId": "666aB3Dc20B04703fB29F",
81
+ "userName": "Rajv Pgm",
82
+ "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/rajv%40vijaytv.com.png"
83
+ }],
84
+ "timeFrame": 779.12,
85
+ "timestamp": 1521269881993,
86
+ "userId": "606C93Cca05D684c500EC",
87
+ "userName": "Ramkumar S&P",
88
+ "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/ramkumarps%40vijaytv.com.png",
89
+ "version": 1
90
+ }, {
91
+ "comment": "Mute the actress name \"Gauthami\"",
92
+ "isResolved": 0,
93
+ "notified": true,
94
+ "replies": [{
95
+ "message": "ok",
96
+ "notified": true,
97
+ "timestamp": 1521276262138,
98
+ "userId": "666aB3Dc20B04703fB29F",
99
+ "userName": "Rajv Pgm",
100
+ "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/rajv%40vijaytv.com.png"
101
+ }],
102
+ "timeFrame": 780.76,
103
+ "timestamp": 1521269900206,
104
+ "userId": "606C93Cca05D684c500EC",
105
+ "userName": "Ramkumar S&P",
106
+ "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/ramkumarps%40vijaytv.com.png",
107
+ "version": 1
108
+ }, {
109
+ "comment": "Mute the actress name \"Gauthami\"",
110
+ "isResolved": 0,
111
+ "notified": true,
112
+ "replies": [{
113
+ "message": "ok",
114
+ "notified": true,
115
+ "timestamp": 1521276273281,
116
+ "userId": "666aB3Dc20B04703fB29F",
117
+ "userName": "Rajv Pgm",
118
+ "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/rajv%40vijaytv.com.png"
119
+ }],
120
+ "timeFrame": 786.2,
121
+ "timestamp": 1521269924421,
122
+ "userId": "606C93Cca05D684c500EC",
123
+ "userName": "Ramkumar S&P",
124
+ "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/ramkumarps%40vijaytv.com.png",
125
+ "version": 1
126
+ }, {
127
+ "comment": "Mute the actress name \"Gauthami\"",
128
+ "isResolved": 0,
129
+ "notified": true,
130
+ "replies": [{
131
+ "message": "ok",
132
+ "notified": true,
133
+ "timestamp": 1521276294476,
134
+ "userId": "666aB3Dc20B04703fB29F",
135
+ "userName": "Rajv Pgm",
136
+ "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/rajv%40vijaytv.com.png"
137
+ }],
138
+ "timeFrame": 809.04,
139
+ "timestamp": 1521270030864,
140
+ "userId": "606C93Cca05D684c500EC",
141
+ "userName": "Ramkumar S&P",
142
+ "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/ramkumarps%40vijaytv.com.png",
143
+ "version": 1
144
+ }, {
145
+ "comment": "Delete the dialogue \"Flash adichaley black ah dhaan therivan\"",
146
+ "isResolved": 0,
147
+ "notified": true,
148
+ "replies": [{
149
+ "message": "Will mute the word \"black\"",
150
+ "notified": true,
151
+ "timestamp": 1521276335276,
152
+ "userId": "666aB3Dc20B04703fB29F",
153
+ "userName": "Rajv Pgm",
154
+ "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/rajv%40vijaytv.com.png"
155
+ }, {
156
+ "message": "Thanks",
157
+ "notified": true,
158
+ "timestamp": 1521283688592,
159
+ "userId": "606C93Cca05D684c500EC",
160
+ "userName": "Ramkumar S&P",
161
+ "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/ramkumarps%40vijaytv.com.png"
162
+ }],
163
+ "timeFrame": 2247.16,
164
+ "timestamp": 1521272658618,
165
+ "userId": "606C93Cca05D684c500EC",
166
+ "userName": "Ramkumar S&P",
167
+ "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/ramkumarps%40vijaytv.com.png",
168
+ "version": 1
169
+ }]
170
+ };
171
+ _this.timeInterval = null;
172
+ _this.intervalRewind = null;
173
+ _this.video = null;
174
+ _this.playPause = _this.playPause.bind(_this);
175
+ _this.frameChange = _this.frameChange.bind(_this);
176
+ _this.handleMouseDown = _this.handleMouseDown.bind(_this);
177
+ _this.handleMouseMove = _this.handleMouseMove.bind(_this);
178
+ _this.handleMouseUp = _this.handleMouseUp.bind(_this);
179
+ _this.selectScene = _this.selectScene.bind(_this);
180
+ _this.fullScreenToggle = _this.fullScreenToggle.bind(_this);
181
+ _this.changePlaybackRate = _this.changePlaybackRate.bind(_this);
182
+ return _this;
183
+ }
184
+ (0, _inherits2["default"])(Player, _React$Component);
185
+ return (0, _createClass2["default"])(Player, [{
186
+ key: "secondsToTime",
187
+ value: function secondsToTime(_seconds, frameRate, initialTime) {
188
+ if (typeof _seconds !== "number") return "09:59:50:00";
189
+ if (_seconds > -1) {
190
+ var date = new Date(null);
191
+ var currentFrame = Math.floor(_seconds * 25 % frameRate);
192
+ var paddedFrame = currentFrame < 10 ? "0" + currentFrame : currentFrame;
193
+ if (initialTime) _seconds += initialTime;
194
+ date.setSeconds(_seconds);
195
+ var timeString = date.toISOString().substr(11, 8);
196
+ var timeWithFrame = timeString + ":" + paddedFrame;
197
+ return timeWithFrame;
198
+ }
236
199
  }
237
-
238
- _createClass(Player, [{
239
- key: 'secondsToTime',
240
- value: function secondsToTime(_seconds, frameRate, initialTime) {
241
- if (typeof _seconds !== "number") return "09:59:50:00";
242
- if (_seconds > -1) {
243
- var date = new Date(null);
244
- var currentFrame = Math.floor(_seconds * 25 % frameRate);
245
- var paddedFrame = currentFrame < 10 ? "0" + currentFrame : currentFrame;
246
- if (initialTime) _seconds += initialTime;
247
- date.setSeconds(_seconds);
248
- var timeString = date.toISOString().substr(11, 8);
249
- var timeWithFrame = timeString + ":" + paddedFrame;
250
- return timeWithFrame;
251
- }
252
- }
253
- }, {
254
- key: 'componentDidMount',
255
- value: function componentDidMount() {
256
- var framePerSecond = 1 / this.state.frameRate;
257
- this.setState({ framePerSecond: framePerSecond });
258
- this.addEventHandlers();
259
- }
260
- }, {
261
- key: 'addEventHandlers',
262
- value: function addEventHandlers() {
263
- var self = this;
264
- this.video.onloadedmetadata = function () {
265
- self.onLoadedMetaData();
266
- };
267
- this.video.ontimeupdate = function () {
268
- self.onTimeUpdate();
269
- };
270
- this.video.onplaying = function () {
271
- self.onPlaying();
272
- };
273
- this.video.onpause = function () {
274
- self.onPause();
275
- };
276
- this.video.onended = function () {
277
- self.onVideoEnd();
278
- };
279
- this.video.onwaiting = function () {
280
- self.onVideoBuffer();
281
- };
282
- document.addEventListener('webkitfullscreenchange', function (e) {
283
- self.setState({ showFullScreen: !self.state.showFullScreen });
284
- }, false);
285
- document.addEventListener('mozfullscreenchange', function (e) {
286
- self.setState({ showFullScreen: !self.state.showFullScreen });
287
- }, false);
288
- document.addEventListener('fullscreenchange', function (e) {
289
- self.setState({ showFullScreen: !self.state.showFullScreen });
290
- }, false);
291
- document.addEventListener('MSFullscreenChange', function (e) {
292
- self.setState({ showFullScreen: !self.state.showFullScreen });
293
- }, false);
294
- document.addEventListener('keyup', function (e) {
295
- self.processKeyboardInput(e);
296
- }, false);
297
- }
298
- }, {
299
- key: 'fullScreenToggle',
300
- value: function fullScreenToggle() {
301
- if (!this.state.showFullScreen) {
302
- if (this.playerBlock.requestFullscreen) {
303
- this.playerBlock.requestFullscreen();
304
- } else if (document.documentElement.msRequestFullscreen) {
305
- this.playerBlock.msRequestFullscreen();
306
- } else if (this.playerBlock.mozRequestFullScreen) {
307
- this.playerBlock.mozRequestFullScreen(); // Firefox
308
- } else if (this.playerBlock.webkitRequestFullscreen) {
309
- this.playerBlock.webkitRequestFullscreen(); // Chrome and Safari
310
- }
311
- } else {
312
- if (this.playerBlock.exitFullscreen) {
313
- document.exitFullscreen();
314
- } else if (document.msExitFullscreen) {
315
- document.msExitFullscreen();
316
- } else if (document.mozCancelFullScreen) {
317
- document.mozCancelFullScreen();
318
- } else if (document.webkitExitFullscreen) {
319
- document.webkitExitFullscreen();
320
- }
321
- }
322
- }
323
- }, {
324
- key: 'processKeyboardInput',
325
- value: function processKeyboardInput(e) {
326
- if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA') {
327
- return;
328
- };
329
- switch (e.code) {
330
- case 'ArrowLeft':
331
- if (e.shiftKey) {
332
- // this.rewindAhead('rewind');
333
- } else {
334
- this.frameChange('prev', 1);
335
- }
336
- break;
337
- case 'ArrowRight':
338
- if (e.shiftKey) {
339
- // this.rewindAhead('ahead');
340
- } else {
341
- this.frameChange('next', 1);
342
- }
343
- break;
344
- case 'ArrowUp':
345
- // this.changeVolume(e);
346
- break;
347
- case 'ArrowDown':
348
- // this.changeVolume(e);
349
- break;
350
- case 'KeyF':
351
- this.fullScreenToggle();
352
- break;
353
- case 'KeyJ':
354
- if (this.video.paused) {
355
- this.playPause();
356
- }
357
- this.changePlaybackRate(1);
358
- this.playBackwards();
359
- break;
360
- case 'KeyK':
361
- if (this.video) {
362
- this.changePlaybackRate(1);
363
- this.video.pause();
364
- // this.bufferingLoader = false;
365
- }
366
- break;
367
- case 'KeyL':
368
- if (this.state.currentPlaybackRate === 1 && this.video.paused && this.video) {
369
- this.playPause();
370
- } else if (this.state.currentPlaybackRate === 1) {
371
- this.changePlaybackRate(1.5);
372
- } else if (this.state.currentPlaybackRate === 1.5) {
373
- this.changePlaybackRate(2);
374
- } else if (this.state.currentPlaybackRate !== 8 && this.state.currentPlaybackRate !== -1) {
375
- this.changePlaybackRate(this.state.currentPlaybackRate * 2);
376
- } else {
377
- this.changePlaybackRate(1);
378
- }
379
- break;
380
- case 'Space':
381
- e.preventDefault();
382
- if (this.video) {
383
- this.playPause();
384
- }
385
- break;
386
-
387
- }
388
- }
389
- }, {
390
- key: 'changePlaybackRate',
391
- value: function changePlaybackRate(rate) {
392
- if (this.intervalRewind) {
393
- clearInterval(this.intervalRewind);
394
- this.intervalRewind = null;
395
- }
396
- this.setState({ currentPlaybackRate: rate });
397
- this.video.playbackRate = rate;
398
- }
399
- }, {
400
- key: 'playBackwards',
401
- value: function playBackwards() {
402
- var self = this;
403
- if (!this.intervalRewind) {
404
- this.intervalRewind = setInterval(function () {
405
- if (self.video.currentTime === 0) {
406
- clearInterval(self.intervalRewind);
407
- self.intervalRewind = null;
408
- self.video.pause();
409
- } else {
410
- self.video.currentTime += -(1 / self.state.frameRate);
411
- self.setState({ currentTime: self.video.currentTime });
412
- }
413
- }, 1000 / this.state.frameRate / 2);
414
- } else {
415
- clearInterval(this.intervalRewind);
416
- this.intervalRewind = null;
417
- this.video.pause();
418
- }
419
- }
420
- }, {
421
- key: 'onLoadedMetaData',
422
- value: function onLoadedMetaData() {
423
- var totalDuration = this.video.duration;
424
- this.setState({ totalDuration: totalDuration });
425
- }
426
- }, {
427
- key: 'onTimeUpdate',
428
- value: function onTimeUpdate() {
429
- var currentPos, maxduration;
430
- currentPos = this.video.currentTime;
431
- maxduration = this.video.duration;
432
- var barWidth = currentPos / maxduration * 100;
433
- this.progressBar.style.width = barWidth + '%';
434
- var currentTime = this.video.currentTime;
435
- this.setState({ currentTime: currentTime });
436
- if (this.progressBar.style.display === 'none') {
437
- this.progressBar.style.display = 'block';
438
- }
439
- }
440
- }, {
441
- key: 'onPlaying',
442
- value: function onPlaying() {
443
- var playerState = 'play';
444
- this.setState({ playerState: playerState });
445
- if (!this.timeInterval) {
446
- var self = this;
447
- this.timeInterval = setInterval(function () {
448
- var currentTime = self.video.currentTime;
449
- self.setState({ currentTime: currentTime });
450
- if (self.state.sceneActive) {
451
- if (currentTime > self.state.activeScene.end_time || currentTime < self.state.activeScene.start_time) {
452
- self.setState({ sceneActive: false, activeScene: null });
453
- }
454
- }
455
- }, 1000 / this.state.frameRate / 2);
456
- }
457
- }
458
- }, {
459
- key: 'onPause',
460
- value: function onPause() {
461
- this.setState({ playerState: 'pause' });
462
- clearInterval(this.timeInterval);
463
- this.timeInterval = null;'';
464
- }
465
- }, {
466
- key: 'frameChange',
467
- value: function frameChange(type, frame) {
468
- this.video.pause();
469
- var currentTime = this.video.currentTime;
470
- var timeValue = this.state.framePerSecond * frame;
471
- var updatedTime = currentTime;
472
- switch (type) {
473
- case "prev":
474
- updatedTime = currentTime - timeValue;
475
- break;
476
- case "next":
477
- updatedTime = currentTime + timeValue;
478
- break;
479
- }
480
- this.seekTo(updatedTime);
481
- }
482
- }, {
483
- key: 'seekTo',
484
- value: function seekTo(value) {
485
- this.video.currentTime = value;
486
- }
487
- }, {
488
- key: 'onVideoEnd',
489
- value: function onVideoEnd() {
490
- clearInterval(this.timeInterval);
491
- this.timeInterval = null;
492
- }
493
- }, {
494
- key: 'onVideoBuffer',
495
- value: function onVideoBuffer() {}
496
- }, {
497
- key: 'playPause',
498
- value: function playPause() {
499
- if (this.video.paused) {
500
- this.video.play();
501
- } else {
502
- this.video.pause();
503
- }
504
- }
505
- }, {
506
- key: 'handleMouseDown',
507
- value: function handleMouseDown(event) {
508
- this.setState({ seekbarDrag: true });
509
- this.updateSeekbar(event);
510
- }
511
- }, {
512
- key: 'handleMouseMove',
513
- value: function handleMouseMove(event) {
514
- if (this.state.seekbarDrag) {
515
- this.updateSeekbar(event);
516
- }
200
+ }, {
201
+ key: "componentDidMount",
202
+ value: function componentDidMount() {
203
+ var framePerSecond = 1 / this.state.frameRate;
204
+ this.setState({
205
+ framePerSecond: framePerSecond
206
+ });
207
+ this.addEventHandlers();
208
+ }
209
+ }, {
210
+ key: "addEventHandlers",
211
+ value: function addEventHandlers() {
212
+ var self = this;
213
+ this.video.onloadedmetadata = function () {
214
+ self.onLoadedMetaData();
215
+ };
216
+ this.video.ontimeupdate = function () {
217
+ self.onTimeUpdate();
218
+ };
219
+ this.video.onplaying = function () {
220
+ self.onPlaying();
221
+ };
222
+ this.video.onpause = function () {
223
+ self.onPause();
224
+ };
225
+ this.video.onended = function () {
226
+ self.onVideoEnd();
227
+ };
228
+ this.video.onwaiting = function () {
229
+ self.onVideoBuffer();
230
+ };
231
+ document.addEventListener('webkitfullscreenchange', function (e) {
232
+ self.setState({
233
+ showFullScreen: !self.state.showFullScreen
234
+ });
235
+ }, false);
236
+ document.addEventListener('mozfullscreenchange', function (e) {
237
+ self.setState({
238
+ showFullScreen: !self.state.showFullScreen
239
+ });
240
+ }, false);
241
+ document.addEventListener('fullscreenchange', function (e) {
242
+ self.setState({
243
+ showFullScreen: !self.state.showFullScreen
244
+ });
245
+ }, false);
246
+ document.addEventListener('MSFullscreenChange', function (e) {
247
+ self.setState({
248
+ showFullScreen: !self.state.showFullScreen
249
+ });
250
+ }, false);
251
+ document.addEventListener('keyup', function (e) {
252
+ self.processKeyboardInput(e);
253
+ }, false);
254
+ }
255
+ }, {
256
+ key: "fullScreenToggle",
257
+ value: function fullScreenToggle() {
258
+ if (!this.state.showFullScreen) {
259
+ if (this.playerBlock.requestFullscreen) {
260
+ this.playerBlock.requestFullscreen();
261
+ } else if (document.documentElement.msRequestFullscreen) {
262
+ this.playerBlock.msRequestFullscreen();
263
+ } else if (this.playerBlock.mozRequestFullScreen) {
264
+ this.playerBlock.mozRequestFullScreen(); // Firefox
265
+ } else if (this.playerBlock.webkitRequestFullscreen) {
266
+ this.playerBlock.webkitRequestFullscreen(); // Chrome and Safari
517
267
  }
518
- }, {
519
- key: 'handleMouseUp',
520
- value: function handleMouseUp(event) {
521
- if (this.state.seekbarDrag) {
522
- this.setState({ seekbarDrag: false });
523
- this.updateSeekbar(event);
524
- this.video.play();
525
- }
268
+ } else {
269
+ if (this.playerBlock.exitFullscreen) {
270
+ document.exitFullscreen();
271
+ } else if (document.msExitFullscreen) {
272
+ document.msExitFullscreen();
273
+ } else if (document.mozCancelFullScreen) {
274
+ document.mozCancelFullScreen();
275
+ } else if (document.webkitExitFullscreen) {
276
+ document.webkitExitFullscreen();
526
277
  }
527
- }, {
528
- key: 'updateSeekbar',
529
- value: function updateSeekbar(event) {
278
+ }
279
+ }
280
+ }, {
281
+ key: "processKeyboardInput",
282
+ value: function processKeyboardInput(e) {
283
+ if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA') {
284
+ return;
285
+ }
286
+ ;
287
+ switch (e.code) {
288
+ case 'ArrowLeft':
289
+ if (e.shiftKey) {
290
+ // this.rewindAhead('rewind');
291
+ } else {
292
+ this.frameChange('prev', 1);
293
+ }
294
+ break;
295
+ case 'ArrowRight':
296
+ if (e.shiftKey) {
297
+ // this.rewindAhead('ahead');
298
+ } else {
299
+ this.frameChange('next', 1);
300
+ }
301
+ break;
302
+ case 'ArrowUp':
303
+ // this.changeVolume(e);
304
+ break;
305
+ case 'ArrowDown':
306
+ // this.changeVolume(e);
307
+ break;
308
+ case 'KeyF':
309
+ this.fullScreenToggle();
310
+ break;
311
+ case 'KeyJ':
312
+ if (this.video.paused) {
313
+ this.playPause();
314
+ }
315
+ this.changePlaybackRate(1);
316
+ this.playBackwards();
317
+ break;
318
+ case 'KeyK':
319
+ if (this.video) {
320
+ this.changePlaybackRate(1);
530
321
  this.video.pause();
531
- if (this.seekBar) {
532
- var sliderBlockLeft = this.seekBar.getBoundingClientRect().left;
533
- var seekBarWidth = this.seekBar.offsetWidth;
534
- var posX = event.clientX - sliderBlockLeft;
535
- var maxduration = this.video.duration;
536
- if (posX > seekBarWidth) {
537
- posX = seekBarWidth;
538
- }
539
- var currentTime = maxduration * posX / seekBarWidth;
540
- if (currentTime > maxduration) {
541
- currentTime = maxduration;
542
- }
543
- if (currentTime <= 0) {
544
- currentTime = 0;
545
- }
546
- var barWidth = currentTime / maxduration * 100;
547
- this.progressBar.style.width = barWidth + '%';
548
- this.video.currentTime = currentTime;
549
- this.setState({ currentTime: currentTime });
322
+ // this.bufferingLoader = false;
323
+ }
324
+ break;
325
+ case 'KeyL':
326
+ if (this.state.currentPlaybackRate === 1 && this.video.paused && this.video) {
327
+ this.playPause();
328
+ } else if (this.state.currentPlaybackRate === 1) {
329
+ this.changePlaybackRate(1.5);
330
+ } else if (this.state.currentPlaybackRate === 1.5) {
331
+ this.changePlaybackRate(2);
332
+ } else if (this.state.currentPlaybackRate !== 8 && this.state.currentPlaybackRate !== -1) {
333
+ this.changePlaybackRate(this.state.currentPlaybackRate * 2);
334
+ } else {
335
+ this.changePlaybackRate(1);
336
+ }
337
+ break;
338
+ case 'Space':
339
+ e.preventDefault();
340
+ if (this.video) {
341
+ this.playPause();
342
+ }
343
+ break;
344
+ }
345
+ }
346
+ }, {
347
+ key: "changePlaybackRate",
348
+ value: function changePlaybackRate(rate) {
349
+ if (this.intervalRewind) {
350
+ clearInterval(this.intervalRewind);
351
+ this.intervalRewind = null;
352
+ }
353
+ this.setState({
354
+ currentPlaybackRate: rate
355
+ });
356
+ this.video.playbackRate = rate;
357
+ }
358
+ }, {
359
+ key: "playBackwards",
360
+ value: function playBackwards() {
361
+ var self = this;
362
+ if (!this.intervalRewind) {
363
+ this.intervalRewind = setInterval(function () {
364
+ if (self.video.currentTime === 0) {
365
+ clearInterval(self.intervalRewind);
366
+ self.intervalRewind = null;
367
+ self.video.pause();
368
+ } else {
369
+ self.video.currentTime += -(1 / self.state.frameRate);
370
+ self.setState({
371
+ currentTime: self.video.currentTime
372
+ });
373
+ }
374
+ }, 1000 / this.state.frameRate / 2);
375
+ } else {
376
+ clearInterval(this.intervalRewind);
377
+ this.intervalRewind = null;
378
+ this.video.pause();
379
+ }
380
+ }
381
+ }, {
382
+ key: "onLoadedMetaData",
383
+ value: function onLoadedMetaData() {
384
+ var totalDuration = this.video.duration;
385
+ this.setState({
386
+ totalDuration: totalDuration
387
+ });
388
+ }
389
+ }, {
390
+ key: "onTimeUpdate",
391
+ value: function onTimeUpdate() {
392
+ var currentPos, maxduration;
393
+ currentPos = this.video.currentTime;
394
+ maxduration = this.video.duration;
395
+ var barWidth = currentPos / maxduration * 100;
396
+ this.progressBar.style.width = barWidth + '%';
397
+ var currentTime = this.video.currentTime;
398
+ this.setState({
399
+ currentTime: currentTime
400
+ });
401
+ if (this.progressBar.style.display === 'none') {
402
+ this.progressBar.style.display = 'block';
403
+ }
404
+ }
405
+ }, {
406
+ key: "onPlaying",
407
+ value: function onPlaying() {
408
+ var playerState = 'play';
409
+ this.setState({
410
+ playerState: playerState
411
+ });
412
+ if (!this.timeInterval) {
413
+ var self = this;
414
+ this.timeInterval = setInterval(function () {
415
+ var currentTime = self.video.currentTime;
416
+ self.setState({
417
+ currentTime: currentTime
418
+ });
419
+ if (self.state.sceneActive) {
420
+ if (currentTime > self.state.activeScene.end_time || currentTime < self.state.activeScene.start_time) {
421
+ self.setState({
422
+ sceneActive: false,
423
+ activeScene: null
424
+ });
550
425
  }
426
+ }
427
+ }, 1000 / this.state.frameRate / 2);
428
+ }
429
+ }
430
+ }, {
431
+ key: "onPause",
432
+ value: function onPause() {
433
+ this.setState({
434
+ playerState: 'pause'
435
+ });
436
+ clearInterval(this.timeInterval);
437
+ this.timeInterval = null;
438
+ "";
439
+ }
440
+ }, {
441
+ key: "frameChange",
442
+ value: function frameChange(type, frame) {
443
+ this.video.pause();
444
+ var currentTime = this.video.currentTime;
445
+ var timeValue = this.state.framePerSecond * frame;
446
+ var updatedTime = currentTime;
447
+ switch (type) {
448
+ case "prev":
449
+ updatedTime = currentTime - timeValue;
450
+ break;
451
+ case "next":
452
+ updatedTime = currentTime + timeValue;
453
+ break;
454
+ }
455
+ this.seekTo(updatedTime);
456
+ }
457
+ }, {
458
+ key: "seekTo",
459
+ value: function seekTo(value) {
460
+ this.video.currentTime = value;
461
+ }
462
+ }, {
463
+ key: "onVideoEnd",
464
+ value: function onVideoEnd() {
465
+ clearInterval(this.timeInterval);
466
+ this.timeInterval = null;
467
+ }
468
+ }, {
469
+ key: "onVideoBuffer",
470
+ value: function onVideoBuffer() {}
471
+ }, {
472
+ key: "playPause",
473
+ value: function playPause() {
474
+ if (this.video.paused) {
475
+ this.video.play();
476
+ } else {
477
+ this.video.pause();
478
+ }
479
+ }
480
+ }, {
481
+ key: "handleMouseDown",
482
+ value: function handleMouseDown(event) {
483
+ this.setState({
484
+ seekbarDrag: true
485
+ });
486
+ this.updateSeekbar(event);
487
+ }
488
+ }, {
489
+ key: "handleMouseMove",
490
+ value: function handleMouseMove(event) {
491
+ if (this.state.seekbarDrag) {
492
+ this.updateSeekbar(event);
493
+ }
494
+ }
495
+ }, {
496
+ key: "handleMouseUp",
497
+ value: function handleMouseUp(event) {
498
+ if (this.state.seekbarDrag) {
499
+ this.setState({
500
+ seekbarDrag: false
501
+ });
502
+ this.updateSeekbar(event);
503
+ this.video.play();
504
+ }
505
+ }
506
+ }, {
507
+ key: "updateSeekbar",
508
+ value: function updateSeekbar(event) {
509
+ this.video.pause();
510
+ if (this.seekBar) {
511
+ var sliderBlockLeft = this.seekBar.getBoundingClientRect().left;
512
+ var seekBarWidth = this.seekBar.offsetWidth;
513
+ var posX = event.clientX - sliderBlockLeft;
514
+ var maxduration = this.video.duration;
515
+ if (posX > seekBarWidth) {
516
+ posX = seekBarWidth;
551
517
  }
552
- }, {
553
- key: 'selectScene',
554
- value: function selectScene(scene) {
555
- this.setState({ sceneActive: true, activeScene: scene });
556
- this.seekTo(scene.start_time);
557
- if (this.video.paused) {
558
- this.video.play();
559
- }
518
+ var currentTime = maxduration * posX / seekBarWidth;
519
+ if (currentTime > maxduration) {
520
+ currentTime = maxduration;
560
521
  }
561
- }, {
562
- key: 'createSceneMarker',
563
- value: function createSceneMarker() {
564
- var _this2 = this;
565
-
566
- var scenesArr = [this.state.activeScene];
567
- return scenesArr.map(function (scene) {
568
- var left = scene.start_time / _this2.video.duration * 100 + '%';
569
- var right = scene.end_time / _this2.video.duration * 100 + '%';
570
- var width = scene.end_time / _this2.video.duration * 100 - scene.start_time / _this2.video.duration * 100 + '%';
571
- return _react2.default.createElement('div', { className: 'scene-marker', style: { width: width, left: left } });
572
- });
522
+ if (currentTime <= 0) {
523
+ currentTime = 0;
573
524
  }
574
- }, {
575
- key: 'createTagMarker',
576
- value: function createTagMarker() {
577
- var _this3 = this;
578
-
579
- var scenesArr = [];
580
- this.state.activeTag.map(function (tag) {
581
- var data = _this3.props.videoData.tagsData.filter(function (data) {
582
- return data.id === tag.id;
583
- });
584
- scenesArr = scenesArr.concat(data);
585
- });
586
-
587
- return scenesArr.map(function (scene, index) {
588
- var left = scene.timestamp / 1000 / _this3.video.duration * 100 + '%';
589
- var width = (scene.timestamp + 1000) / 1000 / _this3.video.duration * 100 - scene.timestamp / 1000 / _this3.video.duration * 100 + '%';
590
- return _react2.default.createElement('div', { className: 'scene-marker', style: { width: width, left: left }, key: index });
591
- });
525
+ var barWidth = currentTime / maxduration * 100;
526
+ this.progressBar.style.width = barWidth + '%';
527
+ this.video.currentTime = currentTime;
528
+ this.setState({
529
+ currentTime: currentTime
530
+ });
531
+ }
532
+ }
533
+ }, {
534
+ key: "selectScene",
535
+ value: function selectScene(scene) {
536
+ this.setState({
537
+ sceneActive: true,
538
+ activeScene: scene
539
+ });
540
+ this.seekTo(scene.start_time);
541
+ if (this.video.paused) {
542
+ this.video.play();
543
+ }
544
+ }
545
+ }, {
546
+ key: "createSceneMarker",
547
+ value: function createSceneMarker() {
548
+ var _this2 = this;
549
+ var scenesArr = [this.state.activeScene];
550
+ return scenesArr.map(function (scene) {
551
+ var left = scene.start_time / _this2.video.duration * 100 + '%';
552
+ var right = scene.end_time / _this2.video.duration * 100 + '%';
553
+ var width = scene.end_time / _this2.video.duration * 100 - scene.start_time / _this2.video.duration * 100 + '%';
554
+ return /*#__PURE__*/_react["default"].createElement("div", {
555
+ className: "scene-marker",
556
+ style: {
557
+ width: width,
558
+ left: left
559
+ }
560
+ });
561
+ });
562
+ }
563
+ }, {
564
+ key: "createTagMarker",
565
+ value: function createTagMarker() {
566
+ var _this3 = this;
567
+ var scenesArr = [];
568
+ this.state.activeTag.map(function (tag) {
569
+ var data = _this3.props.videoData.tagsData.filter(function (data) {
570
+ return data.id === tag.id;
571
+ });
572
+ scenesArr = scenesArr.concat(data);
573
+ });
574
+ return scenesArr.map(function (scene, index) {
575
+ var left = scene.timestamp / 1000 / _this3.video.duration * 100 + '%';
576
+ var width = (scene.timestamp + 1000) / 1000 / _this3.video.duration * 100 - scene.timestamp / 1000 / _this3.video.duration * 100 + '%';
577
+ return /*#__PURE__*/_react["default"].createElement("div", {
578
+ className: "scene-marker",
579
+ style: {
580
+ width: width,
581
+ left: left
582
+ },
583
+ key: index
584
+ });
585
+ });
586
+ }
587
+ }, {
588
+ key: "timeAgo",
589
+ value: function timeAgo(time) {
590
+ time = new Date(time);
591
+ var seconds = Math.floor((new Date() - time) / 1000);
592
+ var interval = Math.floor(seconds / 31536000);
593
+ if (interval >= 1) {
594
+ return interval + " y";
595
+ }
596
+ interval = Math.floor(seconds / 2592000);
597
+ if (interval >= 1) {
598
+ return interval + " m";
599
+ }
600
+ interval = Math.floor(seconds / 86400);
601
+ if (interval >= 1) {
602
+ return interval + " d";
603
+ }
604
+ interval = Math.floor(seconds / 3600);
605
+ if (interval >= 1) {
606
+ return interval + " h";
607
+ }
608
+ interval = Math.floor(seconds / 60);
609
+ if (interval >= 1) {
610
+ return interval + " min";
611
+ }
612
+ return "few seconds ago";
613
+ }
614
+ }, {
615
+ key: "addComment",
616
+ value: function addComment() {
617
+ console.log(this.state.comment);
618
+ var comment = {
619
+ "comment": this.state.comment,
620
+ "isResolved": 0,
621
+ "notified": true,
622
+ "timeFrame": this.video.currentTime,
623
+ "timestamp": new Date().getTime(),
624
+ "userId": "606C93Cca05D684c500EC",
625
+ "userName": "Contido User",
626
+ "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/ramkumarps%40vijaytv.com.png",
627
+ "version": 1
628
+ };
629
+ var commentArr = this.state.comments;
630
+ commentArr.push(comment);
631
+ commentArr = commentArr.sort(function (a, b) {
632
+ return a.timeFrame > b.timeFrame;
633
+ });
634
+ this.setState({
635
+ comment: '',
636
+ comments: commentArr
637
+ });
638
+ }
639
+ }, {
640
+ key: "selectActorTag",
641
+ value: function selectActorTag(actor, index) {
642
+ actor.selected = !actor.selected;
643
+ var selectedActorArr = this.props.videoData.actor_data.filter(function (data) {
644
+ return data.selected;
645
+ });
646
+ if (selectedActorArr.length) {
647
+ var activeTag = selectedActorArr;
648
+ this.setState({
649
+ tagActive: true,
650
+ activeTag: activeTag
651
+ });
652
+ } else {
653
+ this.setState({
654
+ tagActive: false,
655
+ activeTag: []
656
+ });
657
+ }
658
+ console.log(this.props.videoData.actor_data);
659
+ }
660
+ }, {
661
+ key: "selectTab",
662
+ value: function selectTab(tabIndex) {
663
+ this.setState({
664
+ selectedTab: tabIndex
665
+ });
666
+ }
667
+ }, {
668
+ key: "render",
669
+ value: function render() {
670
+ var _this4 = this;
671
+ return /*#__PURE__*/_react["default"].createElement(PlayerContainer, null, /*#__PURE__*/_react["default"].createElement(PlayerWrapper, {
672
+ onMouseMove: this.handleMouseMove,
673
+ onMouseUp: this.handleMouseUp
674
+ }, /*#__PURE__*/_react["default"].createElement(PlayerHeader, null, /*#__PURE__*/_react["default"].createElement(_button["default"], {
675
+ onClick: function onClick(e) {
676
+ return _this4.props.closeVideoPlayer(e);
677
+ },
678
+ display: "rounded",
679
+ appearance: "cta",
680
+ icon: "arrow-left",
681
+ iconWidth: 16,
682
+ iconHeight: 16,
683
+ width: 50,
684
+ height: 50
685
+ }), /*#__PURE__*/_react["default"].createElement(PlayerDetails, null, /*#__PURE__*/_react["default"].createElement("p", {
686
+ className: "video-title"
687
+ }, this.props.videoData.episode_name), /*#__PURE__*/_react["default"].createElement("div", {
688
+ className: "video-details-block"
689
+ }, /*#__PURE__*/_react["default"].createElement("p", {
690
+ className: "video-number"
691
+ }, "S1 ", this.props.videoData.episode_number), /*#__PURE__*/_react["default"].createElement("div", {
692
+ className: "video-files-block"
693
+ }, /*#__PURE__*/_react["default"].createElement("p", {
694
+ className: "video-file-type"
695
+ }, "Clean"), this.props.videoData.active_version.version_badges.map(function (badge, index) {
696
+ return /*#__PURE__*/_react["default"].createElement("p", {
697
+ className: "video-file-versions",
698
+ key: badge
699
+ }, badge);
700
+ })), /*#__PURE__*/_react["default"].createElement("div", {
701
+ className: "video-time-block"
702
+ }, /*#__PURE__*/_react["default"].createElement("div", {
703
+ className: "time-tx time"
704
+ }, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
705
+ name: "tv",
706
+ width: 14,
707
+ height: 14
708
+ }), /*#__PURE__*/_react["default"].createElement("p", null, "19:30")), /*#__PURE__*/_react["default"].createElement("div", {
709
+ className: "time-ott time"
710
+ }, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
711
+ name: "tablet",
712
+ width: 18,
713
+ height: 13
714
+ }), /*#__PURE__*/_react["default"].createElement("p", null, "18:00")))))), /*#__PURE__*/_react["default"].createElement("div", {
715
+ className: "player-block",
716
+ ref: function ref(c) {
717
+ _this4.playerBlock = c;
592
718
  }
593
- }, {
594
- key: 'timeAgo',
595
- value: function timeAgo(time) {
596
- time = new Date(time);
597
- var seconds = Math.floor((new Date() - time) / 1000);
598
- var interval = Math.floor(seconds / 31536000);
599
- if (interval >= 1) {
600
- return interval + " y";
601
- }
602
- interval = Math.floor(seconds / 2592000);
603
- if (interval >= 1) {
604
- return interval + " m";
605
- }
606
- interval = Math.floor(seconds / 86400);
607
- if (interval >= 1) {
608
- return interval + " d";
609
- }
610
- interval = Math.floor(seconds / 3600);
611
- if (interval >= 1) {
612
- return interval + " h";
613
- }
614
- interval = Math.floor(seconds / 60);
615
- if (interval >= 1) {
616
- return interval + " min";
617
- }
618
- return "few seconds ago";
719
+ }, /*#__PURE__*/_react["default"].createElement(PlayerBlock, {
720
+ onClick: this.playPause
721
+ }, /*#__PURE__*/_react["default"].createElement("video", {
722
+ ref: function ref(c) {
723
+ _this4.video = c;
724
+ },
725
+ src: this.state.currentSrc,
726
+ width: this.props.width,
727
+ height: this.props.height
728
+ }), this.state.playerState === 'pause' ? /*#__PURE__*/_react["default"].createElement(BigPlayButton, {
729
+ display: "rounded",
730
+ appearance: "cta",
731
+ icon: "play",
732
+ iconWidth: 20,
733
+ iconHeight: 26,
734
+ width: 100,
735
+ height: 100
736
+ }) : null, /*#__PURE__*/_react["default"].createElement(SDPlayerBorder, null), /*#__PURE__*/_react["default"].createElement(MarkerBlock, {
737
+ ref: function ref(c) {
738
+ _this4.markerBlock = c;
619
739
  }
620
- }, {
621
- key: 'addComment',
622
- value: function addComment() {
623
- console.log(this.state.comment);
624
- var comment = {
625
- "comment": this.state.comment,
626
- "isResolved": 0,
627
- "notified": true,
628
- "timeFrame": this.video.currentTime,
629
- "timestamp": new Date().getTime(),
630
- "userId": "606C93Cca05D684c500EC",
631
- "userName": "Contido User",
632
- "userThumbnail": "https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/ramkumarps%40vijaytv.com.png",
633
- "version": 1
634
- };
635
- var commentArr = this.state.comments;
636
- commentArr.push(comment);
637
- commentArr = commentArr.sort(function (a, b) {
638
- return a.timeFrame > b.timeFrame;
639
- });
640
- this.setState({ comment: '', comments: commentArr });
740
+ }, this.state.sceneActive ? this.createSceneMarker() : null, this.state.tagActive ? this.createTagMarker() : null)), /*#__PURE__*/_react["default"].createElement(PlayerControlBlock, null, /*#__PURE__*/_react["default"].createElement(SeekBar, {
741
+ onMouseDown: this.handleMouseDown
742
+ }, /*#__PURE__*/_react["default"].createElement("div", {
743
+ className: "seekbar-bg",
744
+ ref: function ref(c) {
745
+ _this4.seekBar = c;
641
746
  }
642
- }, {
643
- key: 'selectActorTag',
644
- value: function selectActorTag(actor, index) {
645
- actor.selected = !actor.selected;
646
- var selectedActorArr = this.props.videoData.actor_data.filter(function (data) {
647
- return data.selected;
648
- });
649
- if (selectedActorArr.length) {
650
- var activeTag = selectedActorArr;
651
- this.setState({ tagActive: true, activeTag: activeTag });
652
- } else {
653
- this.setState({ tagActive: false, activeTag: [] });
654
- }
655
- console.log(this.props.videoData.actor_data);
747
+ }), /*#__PURE__*/_react["default"].createElement("div", {
748
+ className: "play-progress",
749
+ ref: function ref(c) {
750
+ _this4.progressBar = c;
656
751
  }
657
- }, {
658
- key: 'selectTab',
659
- value: function selectTab(tabIndex) {
660
- this.setState({ selectedTab: tabIndex });
752
+ })), /*#__PURE__*/_react["default"].createElement(PlayerControls, null, /*#__PURE__*/_react["default"].createElement("div", {
753
+ className: "controls-left"
754
+ }, this.state.playerState === 'pause' ? /*#__PURE__*/_react["default"].createElement(_button["default"], {
755
+ display: "rounded",
756
+ appearance: "cta",
757
+ icon: "play",
758
+ onClick: this.playPause,
759
+ iconWidth: 12,
760
+ iconHeight: 15,
761
+ width: 20,
762
+ height: 20
763
+ }) : /*#__PURE__*/_react["default"].createElement(_button["default"], {
764
+ display: "rounded",
765
+ appearance: "cta",
766
+ icon: "pause",
767
+ onClick: this.playPause,
768
+ iconWidth: 25,
769
+ iconHeight: 25,
770
+ width: 20,
771
+ height: 20
772
+ }), /*#__PURE__*/_react["default"].createElement(_button["default"], {
773
+ display: "rounded",
774
+ appearance: "cta",
775
+ icon: "triangle-double-left",
776
+ onClick: function onClick() {
777
+ return _this4.frameChange('prev', 1);
778
+ },
779
+ iconWidth: 14,
780
+ iconHeight: 14,
781
+ width: 20,
782
+ height: 20
783
+ }), /*#__PURE__*/_react["default"].createElement(_button["default"], {
784
+ display: "rounded",
785
+ appearance: "cta",
786
+ icon: "triangle-double-right",
787
+ onClick: function onClick() {
788
+ return _this4.frameChange('next', 1);
789
+ },
790
+ iconWidth: 14,
791
+ iconHeight: 14,
792
+ width: 20,
793
+ height: 20
794
+ }), /*#__PURE__*/_react["default"].createElement("div", {
795
+ className: "video-time-display"
796
+ }, /*#__PURE__*/_react["default"].createElement("p", {
797
+ className: "video-current-time video-time"
798
+ }, this.secondsToTime(this.state.currentTime, this.state.frameRate, this.state.initialTime)), /*#__PURE__*/_react["default"].createElement("p", {
799
+ className: "video-time video-time-seperator"
800
+ }, "/"), /*#__PURE__*/_react["default"].createElement("p", {
801
+ className: "video-end-time video-time"
802
+ }, this.secondsToTime(this.state.totalDuration, this.state.frameRate)))), /*#__PURE__*/_react["default"].createElement("div", {
803
+ className: "controls-right"
804
+ }, /*#__PURE__*/_react["default"].createElement(_button["default"], {
805
+ display: "rounded",
806
+ appearance: "cta",
807
+ icon: "volume",
808
+ iconWidth: 18,
809
+ iconHeight: 18,
810
+ width: 20,
811
+ height: 20
812
+ }), /*#__PURE__*/_react["default"].createElement(_button["default"], {
813
+ display: "rounded",
814
+ appearance: "cta",
815
+ icon: "share",
816
+ iconWidth: 18,
817
+ iconHeight: 18,
818
+ width: 20,
819
+ height: 20
820
+ }), /*#__PURE__*/_react["default"].createElement(_button["default"], {
821
+ display: "rounded",
822
+ appearance: "cta",
823
+ icon: "settings",
824
+ iconWidth: 16,
825
+ iconHeight: 16,
826
+ width: 20,
827
+ height: 20
828
+ }), /*#__PURE__*/_react["default"].createElement(_button["default"], {
829
+ display: "rounded",
830
+ appearance: "cta",
831
+ icon: "fullscreen",
832
+ onClick: this.fullScreenToggle,
833
+ iconWidth: 14,
834
+ iconHeight: 14,
835
+ width: 20,
836
+ height: 20
837
+ }))))), /*#__PURE__*/_react["default"].createElement(CommentBox, null, /*#__PURE__*/_react["default"].createElement(_inputText["default"], {
838
+ type: "text",
839
+ placeholder: "Write a comment\u2026",
840
+ onChange: function onChange(event) {
841
+ return _this4.setState({
842
+ comment: event.target.value
843
+ });
844
+ },
845
+ value: this.state.comment,
846
+ onKeyPress: function onKeyPress(event) {
847
+ if (event.key === 'Enter') {
848
+ _this4.addComment();
849
+ }
661
850
  }
662
- }, {
663
- key: 'render',
664
- value: function render() {
665
- var _this4 = this;
666
-
667
- return _react2.default.createElement(
668
- PlayerContainer,
669
- null,
670
- _react2.default.createElement(
671
- PlayerWrapper,
672
- { onMouseMove: this.handleMouseMove, onMouseUp: this.handleMouseUp },
673
- _react2.default.createElement(
674
- PlayerHeader,
675
- null,
676
- _react2.default.createElement(_button2.default, { onClick: function onClick(e) {
677
- return _this4.props.closeVideoPlayer(e);
678
- }, display: 'rounded', appearance: 'cta', icon: 'arrow-left', iconWidth: 16, iconHeight: 16, width: 50, height: 50 }),
679
- _react2.default.createElement(
680
- PlayerDetails,
681
- null,
682
- _react2.default.createElement(
683
- 'p',
684
- { className: 'video-title' },
685
- this.props.videoData.episode_name
686
- ),
687
- _react2.default.createElement(
688
- 'div',
689
- { className: 'video-details-block' },
690
- _react2.default.createElement(
691
- 'p',
692
- { className: 'video-number' },
693
- 'S1 ',
694
- this.props.videoData.episode_number
695
- ),
696
- _react2.default.createElement(
697
- 'div',
698
- { className: 'video-files-block' },
699
- _react2.default.createElement(
700
- 'p',
701
- { className: 'video-file-type' },
702
- 'Clean'
703
- ),
704
- this.props.videoData.active_version.version_badges.map(function (badge, index) {
705
- return _react2.default.createElement(
706
- 'p',
707
- { className: 'video-file-versions', key: badge },
708
- badge
709
- );
710
- })
711
- ),
712
- _react2.default.createElement(
713
- 'div',
714
- { className: 'video-time-block' },
715
- _react2.default.createElement(
716
- 'div',
717
- { className: 'time-tx time' },
718
- _react2.default.createElement(_icon2.default, { name: 'tv', width: 14, height: 14 }),
719
- _react2.default.createElement(
720
- 'p',
721
- null,
722
- '19:30'
723
- )
724
- ),
725
- _react2.default.createElement(
726
- 'div',
727
- { className: 'time-ott time' },
728
- _react2.default.createElement(_icon2.default, { name: 'tablet', width: 18, height: 13 }),
729
- _react2.default.createElement(
730
- 'p',
731
- null,
732
- '18:00'
733
- )
734
- )
735
- )
736
- )
737
- )
738
- ),
739
- _react2.default.createElement(
740
- 'div',
741
- { className: 'player-block', ref: function ref(c) {
742
- _this4.playerBlock = c;
743
- } },
744
- _react2.default.createElement(
745
- PlayerBlock,
746
- { onClick: this.playPause },
747
- _react2.default.createElement('video', { ref: function ref(c) {
748
- _this4.video = c;
749
- }, src: this.state.currentSrc, width: this.props.width, height: this.props.height }),
750
- this.state.playerState === 'pause' ? _react2.default.createElement(BigPlayButton, { display: 'rounded', appearance: 'cta', icon: 'play', iconWidth: 20, iconHeight: 26, width: 100, height: 100 }) : null,
751
- _react2.default.createElement(SDPlayerBorder, null),
752
- _react2.default.createElement(
753
- MarkerBlock,
754
- { ref: function ref(c) {
755
- _this4.markerBlock = c;
756
- } },
757
- this.state.sceneActive ? this.createSceneMarker() : null,
758
- this.state.tagActive ? this.createTagMarker() : null
759
- )
760
- ),
761
- _react2.default.createElement(
762
- PlayerControlBlock,
763
- null,
764
- _react2.default.createElement(
765
- SeekBar,
766
- { onMouseDown: this.handleMouseDown },
767
- _react2.default.createElement('div', { className: 'seekbar-bg', ref: function ref(c) {
768
- _this4.seekBar = c;
769
- } }),
770
- _react2.default.createElement('div', { className: 'play-progress', ref: function ref(c) {
771
- _this4.progressBar = c;
772
- } })
773
- ),
774
- _react2.default.createElement(
775
- PlayerControls,
776
- null,
777
- _react2.default.createElement(
778
- 'div',
779
- { className: 'controls-left' },
780
- this.state.playerState === 'pause' ? _react2.default.createElement(_button2.default, { display: 'rounded', appearance: 'cta', icon: 'play', onClick: this.playPause, iconWidth: 12, iconHeight: 15, width: 20, height: 20 }) : _react2.default.createElement(_button2.default, { display: 'rounded', appearance: 'cta', icon: 'pause', onClick: this.playPause, iconWidth: 25, iconHeight: 25, width: 20, height: 20 }),
781
- _react2.default.createElement(_button2.default, { display: 'rounded', appearance: 'cta', icon: 'triangle-double-left', onClick: function onClick() {
782
- return _this4.frameChange('prev', 1);
783
- }, iconWidth: 14, iconHeight: 14, width: 20, height: 20 }),
784
- _react2.default.createElement(_button2.default, { display: 'rounded', appearance: 'cta', icon: 'triangle-double-right', onClick: function onClick() {
785
- return _this4.frameChange('next', 1);
786
- }, iconWidth: 14, iconHeight: 14, width: 20, height: 20 }),
787
- _react2.default.createElement(
788
- 'div',
789
- { className: 'video-time-display' },
790
- _react2.default.createElement(
791
- 'p',
792
- { className: 'video-current-time video-time' },
793
- this.secondsToTime(this.state.currentTime, this.state.frameRate, this.state.initialTime)
794
- ),
795
- _react2.default.createElement(
796
- 'p',
797
- { className: 'video-time video-time-seperator' },
798
- '/'
799
- ),
800
- _react2.default.createElement(
801
- 'p',
802
- { className: 'video-end-time video-time' },
803
- this.secondsToTime(this.state.totalDuration, this.state.frameRate)
804
- )
805
- )
806
- ),
807
- _react2.default.createElement(
808
- 'div',
809
- { className: 'controls-right' },
810
- _react2.default.createElement(_button2.default, { display: 'rounded', appearance: 'cta', icon: 'volume', iconWidth: 18, iconHeight: 18, width: 20, height: 20 }),
811
- _react2.default.createElement(_button2.default, { display: 'rounded', appearance: 'cta', icon: 'share', iconWidth: 18, iconHeight: 18, width: 20, height: 20 }),
812
- _react2.default.createElement(_button2.default, { display: 'rounded', appearance: 'cta', icon: 'settings', iconWidth: 16, iconHeight: 16, width: 20, height: 20 }),
813
- _react2.default.createElement(_button2.default, { display: 'rounded', appearance: 'cta', icon: 'fullscreen', onClick: this.fullScreenToggle, iconWidth: 14, iconHeight: 14, width: 20, height: 20 })
814
- )
815
- )
816
- )
817
- ),
818
- _react2.default.createElement(
819
- CommentBox,
820
- null,
821
- _react2.default.createElement(_inputText2.default, { type: 'text', placeholder: 'Write a comment\u2026', onChange: function onChange(event) {
822
- return _this4.setState({ comment: event.target.value });
823
- }, value: this.state.comment, onKeyPress: function onKeyPress(event) {
824
- if (event.key === 'Enter') {
825
- _this4.addComment();
826
- }
827
- } }),
828
- _react2.default.createElement(_button2.default, { appearance: 'cta', icon: 'send', onClick: function onClick() {
829
- return _this4.addComment();
830
- }, iconWidth: 20, iconHeight: 18, width: 46, height: 46 })
831
- ),
832
- _react2.default.createElement(Carousal, null)
833
- ),
834
- _react2.default.createElement(
835
- VideoDetailsWrapper,
836
- null,
837
- _react2.default.createElement(
838
- 'div',
839
- { className: 'tab-block' },
840
- _react2.default.createElement(
841
- _tabs2.default,
842
- { selected: this.state.selectedTab, onSelect: function onSelect(tabIndex) {
843
- return _this4.selectTab(tabIndex);
844
- } },
845
- _react2.default.createElement(
846
- _tabs2.default.Tab,
847
- { label: 'Comments' },
848
- _react2.default.createElement(
849
- 'div',
850
- { className: 'comments-tab tab-container' },
851
- _react2.default.createElement(
852
- 'div',
853
- { className: 'comments-section' },
854
- _react2.default.createElement(
855
- 'div',
856
- { className: 'comments-details' },
857
- _react2.default.createElement(
858
- 'p',
859
- { className: 'comments-count' },
860
- this.state.comments.length,
861
- ' Comments'
862
- )
863
- ),
864
- _react2.default.createElement(
865
- 'div',
866
- { className: 'comments-container' },
867
- this.state.comments.map(function (comment, index) {
868
- return _react2.default.createElement(
869
- 'div',
870
- { className: 'comment-wrapper', key: index, onClick: function onClick() {
871
- return _this4.seekTo(comment.timeFrame);
872
- } },
873
- _react2.default.createElement(
874
- 'div',
875
- { className: 'comment-block' },
876
- _react2.default.createElement(
877
- 'div',
878
- { className: 'comment-header' },
879
- _react2.default.createElement(_image2.default, { source: comment.userThumbnail, alt: 'user image', width: 'auto', height: '100%' }),
880
- _react2.default.createElement(
881
- 'p',
882
- { className: 'user-name' },
883
- comment.userName
884
- ),
885
- _react2.default.createElement(
886
- 'p',
887
- { className: 'video-time' },
888
- '@',
889
- _this4.secondsToTime(comment.timeFrame, _this4.state.frameRate, _this4.state.initialTime)
890
- ),
891
- _react2.default.createElement(
892
- 'p',
893
- { className: 'comment-time' },
894
- _this4.timeAgo(comment.timestamp)
895
- )
896
- ),
897
- _react2.default.createElement(
898
- 'div',
899
- { className: 'comment-body' },
900
- _react2.default.createElement(
901
- 'p',
902
- null,
903
- comment.comment
904
- )
905
- )
906
- ),
907
- _react2.default.createElement(
908
- 'div',
909
- { className: 'reply-wrapper' },
910
- comment.replies && comment.replies.length ? comment.replies.map(function (reply, index) {
911
- return _react2.default.createElement(
912
- 'div',
913
- { className: 'reply-block', key: index },
914
- _react2.default.createElement(
915
- 'div',
916
- { className: 'comment-header' },
917
- _react2.default.createElement(_image2.default, { source: reply.userThumbnail, alt: 'user image', width: 'auto', height: '100%' }),
918
- _react2.default.createElement(
919
- 'p',
920
- { className: 'user-name' },
921
- reply.userName
922
- ),
923
- _react2.default.createElement(
924
- 'p',
925
- { className: 'comment-time' },
926
- _this4.timeAgo(reply.timestamp)
927
- )
928
- ),
929
- _react2.default.createElement(
930
- 'div',
931
- { className: 'comment-body' },
932
- _react2.default.createElement(
933
- 'p',
934
- null,
935
- reply.message
936
- )
937
- )
938
- );
939
- }) : null
940
- )
941
- );
942
- })
943
- )
944
- ),
945
- _react2.default.createElement(
946
- 'div',
947
- { className: 'approval-block' },
948
- _react2.default.createElement(
949
- _button2.default,
950
- { appearance: 'cta', display: 'rounded', width: 200, height: 40 },
951
- 'Creative Approval'
952
- ),
953
- _react2.default.createElement(
954
- _button2.default,
955
- { appearance: 'cta', display: 'rounded', width: 200, height: 40 },
956
- 'Reject'
957
- )
958
- )
959
- )
960
- ),
961
- _react2.default.createElement(
962
- _tabs2.default.Tab,
963
- { label: 'Info' },
964
- _react2.default.createElement(
965
- 'div',
966
- { className: 'info-tab tab-container' },
967
- this.props.videoData.active_version.media_info.info.map(function (info, index) {
968
- return _react2.default.createElement(
969
- 'div',
970
- { className: 'info-block', key: index },
971
- _react2.default.createElement(
972
- 'p',
973
- { className: 'info-header' },
974
- info.title
975
- ),
976
- _react2.default.createElement(
977
- 'p',
978
- { className: 'info-value' },
979
- info.value
980
- )
981
- );
982
- })
983
- )
984
- ),
985
- this.props.videoData.active_version.scenes.length ? _react2.default.createElement(
986
- _tabs2.default.Tab,
987
- { label: 'Scenes' },
988
- _react2.default.createElement(
989
- 'div',
990
- { className: 'scenes-tab tab-container' },
991
- _react2.default.createElement(
992
- 'div',
993
- { className: 'scenes-synopsis' },
994
- _react2.default.createElement(
995
- 'p',
996
- { className: 'info-header' },
997
- 'Synopsis'
998
- ),
999
- _react2.default.createElement(
1000
- 'p',
1001
- { className: 'synopsis' },
1002
- this.props.videoData.active_version.media_info.episode_synopsis
1003
- ),
1004
- _react2.default.createElement(_thematicBreak2.default, { text: '' })
1005
- ),
1006
- _react2.default.createElement(
1007
- 'div',
1008
- { className: 'scenes-wrapper' },
1009
- this.props.videoData.active_version.scenes.map(function (scene, index) {
1010
- return _react2.default.createElement(
1011
- 'div',
1012
- { className: 'scene-container', key: index, onClick: function onClick() {
1013
- return _this4.selectScene(scene);
1014
- } },
1015
- _react2.default.createElement(
1016
- 'div',
1017
- { className: 'scene-block' },
1018
- _react2.default.createElement(
1019
- 'div',
1020
- { className: 'scene-image' },
1021
- _react2.default.createElement(_image2.default, { source: _this4.props.videoData.active_version.thumbnail, alt: 'scene image', width: 'auto', height: '100%' }),
1022
- _react2.default.createElement(_icon2.default, { name: 'play', width: 14, height: 18 })
1023
- ),
1024
- _react2.default.createElement(
1025
- 'div',
1026
- { className: 'scene-details' },
1027
- _react2.default.createElement(
1028
- 'p',
1029
- { className: 'scene-name' },
1030
- scene.name
1031
- ),
1032
- _react2.default.createElement(
1033
- 'p',
1034
- { className: 'scene-time' },
1035
- scene.smpte_start_time,
1036
- ' - ',
1037
- scene.smpte_end_time
1038
- ),
1039
- _react2.default.createElement(
1040
- 'div',
1041
- { className: 'scene-tags-block' },
1042
- scene.tags.map(function (tag, index) {
1043
- return _react2.default.createElement(
1044
- 'p',
1045
- { className: 'scene-tags', key: tag[0] + index },
1046
- '#',
1047
- tag[0]
1048
- );
1049
- })
1050
- )
1051
- )
1052
- ),
1053
- _react2.default.createElement(_thematicBreak2.default, { text: '' })
1054
- );
1055
- })
1056
- )
1057
- )
1058
- ) : null,
1059
- this.props.videoData.actor_data && this.props.videoData.actor_data.length ? _react2.default.createElement(
1060
- _tabs2.default.Tab,
1061
- { label: 'Tag' },
1062
- _react2.default.createElement(
1063
- 'div',
1064
- { className: 'tags-tab tab-container' },
1065
- _react2.default.createElement(
1066
- 'p',
1067
- { className: 'tag-header' },
1068
- 'Characters'
1069
- ),
1070
- _react2.default.createElement(
1071
- 'div',
1072
- { className: 'characters-list' },
1073
- this.props.videoData.actor_data.map(function (actor, index) {
1074
- return _react2.default.createElement(
1075
- 'div',
1076
- { className: actor.selected ? "actor-tag actor-selected" : "actor-tag", key: index, onClick: function onClick() {
1077
- return _this4.selectActorTag(actor, index);
1078
- } },
1079
- _react2.default.createElement(_image2.default, { width: 'auto', height: '100%', source: actor.img_url || 'https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/ramkumarps%40vijaytv.com.png' }),
1080
- _react2.default.createElement(
1081
- 'div',
1082
- { className: 'actor-name-wrapper' },
1083
- _react2.default.createElement(
1084
- 'p',
1085
- { className: 'actor-name' },
1086
- actor.name
1087
- )
1088
- )
1089
- );
1090
- })
1091
- )
1092
- )
1093
- ) : null
1094
- )
1095
- )
1096
- )
1097
- );
851
+ }), /*#__PURE__*/_react["default"].createElement(_button["default"], {
852
+ appearance: "cta",
853
+ icon: "send",
854
+ onClick: function onClick() {
855
+ return _this4.addComment();
856
+ },
857
+ iconWidth: 20,
858
+ iconHeight: 18,
859
+ width: 46,
860
+ height: 46
861
+ })), /*#__PURE__*/_react["default"].createElement(Carousal, null)), /*#__PURE__*/_react["default"].createElement(VideoDetailsWrapper, null, /*#__PURE__*/_react["default"].createElement("div", {
862
+ className: "tab-block"
863
+ }, /*#__PURE__*/_react["default"].createElement(_tabs["default"], {
864
+ selected: this.state.selectedTab,
865
+ onSelect: function onSelect(tabIndex) {
866
+ return _this4.selectTab(tabIndex);
1098
867
  }
1099
- }]);
1100
-
1101
- return Player;
1102
- }(_react2.default.Component);
1103
-
868
+ }, /*#__PURE__*/_react["default"].createElement(_tabs["default"].Tab, {
869
+ label: "Comments"
870
+ }, /*#__PURE__*/_react["default"].createElement("div", {
871
+ className: "comments-tab tab-container"
872
+ }, /*#__PURE__*/_react["default"].createElement("div", {
873
+ className: "comments-section"
874
+ }, /*#__PURE__*/_react["default"].createElement("div", {
875
+ className: "comments-details"
876
+ }, /*#__PURE__*/_react["default"].createElement("p", {
877
+ className: "comments-count"
878
+ }, this.state.comments.length, " Comments")), /*#__PURE__*/_react["default"].createElement("div", {
879
+ className: "comments-container"
880
+ }, this.state.comments.map(function (comment, index) {
881
+ return /*#__PURE__*/_react["default"].createElement("div", {
882
+ className: "comment-wrapper",
883
+ key: index,
884
+ onClick: function onClick() {
885
+ return _this4.seekTo(comment.timeFrame);
886
+ }
887
+ }, /*#__PURE__*/_react["default"].createElement("div", {
888
+ className: "comment-block"
889
+ }, /*#__PURE__*/_react["default"].createElement("div", {
890
+ className: "comment-header"
891
+ }, /*#__PURE__*/_react["default"].createElement(_image["default"], {
892
+ source: comment.userThumbnail,
893
+ alt: "user image",
894
+ width: "auto",
895
+ height: "100%"
896
+ }), /*#__PURE__*/_react["default"].createElement("p", {
897
+ className: "user-name"
898
+ }, comment.userName), /*#__PURE__*/_react["default"].createElement("p", {
899
+ className: "video-time"
900
+ }, "@", _this4.secondsToTime(comment.timeFrame, _this4.state.frameRate, _this4.state.initialTime)), /*#__PURE__*/_react["default"].createElement("p", {
901
+ className: "comment-time"
902
+ }, _this4.timeAgo(comment.timestamp))), /*#__PURE__*/_react["default"].createElement("div", {
903
+ className: "comment-body"
904
+ }, /*#__PURE__*/_react["default"].createElement("p", null, comment.comment))), /*#__PURE__*/_react["default"].createElement("div", {
905
+ className: "reply-wrapper"
906
+ }, comment.replies && comment.replies.length ? comment.replies.map(function (reply, index) {
907
+ return /*#__PURE__*/_react["default"].createElement("div", {
908
+ className: "reply-block",
909
+ key: index
910
+ }, /*#__PURE__*/_react["default"].createElement("div", {
911
+ className: "comment-header"
912
+ }, /*#__PURE__*/_react["default"].createElement(_image["default"], {
913
+ source: reply.userThumbnail,
914
+ alt: "user image",
915
+ width: "auto",
916
+ height: "100%"
917
+ }), /*#__PURE__*/_react["default"].createElement("p", {
918
+ className: "user-name"
919
+ }, reply.userName), /*#__PURE__*/_react["default"].createElement("p", {
920
+ className: "comment-time"
921
+ }, _this4.timeAgo(reply.timestamp))), /*#__PURE__*/_react["default"].createElement("div", {
922
+ className: "comment-body"
923
+ }, /*#__PURE__*/_react["default"].createElement("p", null, reply.message)));
924
+ }) : null));
925
+ }))), /*#__PURE__*/_react["default"].createElement("div", {
926
+ className: "approval-block"
927
+ }, /*#__PURE__*/_react["default"].createElement(_button["default"], {
928
+ appearance: "cta",
929
+ display: "rounded",
930
+ width: 200,
931
+ height: 40
932
+ }, "Creative Approval"), /*#__PURE__*/_react["default"].createElement(_button["default"], {
933
+ appearance: "cta",
934
+ display: "rounded",
935
+ width: 200,
936
+ height: 40
937
+ }, "Reject")))), /*#__PURE__*/_react["default"].createElement(_tabs["default"].Tab, {
938
+ label: "Info"
939
+ }, /*#__PURE__*/_react["default"].createElement("div", {
940
+ className: "info-tab tab-container"
941
+ }, this.props.videoData.active_version.media_info.info.map(function (info, index) {
942
+ return /*#__PURE__*/_react["default"].createElement("div", {
943
+ className: "info-block",
944
+ key: index
945
+ }, /*#__PURE__*/_react["default"].createElement("p", {
946
+ className: "info-header"
947
+ }, info.title), /*#__PURE__*/_react["default"].createElement("p", {
948
+ className: "info-value"
949
+ }, info.value));
950
+ }))), this.props.videoData.active_version.scenes.length ? /*#__PURE__*/_react["default"].createElement(_tabs["default"].Tab, {
951
+ label: "Scenes"
952
+ }, /*#__PURE__*/_react["default"].createElement("div", {
953
+ className: "scenes-tab tab-container"
954
+ }, /*#__PURE__*/_react["default"].createElement("div", {
955
+ className: "scenes-synopsis"
956
+ }, /*#__PURE__*/_react["default"].createElement("p", {
957
+ className: "info-header"
958
+ }, "Synopsis"), /*#__PURE__*/_react["default"].createElement("p", {
959
+ className: "synopsis"
960
+ }, this.props.videoData.active_version.media_info.episode_synopsis), /*#__PURE__*/_react["default"].createElement(_thematicBreak["default"], {
961
+ text: ""
962
+ })), /*#__PURE__*/_react["default"].createElement("div", {
963
+ className: "scenes-wrapper"
964
+ }, this.props.videoData.active_version.scenes.map(function (scene, index) {
965
+ return /*#__PURE__*/_react["default"].createElement("div", {
966
+ className: "scene-container",
967
+ key: index,
968
+ onClick: function onClick() {
969
+ return _this4.selectScene(scene);
970
+ }
971
+ }, /*#__PURE__*/_react["default"].createElement("div", {
972
+ className: "scene-block"
973
+ }, /*#__PURE__*/_react["default"].createElement("div", {
974
+ className: "scene-image"
975
+ }, /*#__PURE__*/_react["default"].createElement(_image["default"], {
976
+ source: _this4.props.videoData.active_version.thumbnail,
977
+ alt: "scene image",
978
+ width: "auto",
979
+ height: "100%"
980
+ }), /*#__PURE__*/_react["default"].createElement(_icon["default"], {
981
+ name: "play",
982
+ width: 14,
983
+ height: 18
984
+ })), /*#__PURE__*/_react["default"].createElement("div", {
985
+ className: "scene-details"
986
+ }, /*#__PURE__*/_react["default"].createElement("p", {
987
+ className: "scene-name"
988
+ }, scene.name), /*#__PURE__*/_react["default"].createElement("p", {
989
+ className: "scene-time"
990
+ }, scene.smpte_start_time, " - ", scene.smpte_end_time), /*#__PURE__*/_react["default"].createElement("div", {
991
+ className: "scene-tags-block"
992
+ }, scene.tags.map(function (tag, index) {
993
+ return /*#__PURE__*/_react["default"].createElement("p", {
994
+ className: "scene-tags",
995
+ key: tag[0] + index
996
+ }, "#", tag[0]);
997
+ })))), /*#__PURE__*/_react["default"].createElement(_thematicBreak["default"], {
998
+ text: ""
999
+ }));
1000
+ })))) : null, this.props.videoData.actor_data && this.props.videoData.actor_data.length ? /*#__PURE__*/_react["default"].createElement(_tabs["default"].Tab, {
1001
+ label: "Tag"
1002
+ }, /*#__PURE__*/_react["default"].createElement("div", {
1003
+ className: "tags-tab tab-container"
1004
+ }, /*#__PURE__*/_react["default"].createElement("p", {
1005
+ className: "tag-header"
1006
+ }, "Characters"), /*#__PURE__*/_react["default"].createElement("div", {
1007
+ className: "characters-list"
1008
+ }, this.props.videoData.actor_data.map(function (actor, index) {
1009
+ return /*#__PURE__*/_react["default"].createElement("div", {
1010
+ className: actor.selected ? "actor-tag actor-selected" : "actor-tag",
1011
+ key: index,
1012
+ onClick: function onClick() {
1013
+ return _this4.selectActorTag(actor, index);
1014
+ }
1015
+ }, /*#__PURE__*/_react["default"].createElement(_image["default"], {
1016
+ width: "auto",
1017
+ height: "100%",
1018
+ source: actor.img_url || 'https://s3.ap-south-1.amazonaws.com/topaz-mam-production/user_profile/ramkumarps%40vijaytv.com.png'
1019
+ }), /*#__PURE__*/_react["default"].createElement("div", {
1020
+ className: "actor-name-wrapper"
1021
+ }, /*#__PURE__*/_react["default"].createElement("p", {
1022
+ className: "actor-name"
1023
+ }, actor.name)));
1024
+ })))) : null))));
1025
+ }
1026
+ }]);
1027
+ }(_react["default"].Component);
1104
1028
  Player.propTypes = {
1105
- theme: _propTypes2.default.oneOf(['light', 'dark']),
1106
- src: _propTypes2.default.string.isRequired,
1107
- width: _propTypes2.default.number,
1108
- height: _propTypes2.default.number
1029
+ theme: _propTypes["default"].oneOf(['light', 'dark']),
1030
+ src: _propTypes["default"].string.isRequired,
1031
+ width: _propTypes["default"].number,
1032
+ height: _propTypes["default"].number
1109
1033
  };
1110
-
1111
1034
  Player.defaultProps = {
1112
- theme: 'light',
1113
- src: '',
1114
- width: 815,
1115
- height: 458
1035
+ theme: 'light',
1036
+ src: '',
1037
+ width: 815,
1038
+ height: 458
1116
1039
  };
1117
-
1118
- exports.default = Player;
1040
+ var _default = exports["default"] = Player;