@onesy/ui-react 1.0.130 → 1.0.132
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/Accordion.d.ts +2 -2
- package/Accordion/Accordion.js +342 -242
- package/Accordion/index.js +12 -7
- package/AdvancedTextField/AdvancedTextField.d.ts +1 -1
- package/AdvancedTextField/AdvancedTextField.js +165 -157
- package/AdvancedTextField/index.js +12 -7
- package/Append/Append.d.ts +3 -3
- package/Append/Append.js +502 -519
- package/Append/index.js +12 -7
- package/AreaChart/AreaChart.d.ts +1 -1
- package/AreaChart/AreaChart.js +53 -40
- package/AreaChart/index.js +12 -7
- package/AreaChartItem/AreaChartItem.d.ts +1 -1
- package/AreaChartItem/AreaChartItem.js +325 -237
- package/AreaChartItem/index.js +12 -7
- package/AudioPlayer/AudioPlayer.d.ts +1 -1
- package/AudioPlayer/AudioPlayer.js +683 -466
- package/AudioPlayer/index.js +12 -7
- package/AudioRecorder/AudioRecorder.d.ts +1 -1
- package/AudioRecorder/AudioRecorder.js +359 -259
- package/AudioRecorder/index.js +12 -7
- package/AutoComplete/AutoComplete.d.ts +3 -3
- package/AutoComplete/AutoComplete.js +693 -568
- package/AutoComplete/index.js +12 -7
- package/AutoCompleteCountry/AutoCompleteCountry.d.ts +1 -1
- package/AutoCompleteCountry/AutoCompleteCountry.js +99 -62
- package/AutoCompleteCountry/index.js +12 -7
- package/AutoCompleteCurrency/AutoCompleteCurrency.d.ts +1 -1
- package/AutoCompleteCurrency/AutoCompleteCurrency.js +73 -61
- package/AutoCompleteCurrency/index.js +12 -7
- package/Avatar/Avatar.d.ts +1 -1
- package/Avatar/Avatar.js +113 -86
- package/Avatar/index.js +12 -7
- package/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/AvatarGroup/AvatarGroup.js +104 -87
- package/AvatarGroup/index.js +12 -7
- package/Backdrop/Backdrop.d.ts +1 -1
- package/Backdrop/Backdrop.js +160 -139
- package/Backdrop/index.js +12 -7
- package/Badge/Badge.d.ts +1 -1
- package/Badge/Badge.js +116 -96
- package/Badge/index.js +12 -7
- package/Banner/Banner.d.ts +1 -1
- package/Banner/Banner.js +126 -85
- package/Banner/index.js +12 -7
- package/BottomAppBar/BottomAppBar.d.ts +1 -1
- package/BottomAppBar/BottomAppBar.js +89 -60
- package/BottomAppBar/index.js +12 -7
- package/BottomSheet/BottomSheet.d.ts +1 -1
- package/BottomSheet/BottomSheet.js +66 -59
- package/BottomSheet/index.js +12 -7
- package/Box/Box.d.ts +1 -1
- package/Box/Box.js +43 -35
- package/Box/index.js +12 -7
- package/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/Breadcrumbs/Breadcrumbs.js +168 -144
- package/Breadcrumbs/index.js +12 -7
- package/BubbleChart/BubbleChart.d.ts +1 -1
- package/BubbleChart/BubbleChart.js +261 -132
- package/BubbleChart/index.js +12 -7
- package/BubbleChartItem/BubbleChartItem.d.ts +1 -1
- package/BubbleChartItem/BubbleChartItem.js +228 -161
- package/BubbleChartItem/index.js +12 -7
- package/Button/Button.d.ts +1 -1
- package/Button/Button.js +488 -467
- package/Button/index.js +12 -7
- package/Buttons/Buttons.d.ts +1 -1
- package/Buttons/Buttons.js +343 -294
- package/Buttons/index.js +12 -7
- package/Calendar/Calendar.d.ts +3 -3
- package/Calendar/Calendar.js +715 -452
- package/Calendar/index.js +12 -7
- package/CalendarAvailability/CalendarAvailability.d.ts +2 -2
- package/CalendarAvailability/CalendarAvailability.js +709 -388
- package/CalendarAvailability/index.js +12 -7
- package/CalendarMenu/CalendarMenu.d.ts +1 -1
- package/CalendarMenu/CalendarMenu.js +430 -303
- package/CalendarMenu/index.js +12 -7
- package/CalendarMonth/CalendarMonth.d.ts +5 -5
- package/CalendarMonth/CalendarMonth.js +537 -498
- package/CalendarMonth/index.js +12 -7
- package/CalendarViews/CalendarViews.d.ts +2 -2
- package/CalendarViews/CalendarViews.js +403 -254
- package/CalendarViews/index.js +12 -7
- package/CalendarWeek/CalendarWeek.d.ts +1 -1
- package/CalendarWeek/CalendarWeek.js +536 -395
- package/CalendarWeek/index.js +12 -7
- package/Card/Card.d.ts +1 -1
- package/Card/Card.js +133 -101
- package/Card/index.js +12 -7
- package/CardButton/CardButton.d.ts +1 -1
- package/CardButton/CardButton.js +78 -58
- package/CardButton/index.js +12 -7
- package/CardFooter/CardFooter.d.ts +1 -1
- package/CardFooter/CardFooter.js +58 -39
- package/CardFooter/index.js +12 -7
- package/CardHeader/CardHeader.d.ts +1 -1
- package/CardHeader/CardHeader.js +61 -44
- package/CardHeader/index.js +12 -7
- package/CardImage/CardImage.d.ts +1 -1
- package/CardImage/CardImage.js +80 -67
- package/CardImage/index.js +12 -7
- package/CardMain/CardMain.d.ts +1 -1
- package/CardMain/CardMain.js +53 -39
- package/CardMain/index.js +12 -7
- package/Carousel/Carousel.d.ts +4 -4
- package/Carousel/Carousel.js +1025 -913
- package/Carousel/index.js +12 -7
- package/Chart/Chart.d.ts +4 -4
- package/Chart/Chart.js +1325 -1174
- package/Chart/index.js +12 -7
- package/Checkbox/Checkbox.d.ts +1 -1
- package/Checkbox/Checkbox.js +339 -325
- package/Checkbox/index.js +12 -7
- package/Chip/Chip.d.ts +1 -1
- package/Chip/Chip.js +131 -102
- package/Chip/index.js +12 -7
- package/Chips/Chips.d.ts +1 -1
- package/Chips/Chips.js +121 -94
- package/Chips/index.js +12 -7
- package/ClickListener/ClickListener.d.ts +1 -1
- package/ClickListener/ClickListener.js +86 -89
- package/ClickListener/index.js +12 -7
- package/Clock/Clock.d.ts +5 -5
- package/Clock/Clock.js +470 -417
- package/Clock/index.js +12 -7
- package/ColorTextField/ColorTextField.d.ts +1 -1
- package/ColorTextField/ColorTextField.js +234 -171
- package/ColorTextField/index.js +12 -7
- package/ColumnChart/ColumnChart.d.ts +1 -1
- package/ColumnChart/ColumnChart.js +63 -46
- package/ColumnChart/index.js +12 -7
- package/ColumnChartItem/ColumnChartItem.d.ts +1 -1
- package/ColumnChartItem/ColumnChartItem.js +208 -149
- package/ColumnChartItem/index.js +12 -7
- package/Confirm/Confirm.d.ts +4 -4
- package/Confirm/Confirm.js +184 -129
- package/Confirm/Context.js +9 -7
- package/Confirm/index.js +32 -13
- package/Confirm/useConfirm.js +11 -10
- package/Container/Container.d.ts +1 -1
- package/Container/Container.js +154 -133
- package/Container/index.js +12 -7
- package/CookieBanner/CookieBanner.d.ts +1 -1
- package/CookieBanner/CookieBanner.js +142 -76
- package/CookieBanner/index.js +12 -7
- package/Countdown/Countdown.d.ts +1 -1
- package/Countdown/Countdown.js +403 -255
- package/Countdown/index.js +12 -7
- package/DatePicker/DatePicker.d.ts +1 -1
- package/DatePicker/DatePicker.js +802 -547
- package/DatePicker/index.js +12 -7
- package/DateRangePicker/DateRangePicker.d.ts +1 -1
- package/DateRangePicker/DateRangePicker.js +44 -37
- package/DateRangePicker/index.js +12 -7
- package/DateTimePicker/DateTimePicker.d.ts +2 -2
- package/DateTimePicker/DateTimePicker.js +672 -459
- package/DateTimePicker/index.js +12 -7
- package/DateTimeRangePicker/DateTimeRangePicker.d.ts +1 -1
- package/DateTimeRangePicker/DateTimeRangePicker.js +44 -37
- package/DateTimeRangePicker/index.js +12 -7
- package/Divider/Divider.d.ts +1 -1
- package/Divider/Divider.js +198 -185
- package/Divider/index.js +12 -7
- package/DonutChart/DonutChart.d.ts +1 -1
- package/DonutChart/DonutChart.js +49 -42
- package/DonutChart/index.js +12 -7
- package/DragAndDropList/DragAndDropList.d.ts +1 -1
- package/DragAndDropList/DragAndDropList.js +160 -156
- package/DragAndDropList/index.js +12 -7
- package/Drawing/Drawing.d.ts +2 -2
- package/Drawing/Drawing.js +850 -523
- package/Drawing/index.js +12 -7
- package/DropZone/DropZone.d.ts +1 -1
- package/DropZone/DropZone.js +239 -201
- package/DropZone/index.js +12 -7
- package/Emojis/Emojis.d.ts +3 -3
- package/Emojis/Emojis.js +409 -317
- package/Emojis/emojis_list.js +7279 -9250
- package/Emojis/index.js +19 -9
- package/Expand/Expand.d.ts +1 -1
- package/Expand/Expand.js +201 -149
- package/Expand/index.js +12 -7
- package/Fab/Fab.d.ts +1 -1
- package/Fab/Fab.js +46 -26
- package/Fab/index.js +12 -7
- package/Fade/Fade.d.ts +1 -1
- package/Fade/Fade.js +131 -101
- package/Fade/index.js +12 -7
- package/FileChoose/FileChoose.d.ts +2 -2
- package/FileChoose/FileChoose.js +218 -150
- package/FileChoose/index.js +12 -7
- package/Focus/Focus.d.ts +1 -1
- package/Focus/Focus.js +87 -88
- package/Focus/index.js +12 -7
- package/Form/Form.d.ts +1 -1
- package/Form/Form.js +194 -120
- package/Form/index.js +12 -7
- package/FormRow/FormRow.d.ts +1 -1
- package/FormRow/FormRow.js +123 -78
- package/FormRow/index.js +12 -7
- package/Forms/Forms.d.ts +1 -1
- package/Forms/Forms.js +55 -41
- package/Forms/index.js +12 -7
- package/Frame/Frame.d.ts +1 -1
- package/Frame/Frame.js +212 -150
- package/Frame/index.js +12 -7
- package/Grid/Grid.d.ts +2 -2
- package/Grid/Grid.js +231 -166
- package/Grid/index.js +12 -7
- package/Grow/Grow.d.ts +1 -1
- package/Grow/Grow.js +137 -109
- package/Grow/index.js +12 -7
- package/HTMLCanvas/HTMLCanvas.d.ts +2 -2
- package/HTMLCanvas/HTMLCanvas.js +752 -542
- package/HTMLCanvas/index.js +23 -21
- package/IFrame/IFrame.d.ts +1 -1
- package/IFrame/IFrame.js +122 -104
- package/IFrame/index.js +12 -7
- package/Icon/Icon.d.ts +1 -1
- package/Icon/Icon.js +112 -95
- package/Icon/index.js +23 -21
- package/IconButton/IconButton.d.ts +1 -1
- package/IconButton/IconButton.js +49 -37
- package/IconButton/index.js +12 -7
- package/Image/Image.d.ts +1 -1
- package/Image/Image.js +285 -252
- package/Image/index.js +12 -7
- package/ImageCrop/ImageCrop.d.ts +2 -2
- package/ImageCrop/ImageCrop.js +1073 -1048
- package/ImageCrop/index.js +12 -7
- package/ImageEdit/ImageEdit.d.ts +2 -2
- package/ImageEdit/ImageEdit.js +1088 -783
- package/ImageEdit/index.js +12 -7
- package/ImageGallery/ImageGallery.d.ts +1 -1
- package/ImageGallery/ImageGallery.js +518 -473
- package/ImageGallery/index.js +12 -7
- package/ImageList/ImageList.d.ts +1 -1
- package/ImageList/ImageList.js +136 -129
- package/ImageList/index.js +12 -7
- package/ImageListItem/ImageListItem.d.ts +1 -1
- package/ImageListItem/ImageListItem.js +101 -87
- package/ImageListItem/index.js +12 -7
- package/ImageListItemBox/ImageListItemBox.d.ts +1 -1
- package/ImageListItemBox/ImageListItemBox.js +61 -50
- package/ImageListItemBox/index.js +12 -7
- package/Info/Info.d.ts +1 -1
- package/Info/Info.js +99 -63
- package/Info/index.js +12 -7
- package/Interaction/Interaction.d.ts +2 -2
- package/Interaction/Interaction.js +405 -345
- package/Interaction/index.js +12 -7
- package/Keyframes/Context.js +9 -7
- package/Keyframes/Keyframes.d.ts +3 -3
- package/Keyframes/Keyframes.js +189 -174
- package/Keyframes/index.js +41 -25
- package/Keyframes/useKeyframes.js +11 -10
- package/Label/Label.d.ts +1 -1
- package/Label/Label.js +177 -151
- package/Label/index.js +12 -7
- package/Labels/Labels.d.ts +1 -1
- package/Labels/Labels.js +126 -98
- package/Labels/index.js +12 -7
- package/Line/Line.d.ts +6 -6
- package/Line/Line.js +296 -174
- package/Line/index.js +12 -7
- package/LineChart/LineChart.d.ts +1 -1
- package/LineChart/LineChart.js +57 -40
- package/LineChart/index.js +12 -7
- package/LineChartItem/LineChartItem.d.ts +1 -1
- package/LineChartItem/LineChartItem.js +239 -177
- package/LineChartItem/index.js +12 -7
- package/LinearMeter/LinearMeter.d.ts +1 -1
- package/LinearMeter/LinearMeter.js +453 -377
- package/LinearMeter/index.js +12 -7
- package/LinearProgress/LinearProgress.d.ts +1 -1
- package/LinearProgress/LinearProgress.js +324 -255
- package/LinearProgress/index.js +12 -7
- package/Link/Link.d.ts +1 -1
- package/Link/Link.js +182 -127
- package/Link/index.js +12 -7
- package/Links/Links.d.ts +2 -2
- package/Links/Links.js +277 -156
- package/Links/index.js +12 -7
- package/List/List.d.ts +1 -1
- package/List/List.js +148 -113
- package/List/index.js +12 -7
- package/ListItem/ListItem.d.ts +1 -1
- package/ListItem/ListItem.js +388 -362
- package/ListItem/index.js +12 -7
- package/ListSubheader/ListSubheader.d.ts +1 -1
- package/ListSubheader/ListSubheader.js +52 -44
- package/ListSubheader/index.js +12 -7
- package/MainProgress/Context.js +9 -7
- package/MainProgress/MainProgress.d.ts +3 -3
- package/MainProgress/MainProgress.js +193 -161
- package/MainProgress/index.js +32 -13
- package/MainProgress/useMainProgress.js +11 -10
- package/Markdown/Markdown.d.ts +1 -1
- package/Markdown/Markdown.js +676 -704
- package/Markdown/index.js +12 -7
- package/Masonry/Masonry.d.ts +1 -1
- package/Masonry/Masonry.js +207 -181
- package/Masonry/index.js +12 -7
- package/Medias/Medias.d.ts +3 -3
- package/Medias/Medias.js +436 -398
- package/Medias/index.js +12 -7
- package/Menu/Menu.d.ts +1 -1
- package/Menu/Menu.js +278 -243
- package/Menu/index.js +12 -7
- package/MenuDesktop/MenuDesktop.d.ts +3 -3
- package/MenuDesktop/MenuDesktop.js +496 -419
- package/MenuDesktop/index.js +12 -7
- package/MenuItem/MenuItem.d.ts +1 -1
- package/MenuItem/MenuItem.js +286 -231
- package/MenuItem/index.js +12 -7
- package/Meta/Meta.d.ts +1 -1
- package/Meta/Meta.js +78 -54
- package/Meta/index.js +12 -7
- package/Modal/Modal.d.ts +1 -1
- package/Modal/Modal.js +333 -272
- package/Modal/index.js +12 -7
- package/ModalFooter/ModalFooter.d.ts +1 -1
- package/ModalFooter/ModalFooter.js +50 -39
- package/ModalFooter/index.js +12 -7
- package/ModalHeader/ModalHeader.d.ts +1 -1
- package/ModalHeader/ModalHeader.js +51 -39
- package/ModalHeader/index.js +12 -7
- package/ModalIcon/ModalIcon.d.ts +1 -1
- package/ModalIcon/ModalIcon.js +29 -23
- package/ModalIcon/index.js +12 -7
- package/ModalMain/ModalMain.d.ts +1 -1
- package/ModalMain/ModalMain.js +50 -41
- package/ModalMain/index.js +12 -7
- package/ModalText/ModalText.d.ts +1 -1
- package/ModalText/ModalText.js +47 -37
- package/ModalText/index.js +12 -7
- package/ModalTitle/ModalTitle.d.ts +1 -1
- package/ModalTitle/ModalTitle.js +47 -37
- package/ModalTitle/index.js +12 -7
- package/MoreOptions/MoreOptions.d.ts +1 -1
- package/MoreOptions/MoreOptions.js +72 -52
- package/MoreOptions/index.js +12 -7
- package/Move/Move.d.ts +1 -1
- package/Move/Move.js +166 -141
- package/Move/index.js +12 -7
- package/NavigationBar/NavigationBar.d.ts +2 -2
- package/NavigationBar/NavigationBar.js +133 -109
- package/NavigationBar/index.js +12 -7
- package/NavigationDrawer/NavigationDrawer.d.ts +1 -1
- package/NavigationDrawer/NavigationDrawer.js +241 -211
- package/NavigationDrawer/index.js +12 -7
- package/NavigationItem/NavigationItem.d.ts +2 -2
- package/NavigationItem/NavigationItem.js +293 -262
- package/NavigationItem/index.js +12 -7
- package/NavigationRail/NavigationRail.d.ts +1 -1
- package/NavigationRail/NavigationRail.js +187 -150
- package/NavigationRail/index.js +12 -7
- package/NotFound/NotFound.d.ts +1 -1
- package/NotFound/NotFound.js +89 -66
- package/NotFound/index.js +12 -7
- package/NumericTextField/NumericTextField.d.ts +1 -1
- package/NumericTextField/NumericTextField.js +217 -212
- package/NumericTextField/index.js +12 -7
- package/Page/Page.d.ts +2 -2
- package/Page/Page.js +131 -67
- package/Page/index.js +12 -7
- package/PageTransition/PageTransition.d.ts +1 -1
- package/PageTransition/PageTransition.js +112 -102
- package/PageTransition/index.js +12 -7
- package/Pagination/Pagination.d.ts +1 -1
- package/Pagination/Pagination.js +153 -98
- package/Pagination/index.js +12 -7
- package/PaginationItem/PaginationItem.d.ts +1 -1
- package/PaginationItem/PaginationItem.js +85 -65
- package/PaginationItem/index.js +12 -7
- package/Parallax/Parallax.d.ts +2 -2
- package/Parallax/Parallax.js +138 -145
- package/Parallax/index.js +12 -7
- package/Path/Path.d.ts +1 -1
- package/Path/Path.js +40 -35
- package/Path/index.js +12 -7
- package/PieChart/PieChart.d.ts +1 -1
- package/PieChart/PieChart.js +382 -267
- package/PieChart/index.js +12 -7
- package/Placeholder/Placeholder.d.ts +1 -1
- package/Placeholder/Placeholder.js +125 -117
- package/Placeholder/index.js +12 -7
- package/Portal/Portal.d.ts +1 -1
- package/Portal/Portal.js +37 -38
- package/Portal/index.js +12 -7
- package/Properties/Properties.d.ts +2 -2
- package/Properties/Properties.js +85 -64
- package/Properties/index.js +12 -7
- package/Property/Property.d.ts +1 -1
- package/Property/Property.js +120 -108
- package/Property/index.js +12 -7
- package/Radio/Radio.d.ts +1 -1
- package/Radio/Radio.js +211 -181
- package/Radio/index.js +12 -7
- package/Radios/Radios.d.ts +1 -1
- package/Radios/Radios.js +124 -92
- package/Radios/index.js +12 -7
- package/Rating/Rating.d.ts +1 -1
- package/Rating/Rating.js +353 -360
- package/Rating/index.js +12 -7
- package/Reset/Reset.d.ts +1 -1
- package/Reset/Reset.js +19 -24
- package/Reset/index.js +12 -7
- package/Reveal/Reveal.d.ts +1 -1
- package/Reveal/Reveal.js +98 -89
- package/Reveal/index.js +12 -7
- package/RichTextEditor/RichTextEditor.d.ts +1 -1
- package/RichTextEditor/RichTextEditor.js +1764 -972
- package/RichTextEditor/index.js +12 -7
- package/RoundMeter/RoundMeter.d.ts +1 -1
- package/RoundMeter/RoundMeter.js +629 -537
- package/RoundMeter/index.js +12 -7
- package/RoundProgress/RoundProgress.d.ts +1 -1
- package/RoundProgress/RoundProgress.js +233 -174
- package/RoundProgress/index.js +12 -7
- package/ScatterChart/ScatterChart.d.ts +1 -1
- package/ScatterChart/ScatterChart.js +53 -40
- package/ScatterChart/index.js +12 -7
- package/ScatterChartItem/ScatterChartItem.d.ts +1 -1
- package/ScatterChartItem/ScatterChartItem.js +214 -153
- package/ScatterChartItem/index.js +12 -7
- package/ScreenCapture/ScreenCapture.d.ts +2 -2
- package/ScreenCapture/ScreenCapture.js +427 -335
- package/ScreenCapture/index.js +12 -7
- package/Section/Section.d.ts +2 -2
- package/Section/Section.js +380 -319
- package/Section/index.js +12 -7
- package/SectionAction/SectionAction.d.ts +1 -1
- package/SectionAction/SectionAction.js +72 -61
- package/SectionAction/index.js +12 -7
- package/SectionBoxes/SectionBoxes.d.ts +2 -2
- package/SectionBoxes/SectionBoxes.js +240 -208
- package/SectionBoxes/index.js +12 -7
- package/SectionCards/SectionCards.d.ts +2 -2
- package/SectionCards/SectionCards.js +256 -217
- package/SectionCards/index.js +12 -7
- package/SectionCarousel/SectionCarousel.d.ts +2 -2
- package/SectionCarousel/SectionCarousel.js +284 -242
- package/SectionCarousel/index.js +12 -7
- package/SectionContact/SectionContact.d.ts +1 -1
- package/SectionContact/SectionContact.js +174 -116
- package/SectionContact/index.js +12 -7
- package/SectionImageGallery/SectionImageGallery.d.ts +1 -1
- package/SectionImageGallery/SectionImageGallery.js +64 -51
- package/SectionImageGallery/index.js +12 -7
- package/SectionLogos/SectionLogos.d.ts +1 -1
- package/SectionLogos/SectionLogos.js +123 -109
- package/SectionLogos/index.js +12 -7
- package/SectionMedia/SectionMedia.d.ts +1 -1
- package/SectionMedia/SectionMedia.js +170 -152
- package/SectionMedia/index.js +12 -7
- package/SectionReviews/SectionReviews.d.ts +2 -2
- package/SectionReviews/SectionReviews.js +170 -129
- package/SectionReviews/index.js +12 -7
- package/SectionTextMedia/SectionTextMedia.d.ts +1 -1
- package/SectionTextMedia/SectionTextMedia.js +187 -142
- package/SectionTextMedia/index.js +12 -7
- package/SectionTimeline/SectionTimeline.d.ts +2 -2
- package/SectionTimeline/SectionTimeline.js +126 -95
- package/SectionTimeline/index.js +12 -7
- package/SectionWatch/SectionWatch.d.ts +1 -1
- package/SectionWatch/SectionWatch.js +65 -53
- package/SectionWatch/index.js +12 -7
- package/Select/Select.d.ts +1 -1
- package/Select/Select.js +517 -406
- package/Select/index.js +12 -7
- package/Share/Share.d.ts +1 -1
- package/Share/Share.js +458 -319
- package/Share/index.js +12 -7
- package/Slide/Slide.d.ts +1 -1
- package/Slide/Slide.js +184 -140
- package/Slide/index.js +12 -7
- package/Slider/Slider.d.ts +2 -2
- package/Slider/Slider.js +927 -837
- package/Slider/index.js +12 -7
- package/SmartTextField/SmartTextField.d.ts +1 -1
- package/SmartTextField/SmartTextField.js +1406 -1014
- package/SmartTextField/index.js +12 -7
- package/Snackbar/Snackbar.d.ts +1 -1
- package/Snackbar/Snackbar.js +227 -185
- package/Snackbar/index.js +12 -7
- package/Snackbars/Context.d.ts +1 -1
- package/Snackbars/Context.js +9 -7
- package/Snackbars/Snackbars.d.ts +2 -2
- package/Snackbars/Snackbars.js +234 -210
- package/Snackbars/index.js +32 -13
- package/Snackbars/useSnackbars.js +11 -10
- package/Space/Space.d.ts +1 -1
- package/Space/Space.js +1683 -968
- package/Space/index.js +23 -21
- package/SpeechToText/SpeechToText.d.ts +1 -1
- package/SpeechToText/SpeechToText.js +207 -172
- package/SpeechToText/index.js +12 -7
- package/SpeedDial/SpeedDial.d.ts +1 -1
- package/SpeedDial/SpeedDial.js +434 -398
- package/SpeedDial/index.js +12 -7
- package/SpeedDialItem/SpeedDialItem.d.ts +1 -1
- package/SpeedDialItem/SpeedDialItem.js +89 -63
- package/SpeedDialItem/index.js +12 -7
- package/SpyScroll/SpyScroll.d.ts +1 -1
- package/SpyScroll/SpyScroll.js +154 -142
- package/SpyScroll/index.js +12 -7
- package/Step/Step.d.ts +1 -1
- package/Step/Step.js +181 -127
- package/Step/index.js +12 -7
- package/Stepper/Stepper.d.ts +1 -1
- package/Stepper/Stepper.js +159 -139
- package/Stepper/index.js +12 -7
- package/Surface/Surface.d.ts +1 -1
- package/Surface/Surface.js +760 -798
- package/Surface/index.js +12 -7
- package/Switch/Switch.d.ts +1 -1
- package/Switch/Switch.js +688 -532
- package/Switch/index.js +12 -7
- package/Tab/Tab.d.ts +1 -1
- package/Tab/Tab.js +185 -150
- package/Tab/index.js +12 -7
- package/Table/Table.d.ts +1 -1
- package/Table/Table.js +100 -77
- package/Table/index.js +12 -7
- package/TableBody/TableBody.d.ts +1 -1
- package/TableBody/TableBody.js +76 -63
- package/TableBody/index.js +12 -7
- package/TableCell/TableCell.d.ts +2 -2
- package/TableCell/TableCell.js +258 -220
- package/TableCell/index.js +12 -7
- package/TableFooter/TableFooter.d.ts +1 -1
- package/TableFooter/TableFooter.js +60 -48
- package/TableFooter/index.js +12 -7
- package/TableHead/TableHead.d.ts +1 -1
- package/TableHead/TableHead.js +139 -120
- package/TableHead/index.js +12 -7
- package/TableHeader/TableHeader.d.ts +1 -1
- package/TableHeader/TableHeader.js +65 -50
- package/TableHeader/index.js +12 -7
- package/TablePagination/TablePagination.d.ts +1 -1
- package/TablePagination/TablePagination.js +171 -98
- package/TablePagination/index.js +12 -7
- package/TableRow/TableRow.d.ts +1 -1
- package/TableRow/TableRow.js +77 -64
- package/TableRow/index.js +12 -7
- package/Tabs/Tabs.d.ts +1 -1
- package/Tabs/Tabs.js +425 -377
- package/Tabs/index.js +12 -7
- package/Text/Text.d.ts +1 -1
- package/Text/Text.js +131 -113
- package/Text/index.js +12 -7
- package/TextField/TextField.d.ts +1 -1
- package/TextField/TextField.js +940 -879
- package/TextField/index.js +12 -7
- package/TextToSpeech/TextToSpeech.d.ts +1 -1
- package/TextToSpeech/TextToSpeech.js +176 -153
- package/TextToSpeech/index.js +12 -7
- package/TimePicker/TimePicker.d.ts +3 -3
- package/TimePicker/TimePicker.js +985 -718
- package/TimePicker/index.js +12 -7
- package/TimeRangePicker/TimeRangePicker.d.ts +1 -1
- package/TimeRangePicker/TimeRangePicker.js +44 -37
- package/TimeRangePicker/index.js +12 -7
- package/Timeline/Timeline.d.ts +1 -1
- package/Timeline/Timeline.js +54 -42
- package/Timeline/index.js +12 -7
- package/TimelineItem/TimelineItem.d.ts +1 -1
- package/TimelineItem/TimelineItem.js +144 -147
- package/TimelineItem/index.js +12 -7
- package/Timer/Timer.d.ts +1 -1
- package/Timer/Timer.js +321 -204
- package/Timer/index.js +12 -7
- package/ToggleButton/ToggleButton.d.ts +1 -1
- package/ToggleButton/ToggleButton.js +67 -58
- package/ToggleButton/index.js +12 -7
- package/ToggleButtons/ToggleButtons.d.ts +1 -1
- package/ToggleButtons/ToggleButtons.js +46 -37
- package/ToggleButtons/index.js +12 -7
- package/Tooltip/Tooltip.d.ts +1 -1
- package/Tooltip/Tooltip.js +489 -454
- package/Tooltip/index.js +12 -7
- package/TopAppBar/TopAppBar.d.ts +1 -1
- package/TopAppBar/TopAppBar.js +237 -197
- package/TopAppBar/index.js +12 -7
- package/Transition/Context.js +9 -7
- package/Transition/Transition.d.ts +3 -3
- package/Transition/Transition.js +321 -339
- package/Transition/index.js +41 -25
- package/Transition/useTransition.js +11 -10
- package/Transitions/Transitions.d.ts +2 -2
- package/Transitions/Transitions.js +215 -179
- package/Transitions/index.js +12 -7
- package/Tree/Tree.d.ts +1 -1
- package/Tree/Tree.js +375 -312
- package/Tree/index.js +12 -7
- package/Type/Type.d.ts +1 -1
- package/Type/Type.js +251 -152
- package/Type/index.js +12 -7
- package/VideoPlayer/VideoPlayer.d.ts +1 -1
- package/VideoPlayer/VideoPlayer.js +866 -656
- package/VideoPlayer/index.js +12 -7
- package/ViewSplit/ViewSplit.d.ts +1 -1
- package/ViewSplit/ViewSplit.js +413 -387
- package/ViewSplit/index.js +12 -7
- package/Watch/Watch.d.ts +1 -1
- package/Watch/Watch.js +436 -290
- package/Watch/index.js +12 -7
- package/Weather/Weather.d.ts +4 -4
- package/Weather/Weather.js +294 -247
- package/Weather/index.js +12 -7
- package/Whiteboard/Whiteboard.d.ts +5 -5
- package/Whiteboard/Whiteboard.js +1392 -1292
- package/Whiteboard/index.js +12 -7
- package/Widgets/Context.js +9 -7
- package/Widgets/Widgets.d.ts +2 -2
- package/Widgets/Widgets.js +220 -168
- package/Widgets/index.js +32 -13
- package/Widgets/useWidgets.js +11 -10
- package/WindowSplit/WindowSplit.d.ts +1 -1
- package/WindowSplit/WindowSplit.js +381 -336
- package/WindowSplit/index.js +12 -7
- package/Zoom/Zoom.d.ts +1 -1
- package/Zoom/Zoom.js +126 -99
- package/Zoom/index.js +12 -7
- package/esm/Append/Append.js +6 -8
- package/esm/AutoComplete/AutoComplete.js +8 -20
- package/esm/Breadcrumbs/Breadcrumbs.js +1 -3
- package/esm/Buttons/Buttons.js +8 -33
- package/esm/Calendar/Calendar.js +74 -80
- package/esm/CalendarAvailability/CalendarAvailability.js +1 -2
- package/esm/CalendarMenu/CalendarMenu.js +2 -2
- package/esm/CalendarMonth/CalendarMonth.js +65 -68
- package/esm/CalendarWeek/CalendarWeek.js +3 -7
- package/esm/Carousel/Carousel.js +4 -12
- package/esm/Chart/Chart.js +19 -25
- package/esm/Clock/Clock.js +5 -8
- package/esm/Confirm/Confirm.js +1 -2
- package/esm/DatePicker/DatePicker.js +8 -13
- package/esm/DateTimePicker/DateTimePicker.js +6 -9
- package/esm/Drawing/Drawing.js +1 -6
- package/esm/Expand/Expand.js +1 -2
- package/esm/Fade/Fade.js +1 -2
- package/esm/Focus/Focus.js +1 -2
- package/esm/Grow/Grow.js +1 -2
- package/esm/HTMLCanvas/HTMLCanvas.js +2 -5
- package/esm/ImageCrop/ImageCrop.js +2 -5
- package/esm/ImageEdit/ImageEdit.js +5 -12
- package/esm/ImageGallery/ImageGallery.js +1 -2
- package/esm/Interaction/Interaction.js +1 -2
- package/esm/Keyframes/Keyframes.js +1 -2
- package/esm/LinearMeter/LinearMeter.js +77 -80
- package/esm/Markdown/Markdown.js +41 -144
- package/esm/MenuDesktop/MenuDesktop.js +5 -6
- package/esm/Rating/Rating.js +2 -4
- package/esm/RichTextEditor/RichTextEditor.js +36 -50
- package/esm/RoundMeter/RoundMeter.js +70 -73
- package/esm/ScreenCapture/ScreenCapture.js +2 -5
- package/esm/Select/Select.js +5 -9
- package/esm/Share/Share.js +4 -5
- package/esm/Slide/Slide.js +2 -4
- package/esm/Slider/Slider.js +3 -6
- package/esm/SmartTextField/SmartTextField.js +2 -4
- package/esm/Snackbar/Snackbar.js +1 -2
- package/esm/Snackbars/Snackbars.js +3 -3
- package/esm/Space/Space.js +3 -6
- package/esm/Switch/Switch.js +1 -2
- package/esm/Tabs/Tabs.js +1 -2
- package/esm/TimePicker/TimePicker.js +27 -38
- package/esm/Timer/Timer.js +3 -4
- package/esm/Tooltip/Tooltip.js +1 -2
- package/esm/ViewSplit/ViewSplit.js +1 -2
- package/esm/Watch/Watch.js +4 -5
- package/esm/Weather/Weather.js +14 -17
- package/esm/Whiteboard/Whiteboard.js +1 -4
- package/esm/WindowSplit/WindowSplit.js +1 -2
- package/esm/Zoom/Zoom.js +1 -2
- package/esm/index.js +1 -1
- package/esm/useForm/useForm.js +1 -4
- package/esm/useLocation/useLocation.js +1 -2
- package/esm/useSwipe/useSwipe.js +1 -2
- package/esm/utils.js +3 -11
- package/index.js +4052 -660
- package/package.json +3 -3
- package/types.d.ts +27 -27
- package/types.js +4 -1
- package/useForm/index.js +25 -11
- package/useForm/useForm.d.ts +2 -2
- package/useForm/useForm.js +203 -174
- package/useForm/validate.d.ts +12 -12
- package/useForm/validate.js +215 -203
- package/useLocation/index.js +12 -7
- package/useLocation/useLocation.d.ts +1 -1
- package/useLocation/useLocation.js +54 -49
- package/useMediaQuery/index.js +12 -7
- package/useMediaQuery/useMediaQuery.d.ts +1 -1
- package/useMediaQuery/useMediaQuery.js +44 -43
- package/useQuery/index.js +12 -7
- package/useQuery/useQuery.js +14 -10
- package/useScroll/index.js +12 -7
- package/useScroll/useScroll.d.ts +2 -2
- package/useScroll/useScroll.js +61 -56
- package/useSubscription/index.js +12 -7
- package/useSubscription/useSubscription.js +35 -35
- package/useSwipe/index.js +12 -7
- package/useSwipe/useSwipe.d.ts +2 -2
- package/useSwipe/useSwipe.js +157 -131
- package/useVisible/index.js +12 -7
- package/useVisible/useVisible.d.ts +2 -2
- package/useVisible/useVisible.js +86 -76
- package/utils.js +1224 -1362
|
@@ -1,671 +1,881 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
var _react = _interopRequireDefault(require("react"));
|
|
12
|
+
var _utils = require("@onesy/utils");
|
|
13
|
+
var _styleReact = require("@onesy/style-react");
|
|
14
|
+
var _date = require("@onesy/date");
|
|
15
|
+
var _IconMaterialPlayArrowW = _interopRequireDefault(require("@onesy/icons-material-rounded-react/IconMaterialPlayArrowW100"));
|
|
16
|
+
var _IconMaterialPauseW = _interopRequireDefault(require("@onesy/icons-material-rounded-react/IconMaterialPauseW100"));
|
|
17
|
+
var _IconMaterialForwardMediaW = _interopRequireDefault(require("@onesy/icons-material-rounded-react/IconMaterialForwardMediaW100"));
|
|
18
|
+
var _IconMaterialVolumeDownAltW = _interopRequireDefault(require("@onesy/icons-material-rounded-react/IconMaterialVolumeDownAltW100"));
|
|
19
|
+
var _IconMaterialVolumeOffW = _interopRequireDefault(require("@onesy/icons-material-rounded-react/IconMaterialVolumeOffW100"));
|
|
20
|
+
var _IconMaterialFullscreenW = _interopRequireDefault(require("@onesy/icons-material-rounded-react/IconMaterialFullscreenW100"));
|
|
21
|
+
var _IconMaterialFullscreenExitW = _interopRequireDefault(require("@onesy/icons-material-rounded-react/IconMaterialFullscreenExitW100"));
|
|
22
|
+
var _IconMaterialSettingsW = _interopRequireDefault(require("@onesy/icons-material-rounded-react/IconMaterialSettingsW100"));
|
|
23
|
+
var _IconMaterialTuneW = _interopRequireDefault(require("@onesy/icons-material-rounded-react/IconMaterialTuneW100"));
|
|
24
|
+
var _IconMaterialSlowMotionVideoW = _interopRequireDefault(require("@onesy/icons-material-rounded-react/IconMaterialSlowMotionVideoW100"));
|
|
25
|
+
var _IconMaterialPictureInPictureAltW = _interopRequireDefault(require("@onesy/icons-material-rounded-react/IconMaterialPictureInPictureAltW100"));
|
|
26
|
+
var _IconMaterialArrowBackIosW = _interopRequireDefault(require("@onesy/icons-material-rounded-react/IconMaterialArrowBackIosW100"));
|
|
27
|
+
var _Line = _interopRequireDefault(require("../Line"));
|
|
28
|
+
var _Surface = _interopRequireDefault(require("../Surface"));
|
|
29
|
+
var _Slider = _interopRequireDefault(require("../Slider"));
|
|
30
|
+
var _IconButton = _interopRequireDefault(require("../IconButton"));
|
|
31
|
+
var _Expand = _interopRequireDefault(require("../Expand"));
|
|
32
|
+
var _Type = _interopRequireDefault(require("../Type"));
|
|
33
|
+
var _Menu = _interopRequireDefault(require("../Menu"));
|
|
34
|
+
var _ListItem = _interopRequireDefault(require("../ListItem"));
|
|
35
|
+
var _utils2 = require("../utils");
|
|
36
|
+
const _excluded = ["name", "src", "meta", "versions", "thumbnails", "mime", "duration", "tonal", "color", "size", "start", "end", "startControls", "endControls", "startButtons", "endButtons", "startButtonsEnd", "endButtonsEnd", "forward", "backward", "settings", "quality", "playbackSpeed", "pictureInPicture", "fullScreen", "startMediaSessionOnPlay", "disabled", "IconPlay", "IconPause", "IconForward", "IconBackward", "IconVolume", "IconVolumeMuted", "IconBack", "IconSettings", "IconQuality", "IconPlaybackSpeed", "IconPictureInPicture", "IconFullScreen", "IconFullScreenExit", "PlayButtonProps", "ForwardButtonProps", "BackwardButtonProps", "VolumeButtonProps", "IconButtonProps", "TypeProps", "TimelineProps", "VolumeProps", "SliderProps", "SettingsButtonProps", "SettingsMenuProps", "QualityButtonProps", "PictureInPictureButtonProps", "FullScreenButtonProps", "className", "Component"];
|
|
37
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
38
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
39
|
+
const useStyle = (0, _styleReact.style)(theme => ({
|
|
40
|
+
root: {
|
|
41
|
+
position: 'relative'
|
|
42
|
+
},
|
|
43
|
+
wrapper: {
|
|
44
|
+
position: 'relative',
|
|
45
|
+
borderRadius: 'inherit'
|
|
46
|
+
},
|
|
47
|
+
wrapperFullScreen: {
|
|
48
|
+
height: '100vh',
|
|
49
|
+
width: '100vw'
|
|
50
|
+
},
|
|
51
|
+
video: {
|
|
52
|
+
background: 'black',
|
|
53
|
+
flex: '1 1 auto',
|
|
54
|
+
borderRadius: 'inherit',
|
|
55
|
+
cursor: 'pointer',
|
|
56
|
+
userSelect: 'none'
|
|
57
|
+
},
|
|
58
|
+
size_small: {
|
|
59
|
+
borderRadius: theme.methods.shape.radius.value(0.5, 'px')
|
|
60
|
+
},
|
|
61
|
+
size_regular: {
|
|
62
|
+
borderRadius: theme.methods.shape.radius.value(1.5, 'px')
|
|
63
|
+
},
|
|
64
|
+
size_large: {
|
|
65
|
+
borderRadius: theme.methods.shape.radius.value(2, 'px')
|
|
66
|
+
},
|
|
67
|
+
fullScreen: {
|
|
68
|
+
borderRadius: '0px'
|
|
69
|
+
},
|
|
70
|
+
controls: {
|
|
71
|
+
position: 'absolute',
|
|
72
|
+
bottom: '0px',
|
|
73
|
+
left: '0px',
|
|
74
|
+
width: '100%',
|
|
75
|
+
borderRadius: 'inherit',
|
|
76
|
+
transition: theme.methods.transitions.make('opacity'),
|
|
77
|
+
'&.onesy-Surface-root': {
|
|
78
|
+
background: 'linear-gradient(0deg, rgb(0, 0, 0, 0.24), transparent)'
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
controlsHiddden: {
|
|
82
|
+
opacity: 0,
|
|
83
|
+
pointerEvents: 'none'
|
|
84
|
+
},
|
|
85
|
+
controlsFullScreen: {},
|
|
86
|
+
controls_size_small: {
|
|
87
|
+
padding: `${theme.methods.space.value(0.75, 'px')} ${theme.methods.space.value(1, 'px')} ${theme.methods.space.value(0.5, 'px')}`
|
|
88
|
+
},
|
|
89
|
+
controls_size_regular: {
|
|
90
|
+
padding: `${theme.methods.space.value(1.5, 'px')} ${theme.methods.space.value(1.5, 'px')} ${theme.methods.space.value(1, 'px')}`
|
|
91
|
+
},
|
|
92
|
+
controls_size_large: {
|
|
93
|
+
padding: `${theme.methods.space.value(2.25, 'px')} ${theme.methods.space.value(2, 'px')} ${theme.methods.space.value(1.5, 'px')}`
|
|
94
|
+
},
|
|
95
|
+
wrapperTimeline: {
|
|
96
|
+
padding: `0 ${theme.methods.space.value(1.5, 'px')}`
|
|
97
|
+
},
|
|
98
|
+
timeline: {
|
|
99
|
+
'&.onesy-Slider-root': {
|
|
100
|
+
height: '20px !important',
|
|
101
|
+
width: '100% !important',
|
|
102
|
+
margin: 'unset !important',
|
|
103
|
+
maxWidth: 'unset !important'
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
volume: {
|
|
107
|
+
flex: '1 1 auto',
|
|
108
|
+
'&.onesy-Slider-root': {
|
|
109
|
+
height: '24px !important',
|
|
110
|
+
width: '100vw !important',
|
|
111
|
+
maxWidth: '54px !important',
|
|
112
|
+
margin: 'unset !important',
|
|
113
|
+
borderRadius: '0px',
|
|
114
|
+
'& .onesy-Slider-rail': {
|
|
72
115
|
borderRadius: '0px'
|
|
116
|
+
},
|
|
117
|
+
'& .onesy-Slider-track': {
|
|
118
|
+
borderRadius: '0px'
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
volumeExpand: {
|
|
123
|
+
display: 'flex',
|
|
124
|
+
alignItems: 'center',
|
|
125
|
+
height: '100%'
|
|
126
|
+
},
|
|
127
|
+
time: {
|
|
128
|
+
cursor: 'default',
|
|
129
|
+
userSelect: 'none'
|
|
130
|
+
},
|
|
131
|
+
menuSettings: {
|
|
132
|
+
maxHeight: 194,
|
|
133
|
+
overflowY: 'auto'
|
|
134
|
+
},
|
|
135
|
+
endControls: {
|
|
136
|
+
position: 'relative'
|
|
137
|
+
},
|
|
138
|
+
placeholder: {},
|
|
139
|
+
bottomControls: {
|
|
140
|
+
scrollbarWidth: 'none',
|
|
141
|
+
overflow: 'auto hidden',
|
|
142
|
+
'& > *': {
|
|
143
|
+
flex: '0 0 auto'
|
|
73
144
|
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
bottom: '0px',
|
|
77
|
-
left: '0px',
|
|
78
|
-
width: '100%',
|
|
79
|
-
borderRadius: 'inherit',
|
|
80
|
-
transition: theme.methods.transitions.make('opacity'),
|
|
81
|
-
'&.onesy-Surface-root': {
|
|
82
|
-
background: 'linear-gradient(0deg, rgb(0, 0, 0, 0.24), transparent)'
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
controlsHiddden: {
|
|
86
|
-
opacity: 0,
|
|
87
|
-
pointerEvents: 'none'
|
|
88
|
-
},
|
|
89
|
-
controlsFullScreen: {},
|
|
90
|
-
controls_size_small: {
|
|
91
|
-
padding: `${theme.methods.space.value(0.75, 'px')} ${theme.methods.space.value(1, 'px')} ${theme.methods.space.value(0.5, 'px')}`
|
|
92
|
-
},
|
|
93
|
-
controls_size_regular: {
|
|
94
|
-
padding: `${theme.methods.space.value(1.5, 'px')} ${theme.methods.space.value(1.5, 'px')} ${theme.methods.space.value(1, 'px')}`
|
|
95
|
-
},
|
|
96
|
-
controls_size_large: {
|
|
97
|
-
padding: `${theme.methods.space.value(2.25, 'px')} ${theme.methods.space.value(2, 'px')} ${theme.methods.space.value(1.5, 'px')}`
|
|
98
|
-
},
|
|
99
|
-
wrapperTimeline: {
|
|
100
|
-
padding: `0 ${theme.methods.space.value(1.5, 'px')}`
|
|
101
|
-
},
|
|
102
|
-
timeline: {
|
|
103
|
-
'&.onesy-Slider-root': {
|
|
104
|
-
height: '20px !important',
|
|
105
|
-
width: '100% !important',
|
|
106
|
-
margin: 'unset !important',
|
|
107
|
-
maxWidth: 'unset !important'
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
volume: {
|
|
111
|
-
flex: '1 1 auto',
|
|
112
|
-
'&.onesy-Slider-root': {
|
|
113
|
-
height: '24px !important',
|
|
114
|
-
width: '100vw !important',
|
|
115
|
-
maxWidth: '54px !important',
|
|
116
|
-
margin: 'unset !important',
|
|
117
|
-
borderRadius: '0px',
|
|
118
|
-
'& .onesy-Slider-rail': {
|
|
119
|
-
borderRadius: '0px'
|
|
120
|
-
},
|
|
121
|
-
'& .onesy-Slider-track': {
|
|
122
|
-
borderRadius: '0px'
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
volumeExpand: {
|
|
127
|
-
display: 'flex',
|
|
128
|
-
alignItems: 'center',
|
|
129
|
-
height: '100%'
|
|
130
|
-
},
|
|
131
|
-
time: {
|
|
132
|
-
cursor: 'default',
|
|
133
|
-
userSelect: 'none'
|
|
134
|
-
},
|
|
135
|
-
menuSettings: {
|
|
136
|
-
maxHeight: 194,
|
|
137
|
-
overflowY: 'auto'
|
|
138
|
-
},
|
|
139
|
-
endControls: {
|
|
140
|
-
position: 'relative'
|
|
141
|
-
},
|
|
142
|
-
placeholder: {},
|
|
143
|
-
bottomControls: {
|
|
144
|
-
scrollbarWidth: 'none',
|
|
145
|
-
overflow: 'auto hidden',
|
|
146
|
-
'& > *': {
|
|
147
|
-
flex: '0 0 auto'
|
|
148
|
-
},
|
|
149
|
-
'&::-webkit-scrollbar': {
|
|
150
|
-
display: 'none'
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
menuSettingsFullScreen: {
|
|
154
|
-
'&.onesy-Modal-root': {
|
|
155
|
-
position: 'fixed !important',
|
|
156
|
-
transform: 'none !important',
|
|
157
|
-
left: 'unset !important',
|
|
158
|
-
right: '12px !important',
|
|
159
|
-
bottom: '47.8906px !important'
|
|
160
|
-
}
|
|
145
|
+
'&::-webkit-scrollbar': {
|
|
146
|
+
display: 'none'
|
|
161
147
|
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
148
|
+
},
|
|
149
|
+
menuSettingsFullScreen: {
|
|
150
|
+
'&.onesy-Modal-root': {
|
|
151
|
+
position: 'fixed !important',
|
|
152
|
+
transform: 'none !important',
|
|
153
|
+
left: 'unset !important',
|
|
154
|
+
right: '12px !important',
|
|
155
|
+
bottom: '47.8906px !important'
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}), {
|
|
159
|
+
name: 'onesy-VideoPlayer'
|
|
160
|
+
});
|
|
161
|
+
const VideoPlayer = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
162
|
+
var _SettingsMenuProps$Li;
|
|
163
|
+
const theme = (0, _styleReact.useOnesyTheme)();
|
|
164
|
+
const l = theme.l;
|
|
165
|
+
const props = _react.default.useMemo(() => {
|
|
166
|
+
var _theme$ui, _theme$ui2;
|
|
167
|
+
return _objectSpread(_objectSpread(_objectSpread({}, theme === null || theme === void 0 || (_theme$ui = theme.ui) === null || _theme$ui === void 0 || (_theme$ui = _theme$ui.elements) === null || _theme$ui === void 0 || (_theme$ui = _theme$ui.all) === null || _theme$ui === void 0 || (_theme$ui = _theme$ui.props) === null || _theme$ui === void 0 ? void 0 : _theme$ui.default), theme === null || theme === void 0 || (_theme$ui2 = theme.ui) === null || _theme$ui2 === void 0 || (_theme$ui2 = _theme$ui2.elements) === null || _theme$ui2 === void 0 || (_theme$ui2 = _theme$ui2.onesyVideoPlayer) === null || _theme$ui2 === void 0 || (_theme$ui2 = _theme$ui2.props) === null || _theme$ui2 === void 0 ? void 0 : _theme$ui2.default), props_);
|
|
168
|
+
}, [props_]);
|
|
169
|
+
const Line = _react.default.useMemo(() => {
|
|
170
|
+
var _theme$elements;
|
|
171
|
+
return (theme === null || theme === void 0 || (_theme$elements = theme.elements) === null || _theme$elements === void 0 ? void 0 : _theme$elements.Line) || _Line.default;
|
|
172
|
+
}, [theme]);
|
|
173
|
+
const Surface = _react.default.useMemo(() => {
|
|
174
|
+
var _theme$elements2;
|
|
175
|
+
return (theme === null || theme === void 0 || (_theme$elements2 = theme.elements) === null || _theme$elements2 === void 0 ? void 0 : _theme$elements2.Surface) || _Surface.default;
|
|
176
|
+
}, [theme]);
|
|
177
|
+
const Slider = _react.default.useMemo(() => {
|
|
178
|
+
var _theme$elements3;
|
|
179
|
+
return (theme === null || theme === void 0 || (_theme$elements3 = theme.elements) === null || _theme$elements3 === void 0 ? void 0 : _theme$elements3.Slider) || _Slider.default;
|
|
180
|
+
}, [theme]);
|
|
181
|
+
const IconButton = _react.default.useMemo(() => {
|
|
182
|
+
var _theme$elements4;
|
|
183
|
+
return (theme === null || theme === void 0 || (_theme$elements4 = theme.elements) === null || _theme$elements4 === void 0 ? void 0 : _theme$elements4.IconButton) || _IconButton.default;
|
|
184
|
+
}, [theme]);
|
|
185
|
+
const Expand = _react.default.useMemo(() => {
|
|
186
|
+
var _theme$elements5;
|
|
187
|
+
return (theme === null || theme === void 0 || (_theme$elements5 = theme.elements) === null || _theme$elements5 === void 0 ? void 0 : _theme$elements5.Expand) || _Expand.default;
|
|
188
|
+
}, [theme]);
|
|
189
|
+
const Type = _react.default.useMemo(() => {
|
|
190
|
+
var _theme$elements6;
|
|
191
|
+
return (theme === null || theme === void 0 || (_theme$elements6 = theme.elements) === null || _theme$elements6 === void 0 ? void 0 : _theme$elements6.Type) || _Type.default;
|
|
192
|
+
}, [theme]);
|
|
193
|
+
const Menu = _react.default.useMemo(() => {
|
|
194
|
+
var _theme$elements7;
|
|
195
|
+
return (theme === null || theme === void 0 || (_theme$elements7 = theme.elements) === null || _theme$elements7 === void 0 ? void 0 : _theme$elements7.Menu) || _Menu.default;
|
|
196
|
+
}, [theme]);
|
|
197
|
+
const ListItem = _react.default.useMemo(() => {
|
|
198
|
+
var _theme$elements8;
|
|
199
|
+
return (theme === null || theme === void 0 || (_theme$elements8 = theme.elements) === null || _theme$elements8 === void 0 ? void 0 : _theme$elements8.ListItem) || _ListItem.default;
|
|
200
|
+
}, [theme]);
|
|
201
|
+
const {
|
|
202
|
+
name,
|
|
203
|
+
src,
|
|
204
|
+
meta,
|
|
205
|
+
versions,
|
|
206
|
+
thumbnails,
|
|
207
|
+
mime,
|
|
208
|
+
duration: duration_,
|
|
209
|
+
tonal = true,
|
|
210
|
+
color,
|
|
211
|
+
size = 'regular',
|
|
212
|
+
start,
|
|
213
|
+
end,
|
|
214
|
+
startControls,
|
|
215
|
+
endControls,
|
|
216
|
+
startButtons,
|
|
217
|
+
endButtons,
|
|
218
|
+
startButtonsEnd,
|
|
219
|
+
endButtonsEnd,
|
|
220
|
+
forward,
|
|
221
|
+
backward,
|
|
222
|
+
settings = true,
|
|
223
|
+
quality: quality_ = true,
|
|
224
|
+
playbackSpeed: playbackSpeed_ = true,
|
|
225
|
+
pictureInPicture: pictureInPicture_ = true,
|
|
226
|
+
fullScreen: fullScreen_ = true,
|
|
227
|
+
startMediaSessionOnPlay,
|
|
228
|
+
disabled,
|
|
229
|
+
IconPlay = _IconMaterialPlayArrowW.default,
|
|
230
|
+
IconPause = _IconMaterialPauseW.default,
|
|
231
|
+
IconForward = _IconMaterialForwardMediaW.default,
|
|
232
|
+
IconBackward = _IconMaterialForwardMediaW.default,
|
|
233
|
+
IconVolume = _IconMaterialVolumeDownAltW.default,
|
|
234
|
+
IconVolumeMuted = _IconMaterialVolumeOffW.default,
|
|
235
|
+
IconBack = _IconMaterialArrowBackIosW.default,
|
|
236
|
+
IconSettings = _IconMaterialSettingsW.default,
|
|
237
|
+
IconQuality = _IconMaterialTuneW.default,
|
|
238
|
+
IconPlaybackSpeed = _IconMaterialSlowMotionVideoW.default,
|
|
239
|
+
IconPictureInPicture = _IconMaterialPictureInPictureAltW.default,
|
|
240
|
+
IconFullScreen = _IconMaterialFullscreenW.default,
|
|
241
|
+
IconFullScreenExit = _IconMaterialFullscreenExitW.default,
|
|
242
|
+
PlayButtonProps,
|
|
243
|
+
ForwardButtonProps,
|
|
244
|
+
BackwardButtonProps,
|
|
245
|
+
VolumeButtonProps,
|
|
246
|
+
IconButtonProps,
|
|
247
|
+
TypeProps,
|
|
248
|
+
TimelineProps,
|
|
249
|
+
VolumeProps,
|
|
250
|
+
SliderProps,
|
|
251
|
+
SettingsButtonProps,
|
|
252
|
+
SettingsMenuProps,
|
|
253
|
+
QualityButtonProps,
|
|
254
|
+
PictureInPictureButtonProps,
|
|
255
|
+
FullScreenButtonProps,
|
|
256
|
+
className,
|
|
257
|
+
Component
|
|
258
|
+
} = props,
|
|
259
|
+
other = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
260
|
+
const {
|
|
261
|
+
classes
|
|
262
|
+
} = useStyle();
|
|
263
|
+
const [loaded, setLoaded] = _react.default.useState(false);
|
|
264
|
+
const [duration, setDuration] = _react.default.useState((0, _utils.is)('number', meta === null || meta === void 0 ? void 0 : meta.duration) ? meta.duration : undefined);
|
|
265
|
+
const [time, setTime] = _react.default.useState(0);
|
|
266
|
+
const [play, setPlay] = _react.default.useState(false);
|
|
267
|
+
const [muted, setMuted] = _react.default.useState(false);
|
|
268
|
+
const [volume, setVolume] = _react.default.useState(1);
|
|
269
|
+
const [volumeVisible, setVolumeVisible] = _react.default.useState(false);
|
|
270
|
+
const [updating, setUpdating] = _react.default.useState(false);
|
|
271
|
+
const [mouseMoved, setMouseMoved] = _react.default.useState();
|
|
272
|
+
const [quality, setQuality] = _react.default.useState();
|
|
273
|
+
const [posterShow, setPosterShow] = _react.default.useState(true);
|
|
274
|
+
const [pictureInPicture, setPictureInPicture] = _react.default.useState(false);
|
|
275
|
+
const [fullScreen, setFullScreen] = _react.default.useState(false);
|
|
276
|
+
const [playbackSpeed, setPlaybackSpeed] = _react.default.useState(1);
|
|
277
|
+
const [openMenu, setOpenMenu] = _react.default.useState();
|
|
278
|
+
const refs = {
|
|
279
|
+
root: _react.default.useRef(null),
|
|
280
|
+
video: _react.default.useRef(null),
|
|
281
|
+
controls: _react.default.useRef(null),
|
|
282
|
+
duration: _react.default.useRef(null),
|
|
283
|
+
time: _react.default.useRef(null),
|
|
284
|
+
play: _react.default.useRef(null),
|
|
285
|
+
updating: _react.default.useRef(null),
|
|
286
|
+
onPlay: _react.default.useRef(null),
|
|
287
|
+
onPause: _react.default.useRef(null),
|
|
288
|
+
onTimeChange: _react.default.useRef(null),
|
|
289
|
+
onBackward: _react.default.useRef(null),
|
|
290
|
+
onForward: _react.default.useRef(null),
|
|
291
|
+
onStop: _react.default.useRef(null),
|
|
292
|
+
startMediaSession: _react.default.useRef(null),
|
|
293
|
+
updateMediaSession: _react.default.useRef(null),
|
|
294
|
+
startMediaSessionOnPlay: _react.default.useRef(null),
|
|
295
|
+
fullScreen: _react.default.useRef(fullScreen),
|
|
296
|
+
mouseMoved: _react.default.useRef(mouseMoved),
|
|
297
|
+
timeoutMouseMoved: _react.default.useRef(null)
|
|
298
|
+
};
|
|
299
|
+
refs.duration.current = duration;
|
|
300
|
+
refs.time.current = time;
|
|
301
|
+
refs.play.current = play;
|
|
302
|
+
refs.updating.current = updating;
|
|
303
|
+
refs.startMediaSessionOnPlay.current = startMediaSessionOnPlay;
|
|
304
|
+
refs.fullScreen.current = fullScreen;
|
|
305
|
+
refs.mouseMoved.current = mouseMoved;
|
|
306
|
+
const allowedPictureInPicture = () => {
|
|
307
|
+
if ((0, _utils.isEnvironment)('browser')) {
|
|
308
|
+
var _refs$root$current;
|
|
309
|
+
const rootDocument = ((_refs$root$current = refs.root.current) === null || _refs$root$current === void 0 ? void 0 : _refs$root$current.ownerDocument) || window.document;
|
|
310
|
+
return rootDocument.pictureInPictureEnabled;
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
const startMediaSession = _react.default.useCallback(() => {
|
|
314
|
+
if ('mediaSession' in navigator) {
|
|
315
|
+
window.navigator.mediaSession.metadata = new MediaMetadata({
|
|
316
|
+
title: name
|
|
317
|
+
});
|
|
318
|
+
const methods = [{
|
|
319
|
+
name: 'play',
|
|
320
|
+
method: refs.onPlay.current
|
|
321
|
+
}, {
|
|
322
|
+
name: 'pause',
|
|
323
|
+
method: refs.onPause.current
|
|
324
|
+
}, {
|
|
325
|
+
name: 'previoustrack',
|
|
326
|
+
method: () => {}
|
|
327
|
+
}, {
|
|
328
|
+
name: 'nexttrack',
|
|
329
|
+
method: () => {}
|
|
330
|
+
}, {
|
|
331
|
+
name: 'seekbackward',
|
|
332
|
+
method: refs.onBackward.current
|
|
333
|
+
}, {
|
|
334
|
+
name: 'seekforward',
|
|
335
|
+
method: refs.onForward.current
|
|
336
|
+
}, {
|
|
337
|
+
name: 'seekto',
|
|
338
|
+
method: details => refs.onTimeChange.current(details.seekTime)
|
|
339
|
+
}, {
|
|
340
|
+
name: 'stop',
|
|
341
|
+
method: refs.onStop.current
|
|
342
|
+
}];
|
|
343
|
+
for (const method of methods) {
|
|
344
|
+
try {
|
|
345
|
+
window.navigator.mediaSession.setActionHandler(method.name, method.method);
|
|
346
|
+
} catch (error) {
|
|
347
|
+
console.log(`MediaSession action ${method.name}, is not supported`);
|
|
260
348
|
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
refs.
|
|
268
|
-
|
|
269
|
-
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}, [name]);
|
|
352
|
+
const updateMediaSession = _react.default.useCallback(() => {
|
|
353
|
+
if ('mediaSession' in navigator) {
|
|
354
|
+
window.navigator.mediaSession.setPositionState({
|
|
355
|
+
duration: refs.duration.current,
|
|
356
|
+
playbackRate: 1,
|
|
357
|
+
position: (0, _utils.clamp)(refs.time.current, 0, refs.duration.current)
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
}, [name]);
|
|
361
|
+
refs.startMediaSession.current = startMediaSession;
|
|
362
|
+
refs.updateMediaSession.current = updateMediaSession;
|
|
363
|
+
const durationTime = duration_ || (meta === null || meta === void 0 ? void 0 : meta.duration);
|
|
364
|
+
const onVolumeChange = _react.default.useCallback(value => {
|
|
365
|
+
setVolume(value);
|
|
366
|
+
refs.video.current.volume = value;
|
|
367
|
+
}, []);
|
|
368
|
+
const onTimeChange = _react.default.useCallback(value => {
|
|
369
|
+
setTime(value);
|
|
370
|
+
refs.video.current.currentTime = value;
|
|
371
|
+
|
|
372
|
+
// update MediaSession
|
|
373
|
+
refs.updateMediaSession.current();
|
|
374
|
+
}, []);
|
|
375
|
+
const onPlaybackSpeed = _react.default.useCallback(value_ => {
|
|
376
|
+
const value = (0, _utils.clamp)(value_, 0, 2);
|
|
377
|
+
setPlaybackSpeed(value);
|
|
378
|
+
setOpenMenu(null);
|
|
379
|
+
refs.video.current.playbackRate = value;
|
|
380
|
+
}, []);
|
|
381
|
+
const onForward = _react.default.useCallback(details => {
|
|
382
|
+
const part = refs.duration.current * 0.1;
|
|
383
|
+
const toMove = (0, _utils.clamp)((details === null || details === void 0 ? void 0 : details.seekOffset) || part, 1, refs.duration.current);
|
|
384
|
+
const value = (0, _utils.clamp)(refs.time.current + toMove, 0, refs.duration.current);
|
|
385
|
+
refs.onTimeChange.current(value);
|
|
386
|
+
}, []);
|
|
387
|
+
const onBackward = _react.default.useCallback(details => {
|
|
388
|
+
const part = refs.duration.current * 0.1;
|
|
389
|
+
const toMove = (0, _utils.clamp)((details === null || details === void 0 ? void 0 : details.seekOffset) || part, 1, refs.duration.current);
|
|
390
|
+
const value = (0, _utils.clamp)(refs.time.current - toMove, 0, refs.duration.current);
|
|
391
|
+
refs.onTimeChange.current(value);
|
|
392
|
+
}, []);
|
|
393
|
+
const onPlay = _react.default.useCallback(() => {
|
|
394
|
+
try {
|
|
395
|
+
setPlay(true);
|
|
396
|
+
refs.video.current.play();
|
|
397
|
+
|
|
398
|
+
// start MediaSession
|
|
399
|
+
if (refs.startMediaSessionOnPlay.current) refs.startMediaSession.current();
|
|
400
|
+
|
|
401
|
+
// update MediaSession
|
|
402
|
+
refs.updateMediaSession.current();
|
|
403
|
+
} catch (error) {
|
|
404
|
+
console.error(`videoPlayer`, error);
|
|
405
|
+
}
|
|
406
|
+
}, []);
|
|
407
|
+
const onPause = _react.default.useCallback(() => {
|
|
408
|
+
setPlay(false);
|
|
409
|
+
refs.video.current.pause();
|
|
410
|
+
}, []);
|
|
411
|
+
const onStop = _react.default.useCallback(() => {
|
|
412
|
+
setPlay(false);
|
|
413
|
+
refs.video.current.pause();
|
|
414
|
+
refs.video.current.currentTime = 0;
|
|
415
|
+
}, []);
|
|
416
|
+
const onMute = _react.default.useCallback(() => {
|
|
417
|
+
setMuted(true);
|
|
418
|
+
refs.video.current.muted = true;
|
|
419
|
+
}, []);
|
|
420
|
+
const onUnmute = _react.default.useCallback(() => {
|
|
421
|
+
setMuted(false);
|
|
422
|
+
refs.video.current.muted = false;
|
|
423
|
+
}, []);
|
|
424
|
+
refs.onPlay.current = onPlay;
|
|
425
|
+
refs.onPause.current = onPause;
|
|
426
|
+
refs.onTimeChange.current = onTimeChange;
|
|
427
|
+
refs.onForward.current = onForward;
|
|
428
|
+
refs.onBackward.current = onBackward;
|
|
429
|
+
refs.onStop.current = onStop;
|
|
430
|
+
const init = _react.default.useCallback(() => {
|
|
431
|
+
var _refs$root$current2, _refs$root$current3, _refs$root$current4, _refs$root$current5;
|
|
432
|
+
setLoaded(false);
|
|
433
|
+
const video = refs.video.current;
|
|
434
|
+
video.addEventListener('loadedmetadata', () => {
|
|
435
|
+
const value = video.duration;
|
|
436
|
+
if (!(0, _utils.is)('number', durationTime) && (0, _utils.is)('number', value)) {
|
|
437
|
+
if (refs.duration.current === undefined) setDuration(value);
|
|
438
|
+
setLoaded(true);
|
|
439
|
+
}
|
|
440
|
+
});
|
|
441
|
+
video.addEventListener('ended', () => {
|
|
442
|
+
refs.onStop.current();
|
|
443
|
+
});
|
|
444
|
+
video.addEventListener('timeupdate', () => {
|
|
445
|
+
const value = video.currentTime;
|
|
446
|
+
if (!refs.updating.current && refs.time.current !== value) {
|
|
270
447
|
setTime(value);
|
|
271
|
-
|
|
448
|
+
|
|
272
449
|
// update MediaSession
|
|
273
450
|
refs.updateMediaSession.current();
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
}
|
|
287
|
-
const
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
setPlay(false);
|
|
309
|
-
refs.video.current.pause();
|
|
310
|
-
}, []);
|
|
311
|
-
const onStop = react_1.default.useCallback(() => {
|
|
312
|
-
setPlay(false);
|
|
313
|
-
refs.video.current.pause();
|
|
314
|
-
refs.video.current.currentTime = 0;
|
|
315
|
-
}, []);
|
|
316
|
-
const onMute = react_1.default.useCallback(() => {
|
|
317
|
-
setMuted(true);
|
|
318
|
-
refs.video.current.muted = true;
|
|
319
|
-
}, []);
|
|
320
|
-
const onUnmute = react_1.default.useCallback(() => {
|
|
321
|
-
setMuted(false);
|
|
322
|
-
refs.video.current.muted = false;
|
|
323
|
-
}, []);
|
|
324
|
-
refs.onPlay.current = onPlay;
|
|
325
|
-
refs.onPause.current = onPause;
|
|
326
|
-
refs.onTimeChange.current = onTimeChange;
|
|
327
|
-
refs.onForward.current = onForward;
|
|
328
|
-
refs.onBackward.current = onBackward;
|
|
329
|
-
refs.onStop.current = onStop;
|
|
330
|
-
const init = react_1.default.useCallback(() => {
|
|
331
|
-
var _a, _b, _c, _d;
|
|
332
|
-
setLoaded(false);
|
|
333
|
-
const video = refs.video.current;
|
|
334
|
-
video.addEventListener('loadedmetadata', () => {
|
|
335
|
-
const value = video.duration;
|
|
336
|
-
if (!(0, utils_1.is)('number', durationTime) && (0, utils_1.is)('number', value)) {
|
|
337
|
-
if (refs.duration.current === undefined)
|
|
338
|
-
setDuration(value);
|
|
339
|
-
setLoaded(true);
|
|
340
|
-
}
|
|
341
|
-
});
|
|
342
|
-
video.addEventListener('ended', () => {
|
|
343
|
-
refs.onStop.current();
|
|
344
|
-
});
|
|
345
|
-
video.addEventListener('timeupdate', () => {
|
|
346
|
-
const value = video.currentTime;
|
|
347
|
-
if (!refs.updating.current && refs.time.current !== value) {
|
|
348
|
-
setTime(value);
|
|
349
|
-
// update MediaSession
|
|
350
|
-
refs.updateMediaSession.current();
|
|
351
|
-
}
|
|
352
|
-
});
|
|
353
|
-
video.addEventListener('ratechange', () => {
|
|
354
|
-
const value = video.playbackRate;
|
|
355
|
-
setPlaybackSpeed(value);
|
|
451
|
+
}
|
|
452
|
+
});
|
|
453
|
+
video.addEventListener('ratechange', () => {
|
|
454
|
+
const value = video.playbackRate;
|
|
455
|
+
setPlaybackSpeed(value);
|
|
456
|
+
});
|
|
457
|
+
|
|
458
|
+
// start MediaSession
|
|
459
|
+
startMediaSession();
|
|
460
|
+
if ((0, _utils.is)('number', durationTime)) {
|
|
461
|
+
if (refs.duration.current === undefined) setDuration(durationTime);
|
|
462
|
+
setLoaded(true);
|
|
463
|
+
}
|
|
464
|
+
const rootDocument = (0, _utils.isEnvironment)('browser') ? ((_refs$root$current2 = refs.root.current) === null || _refs$root$current2 === void 0 ? void 0 : _refs$root$current2.ownerDocument) || window.document : undefined;
|
|
465
|
+
const methodPictureInPicture = () => {
|
|
466
|
+
if (rootDocument.pictureInPictureElement) {
|
|
467
|
+
setPictureInPicture(true);
|
|
468
|
+
} else {
|
|
469
|
+
setPictureInPicture(false);
|
|
470
|
+
}
|
|
471
|
+
};
|
|
472
|
+
const methodFullScreen = () => {
|
|
473
|
+
if (rootDocument.fullscreenElement) {
|
|
474
|
+
setFullScreen(true);
|
|
475
|
+
} else {
|
|
476
|
+
setFullScreen(false);
|
|
477
|
+
}
|
|
478
|
+
};
|
|
479
|
+
const methodMouseMove = () => {
|
|
480
|
+
if (refs.play.current) {
|
|
481
|
+
clearTimeout(refs.timeoutMouseMoved.current);
|
|
482
|
+
setMouseMoved({
|
|
483
|
+
moved: true,
|
|
484
|
+
unix: _date.OnesyDate.unix
|
|
356
485
|
});
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
const rootDocument = (0, utils_1.isEnvironment)('browser') ? (((_a = refs.root.current) === null || _a === void 0 ? void 0 : _a.ownerDocument) || window.document) : undefined;
|
|
365
|
-
const methodPictureInPicture = () => {
|
|
366
|
-
if (rootDocument.pictureInPictureElement) {
|
|
367
|
-
setPictureInPicture(true);
|
|
368
|
-
}
|
|
369
|
-
else {
|
|
370
|
-
setPictureInPicture(false);
|
|
371
|
-
}
|
|
372
|
-
};
|
|
373
|
-
const methodFullScreen = () => {
|
|
374
|
-
if (rootDocument.fullscreenElement) {
|
|
375
|
-
setFullScreen(true);
|
|
376
|
-
}
|
|
377
|
-
else {
|
|
378
|
-
setFullScreen(false);
|
|
379
|
-
}
|
|
380
|
-
};
|
|
381
|
-
const methodMouseMove = () => {
|
|
382
|
-
if (refs.play.current) {
|
|
383
|
-
clearTimeout(refs.timeoutMouseMoved.current);
|
|
384
|
-
setMouseMoved({
|
|
385
|
-
moved: true,
|
|
386
|
-
unix: date_1.OnesyDate.unix
|
|
387
|
-
});
|
|
388
|
-
refs.timeoutMouseMoved.current = setTimeout(() => {
|
|
389
|
-
setMouseMoved({
|
|
390
|
-
moved: false,
|
|
391
|
-
unix: date_1.OnesyDate.unix
|
|
392
|
-
});
|
|
393
|
-
}, 4000);
|
|
394
|
-
}
|
|
395
|
-
};
|
|
396
|
-
(_b = refs.root.current) === null || _b === void 0 ? void 0 : _b.addEventListener('mousemove', methodMouseMove);
|
|
397
|
-
(_c = refs.root.current) === null || _c === void 0 ? void 0 : _c.addEventListener('touchstart', methodMouseMove);
|
|
398
|
-
(_d = refs.root.current) === null || _d === void 0 ? void 0 : _d.addEventListener('touchmove', methodMouseMove);
|
|
399
|
-
rootDocument.addEventListener('enterpictureinpicture', methodPictureInPicture);
|
|
400
|
-
rootDocument.addEventListener('leavepictureinpicture', methodPictureInPicture);
|
|
401
|
-
rootDocument.addEventListener('fullscreenchange', methodFullScreen);
|
|
402
|
-
video.src = src;
|
|
403
|
-
return () => {
|
|
404
|
-
var _a, _b, _c;
|
|
405
|
-
(_a = refs.root.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('mousemove', methodMouseMove);
|
|
406
|
-
(_b = refs.root.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('touchstart', methodMouseMove);
|
|
407
|
-
(_c = refs.root.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('touchmove', methodMouseMove);
|
|
408
|
-
rootDocument.removeEventListener('enterpictureinpicture', methodPictureInPicture);
|
|
409
|
-
rootDocument.removeEventListener('leavepictureinpicture', methodPictureInPicture);
|
|
410
|
-
rootDocument.removeEventListener('fullscreenchange', methodFullScreen);
|
|
411
|
-
};
|
|
412
|
-
}, [src, durationTime, startMediaSession]);
|
|
413
|
-
react_1.default.useEffect(() => {
|
|
414
|
-
var _a, _b;
|
|
415
|
-
if (loaded) {
|
|
416
|
-
let urlNew = src;
|
|
417
|
-
if (quality) {
|
|
418
|
-
if ((_a = quality === null || quality === void 0 ? void 0 : quality.meta) === null || _a === void 0 ? void 0 : _a.resolution)
|
|
419
|
-
urlNew += `?version=${(_b = quality === null || quality === void 0 ? void 0 : quality.meta) === null || _b === void 0 ? void 0 : _b.resolution}`;
|
|
420
|
-
}
|
|
421
|
-
const currentTime = refs.video.current.currentTime;
|
|
422
|
-
const playbackRate = refs.video.current.playbackRate;
|
|
423
|
-
const playing = refs.play.current;
|
|
424
|
-
// pause
|
|
425
|
-
if (playing)
|
|
426
|
-
refs.onPause.current();
|
|
427
|
-
// poster remove
|
|
428
|
-
setPosterShow(false);
|
|
429
|
-
refs.video.current.poster = '';
|
|
430
|
-
refs.video.current.src = urlNew;
|
|
431
|
-
refs.video.current.load();
|
|
432
|
-
refs.video.current.currentTime = currentTime;
|
|
433
|
-
refs.video.current.playbackRate = playbackRate;
|
|
434
|
-
// play
|
|
435
|
-
if (playing)
|
|
436
|
-
refs.onPlay.current();
|
|
437
|
-
}
|
|
438
|
-
}, [quality]);
|
|
439
|
-
const onMouseEnter = react_1.default.useCallback(() => {
|
|
440
|
-
setVolumeVisible(true);
|
|
441
|
-
}, []);
|
|
442
|
-
const onMouseLeave = react_1.default.useCallback(() => {
|
|
443
|
-
setVolumeVisible(false);
|
|
444
|
-
}, []);
|
|
445
|
-
const onUpdating = react_1.default.useCallback(() => {
|
|
446
|
-
setUpdating(refs.play.current ? 'play' : true);
|
|
447
|
-
if (refs.play.current)
|
|
448
|
-
onPause();
|
|
449
|
-
}, [onPause]);
|
|
450
|
-
const onUpdatingDone = react_1.default.useCallback(() => {
|
|
451
|
-
const updatingPrevious = refs.updating.current;
|
|
452
|
-
setUpdating(false);
|
|
453
|
-
if (updatingPrevious === 'play')
|
|
454
|
-
onPlay();
|
|
455
|
-
}, [onPlay]);
|
|
456
|
-
const onFullScreen = react_1.default.useCallback(async () => {
|
|
457
|
-
const root = refs.root.current;
|
|
458
|
-
try {
|
|
459
|
-
if (root.requestFullscreen)
|
|
460
|
-
await root.requestFullscreen();
|
|
461
|
-
else if (root.webkitRequestFullscreen)
|
|
462
|
-
await root.webkitRequestFullscreen();
|
|
463
|
-
else if (root.msRequestFullscreen)
|
|
464
|
-
await root.msRequestFullscreen();
|
|
465
|
-
}
|
|
466
|
-
catch (error) { }
|
|
467
|
-
}, []);
|
|
468
|
-
const onFullScreenExit = react_1.default.useCallback(async () => {
|
|
469
|
-
var _a;
|
|
470
|
-
const rootDocument = (0, utils_1.isEnvironment)('browser') ? (((_a = refs.root.current) === null || _a === void 0 ? void 0 : _a.ownerDocument) || window.document) : undefined;
|
|
471
|
-
try {
|
|
472
|
-
if (rootDocument.exitFullscreen)
|
|
473
|
-
await rootDocument.exitFullscreen();
|
|
474
|
-
else if (rootDocument.webkitExitFullscreen)
|
|
475
|
-
await rootDocument.webkitExitFullscreen();
|
|
476
|
-
else if (rootDocument.msExitFullscreen)
|
|
477
|
-
await rootDocument.msExitFullscreen();
|
|
478
|
-
}
|
|
479
|
-
catch (error) { }
|
|
480
|
-
}, []);
|
|
481
|
-
const onPictureInPicture = react_1.default.useCallback(async () => {
|
|
482
|
-
const video = refs.video.current;
|
|
483
|
-
try {
|
|
484
|
-
if (video.requestPictureInPicture)
|
|
485
|
-
await video.requestPictureInPicture();
|
|
486
|
-
else if (video.webkitRequestPictureInPicture)
|
|
487
|
-
await video.webkitRequestPictureInPicture();
|
|
488
|
-
else if (video.msRequestPictureInPicture)
|
|
489
|
-
await video.msRequestPictureInPicture();
|
|
490
|
-
}
|
|
491
|
-
catch (error) { }
|
|
492
|
-
}, []);
|
|
493
|
-
const onPictureInPictureExit = react_1.default.useCallback(async () => {
|
|
494
|
-
var _a;
|
|
495
|
-
const rootDocument = (0, utils_1.isEnvironment)('browser') ? (((_a = refs.root.current) === null || _a === void 0 ? void 0 : _a.ownerDocument) || window.document) : undefined;
|
|
496
|
-
try {
|
|
497
|
-
if (rootDocument.exitPictureInPicture)
|
|
498
|
-
await rootDocument.exitPictureInPicture();
|
|
499
|
-
else if (rootDocument.webkitExitPictureInPicture)
|
|
500
|
-
await rootDocument.webkitExitPictureInPicture();
|
|
501
|
-
else if (rootDocument.msExitPictureInPicture)
|
|
502
|
-
await rootDocument.msExitPictureInPicture();
|
|
503
|
-
}
|
|
504
|
-
catch (error) { }
|
|
505
|
-
}, []);
|
|
506
|
-
const onVideoClick = react_1.default.useCallback((event) => {
|
|
507
|
-
if (event.detail === 1) {
|
|
508
|
-
!play ? onPlay() : onPause();
|
|
509
|
-
}
|
|
510
|
-
if (event.detail === 2) {
|
|
511
|
-
!fullScreen ? onFullScreen() : onFullScreenExit();
|
|
512
|
-
}
|
|
513
|
-
}, [play, fullScreen, onPlay, onPause, onFullScreen, onFullScreenExit]);
|
|
514
|
-
react_1.default.useEffect(() => {
|
|
515
|
-
var _a;
|
|
516
|
-
const rootDocument = (0, utils_1.isEnvironment)('browser') ? (((_a = refs.root.current) === null || _a === void 0 ? void 0 : _a.ownerDocument) || window.document) : undefined;
|
|
517
|
-
rootDocument.addEventListener('mouseup', onUpdatingDone);
|
|
518
|
-
rootDocument.addEventListener('touchend', onUpdatingDone);
|
|
519
|
-
return () => {
|
|
520
|
-
rootDocument.removeEventListener('mouseup', onUpdatingDone);
|
|
521
|
-
rootDocument.removeEventListener('touchend', onUpdatingDone);
|
|
522
|
-
};
|
|
523
|
-
}, []);
|
|
524
|
-
react_1.default.useEffect(() => {
|
|
525
|
-
// init
|
|
526
|
-
init();
|
|
527
|
-
}, [src]);
|
|
528
|
-
const durationToValue = (item) => {
|
|
529
|
-
let value = '';
|
|
530
|
-
const separator = ':';
|
|
531
|
-
if (item.hour)
|
|
532
|
-
value += `${(0, utils_1.getLeadingZerosNumber)(item.hour, { leadingZeros: 0 })}`;
|
|
533
|
-
if (item.minute) {
|
|
534
|
-
if (value)
|
|
535
|
-
value += separator;
|
|
536
|
-
value += `${(0, utils_1.getLeadingZerosNumber)(item.minute, { leadingZeros: 0 })}`;
|
|
537
|
-
}
|
|
538
|
-
else {
|
|
539
|
-
if (value)
|
|
540
|
-
value += separator;
|
|
541
|
-
value += '0';
|
|
542
|
-
}
|
|
543
|
-
if (item.second) {
|
|
544
|
-
if (value)
|
|
545
|
-
value += separator;
|
|
546
|
-
value += `${(0, utils_1.getLeadingZerosNumber)(item.second, { leadingZeros: 1 })}`;
|
|
547
|
-
}
|
|
548
|
-
else {
|
|
549
|
-
if (value)
|
|
550
|
-
value += separator;
|
|
551
|
-
value += '00';
|
|
552
|
-
}
|
|
553
|
-
return value;
|
|
486
|
+
refs.timeoutMouseMoved.current = setTimeout(() => {
|
|
487
|
+
setMouseMoved({
|
|
488
|
+
moved: false,
|
|
489
|
+
unix: _date.OnesyDate.unix
|
|
490
|
+
});
|
|
491
|
+
}, 4000);
|
|
492
|
+
}
|
|
554
493
|
};
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
494
|
+
(_refs$root$current3 = refs.root.current) === null || _refs$root$current3 === void 0 || _refs$root$current3.addEventListener('mousemove', methodMouseMove);
|
|
495
|
+
(_refs$root$current4 = refs.root.current) === null || _refs$root$current4 === void 0 || _refs$root$current4.addEventListener('touchstart', methodMouseMove);
|
|
496
|
+
(_refs$root$current5 = refs.root.current) === null || _refs$root$current5 === void 0 || _refs$root$current5.addEventListener('touchmove', methodMouseMove);
|
|
497
|
+
rootDocument.addEventListener('enterpictureinpicture', methodPictureInPicture);
|
|
498
|
+
rootDocument.addEventListener('leavepictureinpicture', methodPictureInPicture);
|
|
499
|
+
rootDocument.addEventListener('fullscreenchange', methodFullScreen);
|
|
500
|
+
video.src = src;
|
|
501
|
+
return () => {
|
|
502
|
+
var _refs$root$current6, _refs$root$current7, _refs$root$current8;
|
|
503
|
+
(_refs$root$current6 = refs.root.current) === null || _refs$root$current6 === void 0 || _refs$root$current6.removeEventListener('mousemove', methodMouseMove);
|
|
504
|
+
(_refs$root$current7 = refs.root.current) === null || _refs$root$current7 === void 0 || _refs$root$current7.removeEventListener('touchstart', methodMouseMove);
|
|
505
|
+
(_refs$root$current8 = refs.root.current) === null || _refs$root$current8 === void 0 || _refs$root$current8.removeEventListener('touchmove', methodMouseMove);
|
|
506
|
+
rootDocument.removeEventListener('enterpictureinpicture', methodPictureInPicture);
|
|
507
|
+
rootDocument.removeEventListener('leavepictureinpicture', methodPictureInPicture);
|
|
508
|
+
rootDocument.removeEventListener('fullscreenchange', methodFullScreen);
|
|
509
|
+
};
|
|
510
|
+
}, [src, durationTime, startMediaSession]);
|
|
511
|
+
_react.default.useEffect(() => {
|
|
512
|
+
if (loaded) {
|
|
513
|
+
let urlNew = src;
|
|
514
|
+
if (quality) {
|
|
515
|
+
var _quality$meta, _quality$meta2;
|
|
516
|
+
if (quality !== null && quality !== void 0 && (_quality$meta = quality.meta) !== null && _quality$meta !== void 0 && _quality$meta.resolution) urlNew += `?version=${quality === null || quality === void 0 || (_quality$meta2 = quality.meta) === null || _quality$meta2 === void 0 ? void 0 : _quality$meta2.resolution}`;
|
|
517
|
+
}
|
|
518
|
+
const currentTime = refs.video.current.currentTime;
|
|
519
|
+
const playbackRate = refs.video.current.playbackRate;
|
|
520
|
+
const playing = refs.play.current;
|
|
521
|
+
|
|
522
|
+
// pause
|
|
523
|
+
if (playing) refs.onPause.current();
|
|
524
|
+
|
|
525
|
+
// poster remove
|
|
526
|
+
setPosterShow(false);
|
|
527
|
+
refs.video.current.poster = '';
|
|
528
|
+
refs.video.current.src = urlNew;
|
|
529
|
+
refs.video.current.load();
|
|
530
|
+
refs.video.current.currentTime = currentTime;
|
|
531
|
+
refs.video.current.playbackRate = playbackRate;
|
|
532
|
+
|
|
533
|
+
// play
|
|
534
|
+
if (playing) refs.onPlay.current();
|
|
535
|
+
}
|
|
536
|
+
}, [quality]);
|
|
537
|
+
const onMouseEnter = _react.default.useCallback(() => {
|
|
538
|
+
setVolumeVisible(true);
|
|
539
|
+
}, []);
|
|
540
|
+
const onMouseLeave = _react.default.useCallback(() => {
|
|
541
|
+
setVolumeVisible(false);
|
|
542
|
+
}, []);
|
|
543
|
+
const onUpdating = _react.default.useCallback(() => {
|
|
544
|
+
setUpdating(refs.play.current ? 'play' : true);
|
|
545
|
+
if (refs.play.current) onPause();
|
|
546
|
+
}, [onPause]);
|
|
547
|
+
const onUpdatingDone = _react.default.useCallback(() => {
|
|
548
|
+
const updatingPrevious = refs.updating.current;
|
|
549
|
+
setUpdating(false);
|
|
550
|
+
if (updatingPrevious === 'play') onPlay();
|
|
551
|
+
}, [onPlay]);
|
|
552
|
+
const onFullScreen = _react.default.useCallback(async () => {
|
|
553
|
+
const root = refs.root.current;
|
|
554
|
+
try {
|
|
555
|
+
if (root.requestFullscreen) await root.requestFullscreen();else if (root.webkitRequestFullscreen) await root.webkitRequestFullscreen();else if (root.msRequestFullscreen) await root.msRequestFullscreen();
|
|
556
|
+
} catch (error) {}
|
|
557
|
+
}, []);
|
|
558
|
+
const onFullScreenExit = _react.default.useCallback(async () => {
|
|
559
|
+
var _refs$root$current9;
|
|
560
|
+
const rootDocument = (0, _utils.isEnvironment)('browser') ? ((_refs$root$current9 = refs.root.current) === null || _refs$root$current9 === void 0 ? void 0 : _refs$root$current9.ownerDocument) || window.document : undefined;
|
|
561
|
+
try {
|
|
562
|
+
if (rootDocument.exitFullscreen) await rootDocument.exitFullscreen();else if (rootDocument.webkitExitFullscreen) await rootDocument.webkitExitFullscreen();else if (rootDocument.msExitFullscreen) await rootDocument.msExitFullscreen();
|
|
563
|
+
} catch (error) {}
|
|
564
|
+
}, []);
|
|
565
|
+
const onPictureInPicture = _react.default.useCallback(async () => {
|
|
566
|
+
const video = refs.video.current;
|
|
567
|
+
try {
|
|
568
|
+
if (video.requestPictureInPicture) await video.requestPictureInPicture();else if (video.webkitRequestPictureInPicture) await video.webkitRequestPictureInPicture();else if (video.msRequestPictureInPicture) await video.msRequestPictureInPicture();
|
|
569
|
+
} catch (error) {}
|
|
570
|
+
}, []);
|
|
571
|
+
const onPictureInPictureExit = _react.default.useCallback(async () => {
|
|
572
|
+
var _refs$root$current0;
|
|
573
|
+
const rootDocument = (0, _utils.isEnvironment)('browser') ? ((_refs$root$current0 = refs.root.current) === null || _refs$root$current0 === void 0 ? void 0 : _refs$root$current0.ownerDocument) || window.document : undefined;
|
|
574
|
+
try {
|
|
575
|
+
if (rootDocument.exitPictureInPicture) await rootDocument.exitPictureInPicture();else if (rootDocument.webkitExitPictureInPicture) await rootDocument.webkitExitPictureInPicture();else if (rootDocument.msExitPictureInPicture) await rootDocument.msExitPictureInPicture();
|
|
576
|
+
} catch (error) {}
|
|
577
|
+
}, []);
|
|
578
|
+
const onVideoClick = _react.default.useCallback(event => {
|
|
579
|
+
if (event.detail === 1) {
|
|
580
|
+
!play ? onPlay() : onPause();
|
|
581
|
+
}
|
|
582
|
+
if (event.detail === 2) {
|
|
583
|
+
!fullScreen ? onFullScreen() : onFullScreenExit();
|
|
584
|
+
}
|
|
585
|
+
}, [play, fullScreen, onPlay, onPause, onFullScreen, onFullScreenExit]);
|
|
586
|
+
_react.default.useEffect(() => {
|
|
587
|
+
var _refs$root$current1;
|
|
588
|
+
const rootDocument = (0, _utils.isEnvironment)('browser') ? ((_refs$root$current1 = refs.root.current) === null || _refs$root$current1 === void 0 ? void 0 : _refs$root$current1.ownerDocument) || window.document : undefined;
|
|
589
|
+
rootDocument.addEventListener('mouseup', onUpdatingDone);
|
|
590
|
+
rootDocument.addEventListener('touchend', onUpdatingDone);
|
|
591
|
+
return () => {
|
|
592
|
+
rootDocument.removeEventListener('mouseup', onUpdatingDone);
|
|
593
|
+
rootDocument.removeEventListener('touchend', onUpdatingDone);
|
|
594
|
+
};
|
|
595
|
+
}, []);
|
|
596
|
+
_react.default.useEffect(() => {
|
|
597
|
+
// init
|
|
598
|
+
init();
|
|
599
|
+
}, [src]);
|
|
600
|
+
const durationToValue = item => {
|
|
601
|
+
let value = '';
|
|
602
|
+
const separator = ':';
|
|
603
|
+
if (item.hour) value += `${(0, _utils.getLeadingZerosNumber)(item.hour, {
|
|
604
|
+
leadingZeros: 0
|
|
605
|
+
})}`;
|
|
606
|
+
if (item.minute) {
|
|
607
|
+
if (value) value += separator;
|
|
608
|
+
value += `${(0, _utils.getLeadingZerosNumber)(item.minute, {
|
|
609
|
+
leadingZeros: 0
|
|
610
|
+
})}`;
|
|
611
|
+
} else {
|
|
612
|
+
if (value) value += separator;
|
|
613
|
+
value += '0';
|
|
614
|
+
}
|
|
615
|
+
if (item.second) {
|
|
616
|
+
if (value) value += separator;
|
|
617
|
+
value += `${(0, _utils.getLeadingZerosNumber)(item.second, {
|
|
618
|
+
leadingZeros: 1
|
|
619
|
+
})}`;
|
|
620
|
+
} else {
|
|
621
|
+
if (value) value += separator;
|
|
622
|
+
value += '00';
|
|
623
|
+
}
|
|
624
|
+
return value;
|
|
625
|
+
};
|
|
626
|
+
const onQuality = _react.default.useCallback(version => {
|
|
627
|
+
setQuality(version);
|
|
628
|
+
setOpenMenu(null);
|
|
629
|
+
}, []);
|
|
630
|
+
const onSettingsMenuClose = _react.default.useCallback(() => {
|
|
631
|
+
setOpenMenu(null);
|
|
632
|
+
}, []);
|
|
633
|
+
const getSettingsMenuItems = () => {
|
|
634
|
+
const itemProps = {
|
|
635
|
+
button: true,
|
|
636
|
+
startAlign: 'center',
|
|
637
|
+
endAlign: 'center',
|
|
638
|
+
size: 'small',
|
|
639
|
+
className: 'onesy-videoPlayer-option'
|
|
596
640
|
};
|
|
597
|
-
const
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
641
|
+
const items = [];
|
|
642
|
+
if (openMenu) {
|
|
643
|
+
items.push(/*#__PURE__*/_react.default.createElement(ListItem, (0, _extends2.default)({
|
|
644
|
+
key: "back",
|
|
645
|
+
start: /*#__PURE__*/_react.default.createElement(IconBack, {
|
|
646
|
+
size: "very small"
|
|
647
|
+
}),
|
|
648
|
+
primary: /*#__PURE__*/_react.default.createElement(Type, {
|
|
649
|
+
version: "b3"
|
|
650
|
+
}, l('Back')),
|
|
651
|
+
onClick: () => setOpenMenu(null)
|
|
652
|
+
}, itemProps)));
|
|
653
|
+
}
|
|
654
|
+
if (!openMenu) {
|
|
655
|
+
var _quality$meta3;
|
|
656
|
+
if (playbackSpeed_) items.push(/*#__PURE__*/_react.default.createElement(ListItem, (0, _extends2.default)({
|
|
657
|
+
key: "playbackSpeed",
|
|
658
|
+
start: /*#__PURE__*/_react.default.createElement(IconPlaybackSpeed, {
|
|
659
|
+
size: "small"
|
|
660
|
+
}),
|
|
661
|
+
primary: /*#__PURE__*/_react.default.createElement(Type, {
|
|
662
|
+
version: "b3"
|
|
663
|
+
}, l('Playback speed')),
|
|
664
|
+
end: /*#__PURE__*/_react.default.createElement(Type, {
|
|
665
|
+
version: "b3",
|
|
666
|
+
priority: "secondary"
|
|
667
|
+
}, playbackSpeed === 1 ? l('Normal') : playbackSpeed),
|
|
668
|
+
onClick: () => setOpenMenu('playbackSpeed')
|
|
669
|
+
}, itemProps)));
|
|
670
|
+
if (quality_) items.push(/*#__PURE__*/_react.default.createElement(ListItem, (0, _extends2.default)({
|
|
671
|
+
key: "quality",
|
|
672
|
+
start: /*#__PURE__*/_react.default.createElement(IconQuality, {
|
|
673
|
+
size: "small"
|
|
674
|
+
}),
|
|
675
|
+
primary: /*#__PURE__*/_react.default.createElement(Type, {
|
|
676
|
+
version: "b3"
|
|
677
|
+
}, l('Quality')),
|
|
678
|
+
end: /*#__PURE__*/_react.default.createElement(Type, {
|
|
679
|
+
version: "b3",
|
|
680
|
+
priority: "secondary"
|
|
681
|
+
}, !quality ? l('Original') : `${quality === null || quality === void 0 || (_quality$meta3 = quality.meta) === null || _quality$meta3 === void 0 ? void 0 : _quality$meta3.resolution}p`),
|
|
682
|
+
onClick: () => setOpenMenu('quality')
|
|
683
|
+
}, itemProps)));
|
|
684
|
+
} else if (openMenu === 'quality') {
|
|
685
|
+
items.push(/*#__PURE__*/_react.default.createElement(ListItem, (0, _extends2.default)({
|
|
686
|
+
key: "original",
|
|
687
|
+
primary: /*#__PURE__*/_react.default.createElement(Type, {
|
|
688
|
+
version: "b3"
|
|
689
|
+
}, `${meta === null || meta === void 0 ? void 0 : meta.resolution}p (original)`),
|
|
690
|
+
onClick: () => quality ? onQuality(null) : undefined,
|
|
691
|
+
selected: !quality
|
|
692
|
+
}, itemProps)));
|
|
693
|
+
versions === null || versions === void 0 || versions.forEach((version, index) => {
|
|
694
|
+
var _version$meta;
|
|
695
|
+
const isSelected = (quality === null || quality === void 0 ? void 0 : quality.id) === (version === null || version === void 0 ? void 0 : version.id);
|
|
696
|
+
items.push(/*#__PURE__*/_react.default.createElement(ListItem, (0, _extends2.default)({
|
|
697
|
+
key: index,
|
|
698
|
+
primary: /*#__PURE__*/_react.default.createElement(Type, {
|
|
699
|
+
version: "b3"
|
|
700
|
+
}, version === null || version === void 0 || (_version$meta = version.meta) === null || _version$meta === void 0 ? void 0 : _version$meta.resolution, "p"),
|
|
701
|
+
onClick: () => !isSelected ? onQuality(version) : undefined,
|
|
702
|
+
selected: isSelected
|
|
703
|
+
}, itemProps)));
|
|
704
|
+
});
|
|
705
|
+
} else if (openMenu === 'playbackSpeed') {
|
|
706
|
+
const options = [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2];
|
|
707
|
+
options.forEach(option => {
|
|
708
|
+
items.push(/*#__PURE__*/_react.default.createElement(ListItem, (0, _extends2.default)({
|
|
709
|
+
key: option,
|
|
710
|
+
primary: /*#__PURE__*/_react.default.createElement(Type, {
|
|
711
|
+
version: "b3"
|
|
712
|
+
}, option === 1 ? l('Normal') : option),
|
|
713
|
+
onClick: () => onPlaybackSpeed(option),
|
|
714
|
+
selected: playbackSpeed === option
|
|
715
|
+
}, itemProps)));
|
|
716
|
+
});
|
|
610
717
|
}
|
|
611
|
-
|
|
612
|
-
|
|
718
|
+
return items;
|
|
719
|
+
};
|
|
720
|
+
const thumbnailsToUse = thumbnails || (quality === null || quality === void 0 ? void 0 : quality.thumbnails);
|
|
721
|
+
const thumbnail = thumbnailsToUse ? 1 : undefined;
|
|
722
|
+
const typeProps = _objectSpread({
|
|
723
|
+
version: size === 'large' ? 'b1' : size === 'regular' ? 'b2' : 'b3'
|
|
724
|
+
}, TypeProps);
|
|
725
|
+
const iconButtonProps = _objectSpread({
|
|
726
|
+
version: 'text',
|
|
727
|
+
size,
|
|
728
|
+
disabled
|
|
729
|
+
}, IconButtonProps);
|
|
730
|
+
const sliderProps = _objectSpread({
|
|
731
|
+
color,
|
|
732
|
+
size,
|
|
733
|
+
disabled
|
|
734
|
+
}, SliderProps);
|
|
735
|
+
let url = src;
|
|
736
|
+
let poster;
|
|
737
|
+
if (quality) {
|
|
738
|
+
var _quality$meta4, _quality$meta5;
|
|
739
|
+
if (quality !== null && quality !== void 0 && (_quality$meta4 = quality.meta) !== null && _quality$meta4 !== void 0 && _quality$meta4.resolution) url += `?version=${quality === null || quality === void 0 || (_quality$meta5 = quality.meta) === null || _quality$meta5 === void 0 ? void 0 : _quality$meta5.resolution}`;
|
|
740
|
+
}
|
|
741
|
+
if ((0, _utils.is)('number', thumbnail)) {
|
|
742
|
+
var _url;
|
|
743
|
+
poster = `${url}${(_url = url) !== null && _url !== void 0 && _url.includes('?') ? '&' : '?'}thumbnail=${thumbnail}`;
|
|
744
|
+
}
|
|
745
|
+
return /*#__PURE__*/_react.default.createElement(Line, (0, _extends2.default)({
|
|
746
|
+
ref: item => {
|
|
747
|
+
if (ref) {
|
|
748
|
+
if ((0, _utils.is)('function', ref)) ref(item);else ref.current = item;
|
|
749
|
+
}
|
|
750
|
+
refs.root.current = item;
|
|
751
|
+
},
|
|
752
|
+
gap: 1,
|
|
753
|
+
direction: "column",
|
|
754
|
+
align: "unset",
|
|
755
|
+
justify: "unset",
|
|
756
|
+
fullWidth: true,
|
|
757
|
+
Component: Component,
|
|
758
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('VideoPlayer', theme) && [`onesy-VideoPlayer-root`, `onesy-VideoPlayer-size-${size}`, fullScreen && `onesy-VideoPlayer-full-screen`], className, classes.root, classes[`size_${size}`], fullScreen && classes.fullScreen])
|
|
759
|
+
}, other), /*#__PURE__*/_react.default.createElement(Line, {
|
|
760
|
+
gap: 0,
|
|
761
|
+
direction: "column",
|
|
762
|
+
align: "unset",
|
|
763
|
+
justify: "unset",
|
|
764
|
+
fullWidth: true,
|
|
765
|
+
className: (0, _styleReact.classNames)([classes.wrapper, fullScreen && classes.wrapperFullScreen])
|
|
766
|
+
}, start, /*#__PURE__*/_react.default.createElement("video", {
|
|
767
|
+
ref: refs.video,
|
|
768
|
+
onClick: onVideoClick,
|
|
769
|
+
poster: posterShow ? poster : undefined,
|
|
770
|
+
controls: false,
|
|
771
|
+
className: (0, _styleReact.classNames)([classes.video, fullScreen && classes.videoFullScreen])
|
|
772
|
+
}, /*#__PURE__*/_react.default.createElement("source", {
|
|
773
|
+
src: url,
|
|
774
|
+
type: mime
|
|
775
|
+
})), /*#__PURE__*/_react.default.createElement(Surface, {
|
|
776
|
+
ref: refs.controls,
|
|
777
|
+
gap: 0,
|
|
778
|
+
fullWidth: true,
|
|
779
|
+
tonal: tonal,
|
|
780
|
+
color: color !== undefined ? color : theme.palette.light ? 'inverted' : 'default',
|
|
781
|
+
Component: Line,
|
|
782
|
+
className: (0, _styleReact.classNames)([classes.controls, classes[`controls_size_${size}`], fullScreen && classes.controlsFullScreen, !(mouseMoved !== null && mouseMoved !== void 0 && mouseMoved.moved) && play && classes.controlsHiddden])
|
|
783
|
+
}, startControls, /*#__PURE__*/_react.default.createElement(Line, {
|
|
784
|
+
fullWidth: true,
|
|
785
|
+
className: classes.wrapperTimeline
|
|
786
|
+
}, /*#__PURE__*/_react.default.createElement(Slider, (0, _extends2.default)({
|
|
787
|
+
value: time,
|
|
788
|
+
onChange: onTimeChange,
|
|
789
|
+
min: 0,
|
|
790
|
+
max: duration,
|
|
791
|
+
onMouseDown: onUpdating,
|
|
792
|
+
onTouchStart: onUpdating,
|
|
793
|
+
onMouseUp: onUpdatingDone,
|
|
794
|
+
onToucheEnd: onUpdatingDone
|
|
795
|
+
}, sliderProps, TimelineProps, {
|
|
796
|
+
className: (0, _styleReact.classNames)([sliderProps === null || sliderProps === void 0 ? void 0 : sliderProps.className, TimelineProps === null || TimelineProps === void 0 ? void 0 : TimelineProps.className, classes.timeline])
|
|
797
|
+
}))), /*#__PURE__*/_react.default.createElement(Line, {
|
|
798
|
+
direction: "row",
|
|
799
|
+
align: "center",
|
|
800
|
+
fullWidth: true,
|
|
801
|
+
onMouseLeave: onMouseLeave,
|
|
802
|
+
className: classes.bottomControls,
|
|
803
|
+
style: {
|
|
804
|
+
color: theme.palette.color[color] ? theme.palette.color[color][90] : theme.palette.color.neutral[90]
|
|
613
805
|
}
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
806
|
+
}, startButtons, /*#__PURE__*/_react.default.createElement(Line, {
|
|
807
|
+
gap: 1,
|
|
808
|
+
direction: "row",
|
|
809
|
+
align: "center",
|
|
810
|
+
justify: "space-between",
|
|
811
|
+
flexNo: true,
|
|
812
|
+
fullWidth: true
|
|
813
|
+
}, /*#__PURE__*/_react.default.createElement(Line, {
|
|
814
|
+
gap: 1.5,
|
|
815
|
+
direction: "row",
|
|
816
|
+
align: "center",
|
|
817
|
+
flexNo: true
|
|
818
|
+
}, /*#__PURE__*/_react.default.createElement(Line, {
|
|
819
|
+
gap: 0,
|
|
820
|
+
direction: "row",
|
|
821
|
+
align: "center"
|
|
822
|
+
}, /*#__PURE__*/_react.default.createElement(IconButton, (0, _extends2.default)({
|
|
823
|
+
onClick: play ? onPause : onPlay
|
|
824
|
+
}, iconButtonProps, PlayButtonProps), play ? /*#__PURE__*/_react.default.createElement(IconPause, null) : /*#__PURE__*/_react.default.createElement(IconPlay, null)), backward && /*#__PURE__*/_react.default.createElement(IconButton, (0, _extends2.default)({
|
|
825
|
+
onClick: onBackward
|
|
826
|
+
}, iconButtonProps, BackwardButtonProps), /*#__PURE__*/_react.default.createElement(IconBackward, {
|
|
827
|
+
style: {
|
|
828
|
+
transform: 'rotateY(180deg)'
|
|
829
|
+
}
|
|
830
|
+
})), forward && /*#__PURE__*/_react.default.createElement(IconButton, (0, _extends2.default)({
|
|
831
|
+
onClick: onForward
|
|
832
|
+
}, iconButtonProps, ForwardButtonProps), /*#__PURE__*/_react.default.createElement(IconForward, null)), /*#__PURE__*/_react.default.createElement(IconButton, (0, _extends2.default)({
|
|
833
|
+
onClick: muted ? onUnmute : onMute,
|
|
834
|
+
onMouseEnter: onMouseEnter
|
|
835
|
+
}, iconButtonProps, VolumeButtonProps), !muted ? /*#__PURE__*/_react.default.createElement(IconVolume, null) : /*#__PURE__*/_react.default.createElement(IconVolumeMuted, null)), /*#__PURE__*/_react.default.createElement(Expand, {
|
|
836
|
+
in: volumeVisible,
|
|
837
|
+
parent: refs.controls.current,
|
|
838
|
+
orientation: "horizontal",
|
|
839
|
+
className: classes.volumeExpand
|
|
840
|
+
}, /*#__PURE__*/_react.default.createElement(Slider, (0, _extends2.default)({
|
|
841
|
+
value: volume,
|
|
842
|
+
onChange: onVolumeChange,
|
|
843
|
+
min: 0,
|
|
844
|
+
max: 1,
|
|
845
|
+
orientation: "horizontal"
|
|
846
|
+
}, sliderProps, {
|
|
847
|
+
size: ['small', 'regular'].includes(size) ? 'small' : 'regular'
|
|
848
|
+
}, VolumeProps, {
|
|
849
|
+
className: (0, _styleReact.classNames)([sliderProps === null || sliderProps === void 0 ? void 0 : sliderProps.className, VolumeProps === null || VolumeProps === void 0 ? void 0 : VolumeProps.className, classes.volume])
|
|
850
|
+
})))), /*#__PURE__*/_react.default.createElement(Line, {
|
|
851
|
+
gap: 0.5,
|
|
852
|
+
direction: "row",
|
|
853
|
+
align: "center",
|
|
854
|
+
flexNo: true,
|
|
855
|
+
className: (0, _styleReact.classNames)(['onesy-Audio-time', classes.time])
|
|
856
|
+
}, /*#__PURE__*/_react.default.createElement(Type, typeProps, durationToValue((0, _date.duration)(time * 1000, false, true))), /*#__PURE__*/_react.default.createElement(Type, typeProps, "/"), /*#__PURE__*/_react.default.createElement(Type, typeProps, durationToValue((0, _date.duration)(duration * 1000, false, true))))), /*#__PURE__*/_react.default.createElement(Line, {
|
|
857
|
+
gap: 0.5,
|
|
858
|
+
direction: "row",
|
|
859
|
+
align: "center",
|
|
860
|
+
className: classes.endControls
|
|
861
|
+
}, startButtonsEnd, settings && /*#__PURE__*/_react.default.createElement(Menu, (0, _extends2.default)({
|
|
862
|
+
menuItems: getSettingsMenuItems(),
|
|
863
|
+
position: "top",
|
|
864
|
+
switch: false,
|
|
865
|
+
portal: !fullScreen,
|
|
866
|
+
onClose: onSettingsMenuClose,
|
|
867
|
+
includeParentQueries: ['.onesy-videoPlayer']
|
|
868
|
+
}, SettingsMenuProps, {
|
|
869
|
+
ListProps: {
|
|
870
|
+
className: (0, _styleReact.classNames)([SettingsMenuProps === null || SettingsMenuProps === void 0 || (_SettingsMenuProps$Li = SettingsMenuProps.ListProps) === null || _SettingsMenuProps$Li === void 0 ? void 0 : _SettingsMenuProps$Li.className, classes.menuSettings]),
|
|
871
|
+
size: 'small'
|
|
872
|
+
},
|
|
873
|
+
className: (0, _styleReact.classNames)(['onesy-videoPlayer', SettingsMenuProps === null || SettingsMenuProps === void 0 ? void 0 : SettingsMenuProps.className, fullScreen && classes.menuSettingsFullScreen])
|
|
874
|
+
}), /*#__PURE__*/_react.default.createElement(IconButton, (0, _extends2.default)({}, iconButtonProps, SettingsButtonProps), /*#__PURE__*/_react.default.createElement(IconSettings, null))), pictureInPicture_ && allowedPictureInPicture() && /*#__PURE__*/_react.default.createElement(IconButton, (0, _extends2.default)({
|
|
875
|
+
onClick: !pictureInPicture ? onPictureInPicture : onPictureInPictureExit
|
|
876
|
+
}, iconButtonProps, PictureInPictureButtonProps), /*#__PURE__*/_react.default.createElement(IconPictureInPicture, null)), fullScreen_ && /*#__PURE__*/_react.default.createElement(IconButton, (0, _extends2.default)({
|
|
877
|
+
onClick: !fullScreen ? onFullScreen : onFullScreenExit
|
|
878
|
+
}, iconButtonProps, FullScreenButtonProps), fullScreen ? /*#__PURE__*/_react.default.createElement(IconFullScreenExit, null) : /*#__PURE__*/_react.default.createElement(IconFullScreen, null)), endButtonsEnd)), endButtons), endControls), end));
|
|
669
879
|
});
|
|
670
880
|
VideoPlayer.displayName = 'onesy-VideoPlayer';
|
|
671
|
-
exports.default = VideoPlayer;
|
|
881
|
+
var _default = exports.default = VideoPlayer;
|