@leavepulse/ui 0.82.0 → 0.83.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/LpVideoTrim-BcGs3Sh0.css +8 -0
- package/dist/assets/VideoFlash-VuPkC7QV.css +23 -0
- package/dist/chunks/{ContextMenuItems-kRVTuSZd.js → ContextMenuItems-h-apPY2d.js} +1 -1
- package/dist/chunks/{DropzoneLinkField-CvMUu8HQ.js → DropzoneLinkField-_Op8b_ee.js} +1 -1
- package/dist/chunks/{FieldLeading-CNN_5Dp1.js → FieldLeading-mOMcwNqi.js} +1 -1
- package/dist/chunks/{FieldWrapper-BBJPEVHr.js → FieldWrapper-DtT-AIcn.js} +1 -1
- package/dist/chunks/{IconCloseButton-C59_etp2.js → IconCloseButton-YmisskyZ.js} +1 -1
- package/dist/chunks/{LayoutCanvas-BIY74SUe.js → LayoutCanvas-BrISZEBr.js} +1 -1
- package/dist/chunks/{LayoutNode-CTlKlhb-.js → LayoutNode-CwMQ8ACa.js} +1 -1
- package/dist/chunks/{LpActionBar-Cowb-28D.js → LpActionBar-CVVC6YbC.js} +1 -1
- package/dist/chunks/{LpAddressInput-nTJlUQ6K.js → LpAddressInput-tiuJ-bru.js} +7 -7
- package/dist/chunks/{LpAlert-DhZdjekN.js → LpAlert-8-x4H_Nk.js} +1 -1
- package/dist/chunks/{LpAppShell-CK9hTgQ1.js → LpAppShell-BW2YMq-A.js} +4 -4
- package/dist/chunks/{LpAutocomplete--PaZkQoU.js → LpAutocomplete-BZODIops.js} +4 -4
- package/dist/chunks/{LpAvatar-DVCld_L2.js → LpAvatar-BZq4nH53.js} +1 -1
- package/dist/chunks/{LpBadge-DXvpxk6z.js → LpBadge-Cz0pSSUu.js} +1 -1
- package/dist/chunks/{LpBottomNav-COQiBNUN.js → LpBottomNav-DVdR5Mry.js} +1 -1
- package/dist/chunks/{LpBreadcrumbs-Dt1O5G4O.js → LpBreadcrumbs-B2jphAel.js} +1 -1
- package/dist/chunks/{LpCalendar-C8Xlukd2.js → LpCalendar-C0_N5LVT.js} +1 -1
- package/dist/chunks/{LpCheckbox-Dpybd3oV.js → LpCheckbox-CwqLNdw4.js} +2 -2
- package/dist/chunks/{LpCodeBlock-C1Hu5RyT.js → LpCodeBlock-Dcss6bnl.js} +2 -2
- package/dist/chunks/{LpCodeDisplay-BVruT3-A.js → LpCodeDisplay-CLms1zDY.js} +4 -4
- package/dist/chunks/{LpColorPicker-BK-NRaGK.js → LpColorPicker-CbIY450X.js} +3 -3
- package/dist/chunks/{LpConfirmDialog-2CQFKtqU.js → LpConfirmDialog-RmP4z6va.js} +2 -2
- package/dist/chunks/{LpConfirmHost-CTkSytVl.js → LpConfirmHost-DheBgRMB.js} +1 -1
- package/dist/chunks/{LpContextMenu-DcHPdW-t.js → LpContextMenu-DIYhlap8.js} +2 -2
- package/dist/chunks/{LpContextSwitcher-C_nnDbeI.js → LpContextSwitcher-fDA6ERl-.js} +2 -2
- package/dist/chunks/{LpCopyButton-De7_elaO.js → LpCopyButton-DSqKFGEb.js} +1 -1
- package/dist/chunks/{LpDataList-BjZPfQjO.js → LpDataList-f9UjSx9m.js} +2 -2
- package/dist/chunks/{LpDatePicker-wOrHd0fg.js → LpDatePicker-3kDQLVbg.js} +5 -5
- package/dist/chunks/{LpDateRangePicker-CVMvvo5t.js → LpDateRangePicker-DUPiTt0_.js} +3 -3
- package/dist/chunks/{LpDisclosure-CtQ63LeO.js → LpDisclosure-C5WZjhbQ.js} +1 -1
- package/dist/chunks/{LpDrawer-TZBPzyOM.js → LpDrawer-CkYvIGIa.js} +1 -1
- package/dist/chunks/{LpDropdownMenu-DL9LgkS8.js → LpDropdownMenu-zSsK2Xra.js} +6 -3
- package/dist/chunks/{LpEditable-DuPE2tkl.js → LpEditable-CP7Y_lKg.js} +2 -2
- package/dist/chunks/{LpEmptyState-W1U_tKg-.js → LpEmptyState-dsc5x-ya.js} +1 -1
- package/dist/chunks/{LpFieldNotice-BLKlYLwu.js → LpFieldNotice-TOTbWvgv.js} +1 -1
- package/dist/chunks/{LpFileTree-CEiRIpj1.js → LpFileTree-BPjnOTln.js} +4 -4
- package/dist/chunks/{LpFileTreeNode-C0292AU2.js → LpFileTreeNode-_-MiWmie.js} +4 -4
- package/dist/chunks/{LpFormField-Bhgi0idH.js → LpFormField-BJwD1iEF.js} +1 -1
- package/dist/chunks/{LpHintLayer-D8ZKsvsT.js → LpHintLayer-CmfGnxYu.js} +1 -1
- package/dist/chunks/{LpHints-DbIV-wk4.js → LpHints-C2Xvc1Fd.js} +3 -3
- package/dist/chunks/{LpIcon-CytpcLmS.js → LpIcon-CoOLz1oJ.js} +1 -1
- package/dist/chunks/{LpInfraNode-8cGoY87Q.js → LpInfraNode-CW3qsM-U.js} +2 -2
- package/dist/chunks/{LpInput-P2C12X7s.js → LpInput-BVWhkPuN.js} +3 -3
- package/dist/chunks/{LpInspector-DjfMa4tD.js → LpInspector-REmoX_es.js} +4 -4
- package/dist/chunks/{LpLightbox-BEQtCz0m.js → LpLightbox-C3FFTYP5.js} +65 -20
- package/dist/chunks/{LpLogInspector-CyxK1d-V.js → LpLogInspector-Cs8Z_fM0.js} +2 -2
- package/dist/chunks/{LpLogViewer-CZrc_HG7.js → LpLogViewer-DQRGe-ZK.js} +6 -6
- package/dist/chunks/{LpMapPicker-CbTfFcEu.js → LpMapPicker-CQnQPgKm.js} +1 -1
- package/dist/chunks/{LpMediaGallery-C_SwNR4y.js → LpMediaGallery-DkKqTy9P.js} +20 -8
- package/dist/chunks/{LpModal-B6Yt0G7E.js → LpModal-DwejR7VP.js} +1 -1
- package/dist/chunks/{LpModalNav-CMYWEiUs.js → LpModalNav-D1-dSe6f.js} +3 -3
- package/dist/chunks/{LpNotificationBell-BJKPx0X1.js → LpNotificationBell-EKLkN0sp.js} +4 -4
- package/dist/chunks/{LpNotificationFeed-orWISVez.js → LpNotificationFeed-Dc-yQ4NH.js} +4 -4
- package/dist/chunks/{LpNumberField-C5MeLsoE.js → LpNumberField-DvUjEMp-.js} +3 -3
- package/dist/chunks/{LpOtpInput-6SCQ64uK.js → LpOtpInput-xvDO14f4.js} +1 -1
- package/dist/chunks/{LpPagination-CkwbdFa9.js → LpPagination-BFZY8dFn.js} +1 -1
- package/dist/chunks/{LpPaletteTheme-RWgbWFOz.js → LpPaletteTheme-EBJv0Bwz.js} +2 -2
- package/dist/chunks/{LpPasswordInput-DJBRo5lt.js → LpPasswordInput-DRJR3fF1.js} +2 -2
- package/dist/chunks/{LpPhoneInput-DcmcJwos.js → LpPhoneInput-BGOOtUoW.js} +3 -3
- package/dist/chunks/{LpPie-DmMlhgo2.js → LpPie-Deyn8h5J.js} +2 -2
- package/dist/chunks/{LpPipeline-BXcp2shV.js → LpPipeline-9ChjeNh5.js} +2 -2
- package/dist/chunks/{LpQuota-CtEiqRg4.js → LpQuota-CNh5eF_p.js} +1 -1
- package/dist/chunks/{LpRadioGroup-Ubkk_eSq.js → LpRadioGroup-Br2Nl9Gr.js} +2 -2
- package/dist/chunks/{LpRangeCalendar-DCswVYbU.js → LpRangeCalendar-D66Y3U_w.js} +1 -1
- package/dist/chunks/{LpRangeSlider-DM1qy5Tp.js → LpRangeSlider-eX-fIlOw.js} +1 -1
- package/dist/chunks/{LpRepeater-BMo2Eabn.js → LpRepeater-0XvnlVd_.js} +2 -2
- package/dist/chunks/{LpSecretField-SSRGVqRc.js → LpSecretField-1RCooChq.js} +5 -5
- package/dist/chunks/{LpSection-C3bTxD7t.js → LpSection-B9gbJJcP.js} +1 -1
- package/dist/chunks/{LpSegmented-C1DF6m6A.js → LpSegmented-hIjGzGTo.js} +2 -2
- package/dist/chunks/{LpSelect-DvDr1VPn.js → LpSelect-DugubwTc.js} +4 -4
- package/dist/chunks/{LpSidebar-Bql881r6.js → LpSidebar-DevSoN8W.js} +4 -4
- package/dist/chunks/{LpSidebarNav-CKx2KJvr.js → LpSidebarNav-DwQQ3KXe.js} +3 -3
- package/dist/chunks/{LpSidebarRow-BMOL9kOG.js → LpSidebarRow-CAGgtJCS.js} +3 -3
- package/dist/chunks/{LpSlider-DsSMe4b5.js → LpSlider-1fHpVxpB.js} +1 -1
- package/dist/chunks/{LpStat-CQYYDMS6.js → LpStat-Cm9-FaWQ.js} +2 -2
- package/dist/chunks/{LpStatus-g5nSJfU3.js → LpStatus-CE8FSAT1.js} +1 -1
- package/dist/chunks/{LpStepMark-seVNOuNJ.js → LpStepMark-BWSlV69R.js} +1 -1
- package/dist/chunks/{LpStepper-D6qEXihZ.js → LpStepper-1D0ZA7Nx.js} +1 -1
- package/dist/chunks/{LpSwitch-DM5CVm31.js → LpSwitch-D_kvE0oQ.js} +1 -1
- package/dist/chunks/{LpTabFace-ZWwelqRU.js → LpTabFace-CpbFKi-N.js} +2 -2
- package/dist/chunks/{LpTableFilter-CWU9Dmk-.js → LpTableFilter-BYHyCu38.js} +2 -2
- package/dist/chunks/{LpTagsInput-C2qVF2ax.js → LpTagsInput-Cqm38t5N.js} +5 -5
- package/dist/chunks/{LpTextarea-C3EoV_xv.js → LpTextarea-DaSKBkiV.js} +1 -1
- package/dist/chunks/{LpThemeStudio-BIBahaIs.js → LpThemeStudio-BNdfi-Ds.js} +5 -5
- package/dist/chunks/{LpThemeSwitcher-D4MqFLGS.js → LpThemeSwitcher-CbC1nqBP.js} +3 -3
- package/dist/chunks/{LpTimeField-DPOkbvyP.js → LpTimeField-CCfPCWPT.js} +2 -2
- package/dist/chunks/{LpToaster-Dj1VKxFv.js → LpToaster-BhlI7h-h.js} +2 -2
- package/dist/chunks/{LpTopologyCanvas-Bspzwm7x.js → LpTopologyCanvas-DlKbu7E5.js} +4 -4
- package/dist/chunks/{LpTour-CwpVdVN-.js → LpTour-CSLerA1B.js} +1 -1
- package/dist/chunks/{LpTruncate-JSaIW25q.js → LpTruncate-Ct26BSYB.js} +1 -1
- package/dist/chunks/{LpVideoBackdrop-Ct4St4ZL.js → LpVideoBackdrop-57i8RY8g.js} +1 -2
- package/dist/chunks/LpVideoPlayer-DcWd9DDW.js +813 -0
- package/dist/chunks/{LpWindow-RVcP436Z.js → LpWindow-YnF_knSj.js} +2 -2
- package/dist/chunks/{LpWorkspaceSwitcher-D0WOz1Fg.js → LpWorkspaceSwitcher-B-5UU6o4.js} +3 -3
- package/dist/chunks/{MenuTitle-D8Umab23.js → MenuTitle-BnZbFSwq.js} +1 -1
- package/dist/chunks/{OptionContent-DCnX_KRK.js → OptionContent-D5e_eklA.js} +1 -1
- package/dist/chunks/{PickerField-ChjY27bm.js → PickerField-KpHiowNI.js} +1 -1
- package/dist/chunks/{RevealToggle-MaL7PEjr.js → RevealToggle-CE1hAIJB.js} +1 -1
- package/dist/chunks/SteadyText-CwH-kduj.js +25 -0
- package/dist/chunks/{TourCard-oXZSpHKb.js → TourCard-t2csiTDS.js} +1 -1
- package/dist/chunks/VideoThumb-Csf9bUz3.js +67 -0
- package/dist/chunks/VideoVolume-B4_DNmNi.js +68 -0
- package/dist/chunks/icons-CdSlCrle.js +59 -0
- package/dist/component-names.d.ts +1 -1
- package/dist/components/ContextMenuItems.vue.js +1 -1
- package/dist/components/DropzoneLinkField.vue.js +1 -1
- package/dist/components/FieldLeading.vue.js +1 -1
- package/dist/components/FieldWrapper.vue.js +1 -1
- package/dist/components/IconCloseButton.vue.js +1 -1
- package/dist/components/LayoutCanvas.vue.js +1 -1
- package/dist/components/LayoutNode.vue.js +1 -1
- package/dist/components/LpActionBar.vue.js +1 -1
- package/dist/components/LpAddressInput.vue.js +1 -1
- package/dist/components/LpAlert.vue.js +1 -1
- package/dist/components/LpAppShell.vue.js +1 -1
- package/dist/components/LpAutocomplete.vue.js +1 -1
- package/dist/components/LpAvatar.vue.js +1 -1
- package/dist/components/LpBadge.vue.js +1 -1
- package/dist/components/LpBottomNav.vue.js +1 -1
- package/dist/components/LpBreadcrumbs.vue.js +1 -1
- package/dist/components/LpCalendar.vue.js +1 -1
- package/dist/components/LpChart.vue.js +2 -2
- package/dist/components/LpCheckbox.vue.js +1 -1
- package/dist/components/LpCodeBlock.vue.js +1 -1
- package/dist/components/LpCodeDisplay.vue.js +1 -1
- package/dist/components/LpColorPicker.vue.js +1 -1
- package/dist/components/LpCommandPalette.vue.js +2 -2
- package/dist/components/LpConfirmDialog.vue.js +1 -1
- package/dist/components/LpConfirmHost.vue.js +1 -1
- package/dist/components/LpContextMenu.vue.js +1 -1
- package/dist/components/LpContextSwitcher.vue.js +1 -1
- package/dist/components/LpCopyButton.vue.js +1 -1
- package/dist/components/LpDataList.vue.js +1 -1
- package/dist/components/LpDatePicker.vue.js +1 -1
- package/dist/components/LpDateRangePicker.vue.js +1 -1
- package/dist/components/LpDisclosure.vue.js +1 -1
- package/dist/components/LpDock.vue.js +1 -1
- package/dist/components/LpDrawer.vue.js +1 -1
- package/dist/components/LpDropdownMenu.vue.d.ts +5 -1
- package/dist/components/LpDropdownMenu.vue.js +1 -1
- package/dist/components/LpDropzone.vue.js +2 -2
- package/dist/components/LpEditable.vue.js +1 -1
- package/dist/components/LpEmptyState.vue.js +1 -1
- package/dist/components/LpFieldNotice.vue.js +1 -1
- package/dist/components/LpFileTree.vue.js +1 -1
- package/dist/components/LpFileTreeNode.vue.js +1 -1
- package/dist/components/LpFormField.vue.js +1 -1
- package/dist/components/LpHintLayer.vue.js +1 -1
- package/dist/components/LpHints.vue.js +1 -1
- package/dist/components/LpIcon.vue.js +1 -1
- package/dist/components/LpImageEditor.vue.js +1 -1
- package/dist/components/LpInfraNode.vue.js +1 -1
- package/dist/components/LpInput.vue.js +1 -1
- package/dist/components/LpInspector.vue.js +1 -1
- package/dist/components/LpLightbox.vue.js +1 -1
- package/dist/components/LpLogInspector.vue.js +1 -1
- package/dist/components/LpLogViewer.vue.js +1 -1
- package/dist/components/LpMapPicker.vue.js +1 -1
- package/dist/components/LpMediaGallery.vue.d.ts +1 -1
- package/dist/components/LpMediaGallery.vue.js +1 -1
- package/dist/components/LpModal.vue.js +1 -1
- package/dist/components/LpModalNav.vue.js +1 -1
- package/dist/components/LpNotificationBell.vue.js +1 -1
- package/dist/components/LpNotificationFeed.vue.js +1 -1
- package/dist/components/LpNumberField.vue.js +1 -1
- package/dist/components/LpOtpInput.vue.js +1 -1
- package/dist/components/LpPagination.vue.js +1 -1
- package/dist/components/LpPaletteFacts.vue.js +1 -1
- package/dist/components/LpPaletteHeader.vue.js +2 -2
- package/dist/components/LpPaletteTheme.vue.js +1 -1
- package/dist/components/LpPasswordInput.vue.js +1 -1
- package/dist/components/LpPhoneInput.vue.js +1 -1
- package/dist/components/LpPie.vue.js +1 -1
- package/dist/components/LpPipeline.vue.js +1 -1
- package/dist/components/LpQuota.vue.js +1 -1
- package/dist/components/LpRadioGroup.vue.js +1 -1
- package/dist/components/LpRangeCalendar.vue.js +1 -1
- package/dist/components/LpRangeSlider.vue.js +1 -1
- package/dist/components/LpRepeater.vue.js +1 -1
- package/dist/components/LpSecretField.vue.js +1 -1
- package/dist/components/LpSection.vue.js +1 -1
- package/dist/components/LpSegmented.vue.js +1 -1
- package/dist/components/LpSelect.vue.js +1 -1
- package/dist/components/LpShortcutsDialog.vue.js +1 -1
- package/dist/components/LpSidebar.vue.js +1 -1
- package/dist/components/LpSidebarNav.vue.js +1 -1
- package/dist/components/LpSidebarRow.vue.js +1 -1
- package/dist/components/LpSlider.vue.js +1 -1
- package/dist/components/LpStat.vue.js +1 -1
- package/dist/components/LpStatus.vue.js +1 -1
- package/dist/components/LpStepMark.vue.js +1 -1
- package/dist/components/LpStepper.vue.js +1 -1
- package/dist/components/LpSwitch.vue.js +1 -1
- package/dist/components/LpTabFace.vue.js +1 -1
- package/dist/components/LpTable.vue.js +9 -9
- package/dist/components/LpTableFilter.vue.js +1 -1
- package/dist/components/LpTabs.vue.js +2 -2
- package/dist/components/LpTagsInput.vue.js +1 -1
- package/dist/components/LpTextarea.vue.js +1 -1
- package/dist/components/LpThemeStudio.vue.js +1 -1
- package/dist/components/LpThemeSwitcher.vue.js +1 -1
- package/dist/components/LpTimeField.vue.js +1 -1
- package/dist/components/LpToaster.vue.js +1 -1
- package/dist/components/LpTopologyCanvas.vue.js +1 -1
- package/dist/components/LpTour.vue.js +1 -1
- package/dist/components/LpTruncate.vue.js +1 -1
- package/dist/components/LpVideoBackdrop.vue.js +1 -1
- package/dist/components/LpVideoPlayer.vue.d.ts +111 -0
- package/dist/components/LpVideoPlayer.vue.js +4 -0
- package/dist/components/LpVideoTrim.vue.d.ts +19 -5
- package/dist/components/LpVideoTrim.vue.js +596 -445
- package/dist/components/LpWindow.vue.js +1 -1
- package/dist/components/LpWorkspaceSwitcher.vue.js +1 -1
- package/dist/components/MenuTitle.vue.js +1 -1
- package/dist/components/OptionContent.vue.js +1 -1
- package/dist/components/PickerField.vue.js +1 -1
- package/dist/components/RevealToggle.vue.js +1 -1
- package/dist/components/SteadyText.vue.d.ts +7 -0
- package/dist/components/SteadyText.vue.js +4 -0
- package/dist/components/TourCard.vue.js +1 -1
- package/dist/components/VideoFlash.vue.d.ts +10 -0
- package/dist/components/VideoFlash.vue.js +33 -0
- package/dist/components/VideoThumb.vue.d.ts +12 -0
- package/dist/components/VideoThumb.vue.js +4 -0
- package/dist/components/VideoVolume.vue.d.ts +15 -0
- package/dist/components/VideoVolume.vue.js +4 -0
- package/dist/components/lightbox.d.ts +13 -0
- package/dist/components/lightbox.js +11 -1
- package/dist/components/menuWhen.js +1 -1
- package/dist/components/videoBackdrop.d.ts +15 -2
- package/dist/components/videoBackdrop.js +8 -2
- package/dist/components/videoMotion.d.ts +28 -0
- package/dist/components/videoMotion.js +26 -0
- package/dist/components/videoTrim.d.ts +2 -9
- package/dist/components/videoTrim.js +0 -6
- package/dist/composables/useVideoMedia.d.ts +74 -0
- package/dist/composables/useVideoMedia.js +291 -0
- package/dist/icons-all.js +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +173 -168
- package/package.json +1 -1
- package/src/component-names.ts +1 -0
- package/src/components/LpDropdownMenu.vue +4 -0
- package/src/components/LpLightbox.vue +61 -8
- package/src/components/LpMediaGallery.vue +19 -2
- package/src/components/LpVideoBackdrop.vue +1 -7
- package/src/components/LpVideoPlayer.vue +774 -0
- package/src/components/LpVideoTrim.vue +437 -295
- package/src/components/SteadyText.vue +21 -0
- package/src/components/VideoFlash.vue +52 -0
- package/src/components/VideoThumb.vue +66 -0
- package/src/components/VideoVolume.vue +63 -0
- package/src/components/lightbox.ts +23 -0
- package/src/components/videoBackdrop.ts +20 -3
- package/src/components/videoMotion.ts +38 -0
- package/src/components/videoTrim.ts +2 -14
- package/src/composables/useVideoMedia.ts +411 -0
- package/src/index.ts +4 -1
- package/src/kit-icons.ts +1 -1
- package/dist/assets/LpVideoTrim-Ci6IIHW0.css +0 -8
- package/dist/chunks/icons-BOdqDUii.js +0 -59
|
@@ -0,0 +1,813 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, watch, shallowRef, onMounted, onBeforeUnmount, openBlock, createElementBlock, mergeProps, unref, createVNode, withCtx, createElementVNode, normalizeStyle, normalizeClass, toHandlers, renderSlot, createCommentVNode, Transition, normalizeProps, guardReactiveProps, withModifiers, toDisplayString, Fragment, renderList, createBlock, createTextVNode, nextTick } from "vue";
|
|
2
|
+
import { startPointerDrag } from "../composables/pointerDrag.js";
|
|
3
|
+
import { nodeWindow, isHTMLElement } from "../composables/realm.js";
|
|
4
|
+
import { useClipboard } from "../composables/useClipboard.js";
|
|
5
|
+
import { useLabels } from "../composables/useLpConfig.js";
|
|
6
|
+
import { useMergedAttrs } from "../composables/useMergedClass.js";
|
|
7
|
+
import { useToast } from "../composables/useToast.js";
|
|
8
|
+
import { useVideoMedia } from "../composables/useVideoMedia.js";
|
|
9
|
+
import { useView, provideView } from "../composables/useView.js";
|
|
10
|
+
import { _ as _sfc_main$4 } from "./LpButton-DSHioIfD.js";
|
|
11
|
+
import { _ as _sfc_main$1 } from "./LpContextMenu-DIYhlap8.js";
|
|
12
|
+
import { _ as _sfc_main$7 } from "./LpDropdownMenu-zSsK2Xra.js";
|
|
13
|
+
import { _ as _sfc_main$2 } from "./LpIcon-CoOLz1oJ.js";
|
|
14
|
+
import { _ as _sfc_main$3 } from "./LpLoader-Bf1yZwaU.js";
|
|
15
|
+
import { _ as _sfc_main$6 } from "./SteadyText-CwH-kduj.js";
|
|
16
|
+
import VideoFlash from "../components/VideoFlash.vue.js";
|
|
17
|
+
import { _ as _sfc_main$5 } from "./VideoVolume-B4_DNmNi.js";
|
|
18
|
+
import { widestClipTime, formatClipTime } from "../components/videoBackdrop.js";
|
|
19
|
+
import { FrameSampler } from "../components/videoFrames.js";
|
|
20
|
+
import { FADE_SCALE, FADE, OVERLAY_BUTTON, ICON_SWAP } from "../components/videoMotion.js";
|
|
21
|
+
const _hoisted_1 = ["aria-label", "data-fullscreen"];
|
|
22
|
+
const _hoisted_2 = ["src", "poster", "loop", "muted"];
|
|
23
|
+
const _hoisted_3 = ["src"];
|
|
24
|
+
const _hoisted_4 = ["aria-label"];
|
|
25
|
+
const _hoisted_5 = {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: "pointer-events-none absolute inset-0 flex items-center justify-center"
|
|
28
|
+
};
|
|
29
|
+
const _hoisted_6 = {
|
|
30
|
+
key: 0,
|
|
31
|
+
role: "alert",
|
|
32
|
+
class: "absolute inset-0 flex flex-col items-center justify-center gap-2 p-4 text-center text-sm text-white/80"
|
|
33
|
+
};
|
|
34
|
+
const _hoisted_7 = ["aria-label", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-disabled"];
|
|
35
|
+
const _hoisted_8 = { class: "relative h-1 w-full overflow-hidden rounded-pill bg-white/25 transition-[height] duration-(--duration-fast) ease-(--ease-emphasized) group-hover/seek:h-1.5 group-focus-visible/seek:h-1.5 motion-reduce:transition-none" };
|
|
36
|
+
const _hoisted_9 = { class: "rounded-pill bg-black/70 px-2 py-0.5 font-mono text-xs text-white" };
|
|
37
|
+
const _hoisted_10 = { class: "mt-1 flex items-center gap-0.5" };
|
|
38
|
+
const _hoisted_11 = { class: "min-w-0 truncate px-1.5 font-mono text-xs text-white/70" };
|
|
39
|
+
const __default__ = { inheritAttrs: false };
|
|
40
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
41
|
+
...__default__,
|
|
42
|
+
__name: "LpVideoPlayer",
|
|
43
|
+
props: {
|
|
44
|
+
src: {},
|
|
45
|
+
poster: { default: void 0 },
|
|
46
|
+
title: { default: void 0 },
|
|
47
|
+
autoplay: { type: Boolean },
|
|
48
|
+
loop: { type: Boolean },
|
|
49
|
+
muted: { type: Boolean },
|
|
50
|
+
startAt: { default: 0 },
|
|
51
|
+
rates: { default: () => [0.5, 0.75, 1, 1.25, 1.5, 2] },
|
|
52
|
+
remember: { type: Boolean, default: true },
|
|
53
|
+
preview: { type: Boolean, default: true },
|
|
54
|
+
fit: { type: Boolean },
|
|
55
|
+
menuItems: { type: Function, default: void 0 },
|
|
56
|
+
labels: { default: () => ({}) }
|
|
57
|
+
},
|
|
58
|
+
emits: ["play", "pause", "ended", "error"],
|
|
59
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
60
|
+
const props = __props;
|
|
61
|
+
const emit = __emit;
|
|
62
|
+
const text = useLabels(
|
|
63
|
+
"videoPlayer",
|
|
64
|
+
{
|
|
65
|
+
player: "Video player — Space plays, arrows seek, F fullscreen",
|
|
66
|
+
play: "Play",
|
|
67
|
+
pause: "Pause",
|
|
68
|
+
replay: "Play again",
|
|
69
|
+
mute: "Mute",
|
|
70
|
+
unmute: "Unmute",
|
|
71
|
+
volume: "Volume",
|
|
72
|
+
speed: "Speed",
|
|
73
|
+
normalSpeed: "Normal",
|
|
74
|
+
fullscreen: "Full screen",
|
|
75
|
+
exitFullscreen: "Exit full screen",
|
|
76
|
+
pip: "Picture in picture",
|
|
77
|
+
exitPip: "Exit picture in picture",
|
|
78
|
+
captions: "Captions",
|
|
79
|
+
seek: "Seek",
|
|
80
|
+
failed: "This video couldn't be loaded.",
|
|
81
|
+
unsupported: "This browser can't play this video's format.",
|
|
82
|
+
/** `{n}` is replaced by seconds. */
|
|
83
|
+
back: "−{n} s",
|
|
84
|
+
forward: "+{n} s",
|
|
85
|
+
/** `{n}` is replaced by seconds. */
|
|
86
|
+
rewind: "Back {n} seconds",
|
|
87
|
+
fastForward: "Forward {n} seconds",
|
|
88
|
+
/** `{time}` is replaced by the playhead's time. */
|
|
89
|
+
menuAt: "At {time}",
|
|
90
|
+
copyTime: "Copy time",
|
|
91
|
+
copyFrame: "Copy frame",
|
|
92
|
+
copiedTime: "Time copied",
|
|
93
|
+
copiedFrame: "Frame copied",
|
|
94
|
+
copyFailed: "Couldn't copy"
|
|
95
|
+
},
|
|
96
|
+
() => props.labels
|
|
97
|
+
);
|
|
98
|
+
const rootEl = ref(null);
|
|
99
|
+
const videoEl = ref(null);
|
|
100
|
+
const media = useVideoMedia(videoEl, {
|
|
101
|
+
src: () => props.src,
|
|
102
|
+
remember: () => props.remember,
|
|
103
|
+
onError: (cause) => emit("error", { cause, message: cause === "unsupported" ? text.value.unsupported : text.value.failed })
|
|
104
|
+
});
|
|
105
|
+
const { duration, time, playing, wantsPlay, waiting, ended, muted, rate, buffered, failure, size } = media;
|
|
106
|
+
const ready = computed(() => duration.value > 0 && !failure.value);
|
|
107
|
+
const started = ref(false);
|
|
108
|
+
const widest = computed(() => widestClipTime(duration.value));
|
|
109
|
+
let prepared = "";
|
|
110
|
+
watch(ready, (ok) => {
|
|
111
|
+
if (!ok || prepared === props.src) return;
|
|
112
|
+
prepared = props.src;
|
|
113
|
+
if (props.startAt > 0) media.seek(props.startAt);
|
|
114
|
+
if (props.autoplay) media.play();
|
|
115
|
+
});
|
|
116
|
+
watch(() => props.src, () => {
|
|
117
|
+
started.value = false;
|
|
118
|
+
});
|
|
119
|
+
watch(playing, (on) => {
|
|
120
|
+
if (on) {
|
|
121
|
+
started.value = true;
|
|
122
|
+
emit("play");
|
|
123
|
+
} else emit("pause");
|
|
124
|
+
});
|
|
125
|
+
watch(ended, (on) => {
|
|
126
|
+
if (on) emit("ended");
|
|
127
|
+
});
|
|
128
|
+
const HIDE_AFTER_MS = 2500;
|
|
129
|
+
const awake = ref(true);
|
|
130
|
+
const menuOpen = ref(false);
|
|
131
|
+
const overControls = ref(false);
|
|
132
|
+
const scrubbing = ref(false);
|
|
133
|
+
let sleepTimer;
|
|
134
|
+
const showControls = computed(
|
|
135
|
+
() => !playing.value || awake.value || menuOpen.value || overControls.value || scrubbing.value || !!failure.value
|
|
136
|
+
);
|
|
137
|
+
function wake() {
|
|
138
|
+
awake.value = true;
|
|
139
|
+
clearTimeout(sleepTimer);
|
|
140
|
+
sleepTimer = setTimeout(() => awake.value = false, HIDE_AFTER_MS);
|
|
141
|
+
}
|
|
142
|
+
watch(playing, (on) => on && wake());
|
|
143
|
+
const osd = ref("");
|
|
144
|
+
let osdTimer;
|
|
145
|
+
function say(message) {
|
|
146
|
+
osd.value = message;
|
|
147
|
+
clearTimeout(osdTimer);
|
|
148
|
+
osdTimer = setTimeout(() => osd.value = "", 700);
|
|
149
|
+
}
|
|
150
|
+
const flash = ref(null);
|
|
151
|
+
function togglePlayback() {
|
|
152
|
+
if (!ready.value) return;
|
|
153
|
+
media.toggle();
|
|
154
|
+
flash.value = { icon: wantsPlay.value ? "lucide:play" : "lucide:pause", n: (flash.value?.n ?? 0) + 1 };
|
|
155
|
+
}
|
|
156
|
+
const SKIP = computed(() => duration.value >= 30 ? 10 : duration.value >= 10 ? 5 : 2);
|
|
157
|
+
const NUDGE = computed(() => duration.value >= 30 ? 5 : duration.value >= 10 ? 2 : 1);
|
|
158
|
+
function skip(seconds) {
|
|
159
|
+
if (!ready.value) return;
|
|
160
|
+
media.seek(time.value + seconds);
|
|
161
|
+
say((seconds < 0 ? text.value.back : text.value.forward).replace("{n}", String(Math.abs(seconds))));
|
|
162
|
+
}
|
|
163
|
+
function setVolumeBy(delta) {
|
|
164
|
+
media.setVolume(media.volume.value + delta);
|
|
165
|
+
say(`${Math.round(media.volume.value * 100)}%`);
|
|
166
|
+
}
|
|
167
|
+
const rateLabel = (r) => r === 1 ? text.value.normalSpeed : `${r}×`;
|
|
168
|
+
function setRate(r) {
|
|
169
|
+
media.setRate(r);
|
|
170
|
+
say(`${r}×`);
|
|
171
|
+
}
|
|
172
|
+
function stepRate(direction) {
|
|
173
|
+
const list = [...props.rates].sort((a, b) => a - b);
|
|
174
|
+
const at = list.findIndex((r) => r >= rate.value - 1e-6);
|
|
175
|
+
const next = list[Math.min(list.length - 1, Math.max(0, (at < 0 ? list.length - 1 : at) + direction))];
|
|
176
|
+
if (next !== void 0) setRate(next);
|
|
177
|
+
}
|
|
178
|
+
const { copy } = useClipboard();
|
|
179
|
+
const { error: toastError } = useToast();
|
|
180
|
+
function copyTime() {
|
|
181
|
+
void copy(formatClipTime(time.value, "fixed"), { toast: text.value.copiedTime, errorToast: text.value.copyFailed });
|
|
182
|
+
}
|
|
183
|
+
async function copyFrame() {
|
|
184
|
+
const blob = await media.captureFrame();
|
|
185
|
+
if (blob) void copy(blob, { toast: text.value.copiedFrame, errorToast: text.value.copyFailed });
|
|
186
|
+
else toastError(text.value.copyFailed);
|
|
187
|
+
}
|
|
188
|
+
const fullscreen = ref(false);
|
|
189
|
+
const canFullscreen = ref(false);
|
|
190
|
+
const pip = ref(false);
|
|
191
|
+
const canPip = ref(false);
|
|
192
|
+
const hasCaptions = ref(false);
|
|
193
|
+
const captionsOn = ref(false);
|
|
194
|
+
const outer = useView();
|
|
195
|
+
provideView(
|
|
196
|
+
computed(() => {
|
|
197
|
+
const root = rootEl.value;
|
|
198
|
+
if (!fullscreen.value || !root) return outer.value;
|
|
199
|
+
return { window: nodeWindow(root), document: root.ownerDocument, portal: root };
|
|
200
|
+
})
|
|
201
|
+
);
|
|
202
|
+
function syncFullscreen() {
|
|
203
|
+
const doc = rootEl.value?.ownerDocument;
|
|
204
|
+
fullscreen.value = !!doc && (doc.fullscreenElement ?? doc.webkitFullscreenElement) === rootEl.value;
|
|
205
|
+
}
|
|
206
|
+
function toggleFullscreen() {
|
|
207
|
+
const root = rootEl.value;
|
|
208
|
+
const video = videoEl.value;
|
|
209
|
+
if (!root || !video) return;
|
|
210
|
+
const doc = root.ownerDocument;
|
|
211
|
+
if (fullscreen.value) {
|
|
212
|
+
if (doc.exitFullscreen) void doc.exitFullscreen().catch(() => {
|
|
213
|
+
});
|
|
214
|
+
else doc.webkitExitFullscreen?.();
|
|
215
|
+
} else if (root.requestFullscreen) void root.requestFullscreen().catch(() => {
|
|
216
|
+
});
|
|
217
|
+
else if (root.webkitRequestFullscreen) root.webkitRequestFullscreen();
|
|
218
|
+
else video.webkitEnterFullscreen?.();
|
|
219
|
+
}
|
|
220
|
+
function syncPip() {
|
|
221
|
+
const video = videoEl.value;
|
|
222
|
+
if (!video) return;
|
|
223
|
+
pip.value = video.ownerDocument.pictureInPictureElement === video || video.webkitPresentationMode === "picture-in-picture";
|
|
224
|
+
}
|
|
225
|
+
function togglePip() {
|
|
226
|
+
const video = videoEl.value;
|
|
227
|
+
if (!video) return;
|
|
228
|
+
if (!video.requestPictureInPicture && video.webkitSetPresentationMode) {
|
|
229
|
+
video.webkitSetPresentationMode(pip.value ? "inline" : "picture-in-picture");
|
|
230
|
+
} else if (pip.value) void video.ownerDocument.exitPictureInPicture().catch(() => {
|
|
231
|
+
});
|
|
232
|
+
else void video.requestPictureInPicture().catch(() => {
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
function captionTrack() {
|
|
236
|
+
const tracks = videoEl.value?.textTracks;
|
|
237
|
+
if (!tracks) return null;
|
|
238
|
+
for (let i = 0; i < tracks.length; i++) {
|
|
239
|
+
const track = tracks[i];
|
|
240
|
+
if (track.kind === "subtitles" || track.kind === "captions") return track;
|
|
241
|
+
}
|
|
242
|
+
return null;
|
|
243
|
+
}
|
|
244
|
+
function syncCaptions() {
|
|
245
|
+
const track = captionTrack();
|
|
246
|
+
hasCaptions.value = !!track;
|
|
247
|
+
captionsOn.value = track?.mode === "showing";
|
|
248
|
+
}
|
|
249
|
+
function toggleCaptions() {
|
|
250
|
+
const track = captionTrack();
|
|
251
|
+
if (!track) return;
|
|
252
|
+
track.mode = track.mode === "showing" ? "disabled" : "showing";
|
|
253
|
+
syncCaptions();
|
|
254
|
+
}
|
|
255
|
+
const barEl = ref(null);
|
|
256
|
+
const hover = ref(null);
|
|
257
|
+
const pct = (t) => `${duration.value ? t / duration.value * 100 : 0}%`;
|
|
258
|
+
function fractionAt(clientX) {
|
|
259
|
+
const box = barEl.value?.getBoundingClientRect();
|
|
260
|
+
if (!box || !box.width) return 0;
|
|
261
|
+
return Math.min(1, Math.max(0, (clientX - box.left) / box.width));
|
|
262
|
+
}
|
|
263
|
+
function onBarDown(event) {
|
|
264
|
+
if (!ready.value || event.button !== 0) return;
|
|
265
|
+
const wasPlaying = media.wantsPlay.value;
|
|
266
|
+
media.pause({ instant: true });
|
|
267
|
+
scrubbing.value = true;
|
|
268
|
+
media.seek(fractionAt(event.clientX) * duration.value);
|
|
269
|
+
startPointerDrag(event, {
|
|
270
|
+
move: (e) => {
|
|
271
|
+
hover.value = fractionAt(e.clientX);
|
|
272
|
+
media.seek(hover.value * duration.value);
|
|
273
|
+
},
|
|
274
|
+
end: () => {
|
|
275
|
+
scrubbing.value = false;
|
|
276
|
+
if (wasPlaying) media.play();
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
function onBarHover(event) {
|
|
281
|
+
if (!ready.value) return;
|
|
282
|
+
hover.value = fractionAt(event.clientX);
|
|
283
|
+
if (props.preview && event.pointerType === "mouse") wantPreview(hover.value * duration.value);
|
|
284
|
+
}
|
|
285
|
+
const PREVIEW = { width: 160, height: 90 };
|
|
286
|
+
const samplerEl = ref(null);
|
|
287
|
+
const previewWanted = ref(false);
|
|
288
|
+
const previewFrame = shallowRef(null);
|
|
289
|
+
let sampler = null;
|
|
290
|
+
let previewKey = "";
|
|
291
|
+
function wantPreview(t) {
|
|
292
|
+
if (!previewWanted.value) {
|
|
293
|
+
previewWanted.value = true;
|
|
294
|
+
void nextTick(() => {
|
|
295
|
+
if (!samplerEl.value) return;
|
|
296
|
+
sampler = new FrameSampler(samplerEl.value, () => PREVIEW, (key, canvas) => {
|
|
297
|
+
if (key === previewKey) previewFrame.value = canvas;
|
|
298
|
+
});
|
|
299
|
+
wantPreview(t);
|
|
300
|
+
});
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
const grain = Math.max(1, duration.value / 200);
|
|
304
|
+
const at = Math.round(t / grain) * grain;
|
|
305
|
+
previewKey = String(at);
|
|
306
|
+
const hit = sampler?.cached(previewKey);
|
|
307
|
+
if (hit) previewFrame.value = hit;
|
|
308
|
+
else sampler?.want([{ key: previewKey, time: at }]);
|
|
309
|
+
}
|
|
310
|
+
function mountPreview(el) {
|
|
311
|
+
if (isHTMLElement(el) && previewFrame.value && previewFrame.value.parentElement !== el) el.replaceChildren(previewFrame.value);
|
|
312
|
+
}
|
|
313
|
+
const previewSize = computed(() => {
|
|
314
|
+
const { width, height } = size.value;
|
|
315
|
+
return width && height ? { width: PREVIEW.width, height: Math.round(PREVIEW.width * height / width) } : PREVIEW;
|
|
316
|
+
});
|
|
317
|
+
function onKeydown(event) {
|
|
318
|
+
const target = event.target;
|
|
319
|
+
if (event.defaultPrevented || event.ctrlKey || event.metaKey || event.altKey) return;
|
|
320
|
+
if (target.closest("input, textarea, select, [contenteditable='true']")) return;
|
|
321
|
+
if (target.getAttribute("role") === "slider" && target !== barEl.value) return;
|
|
322
|
+
const key = event.key;
|
|
323
|
+
const actions = {
|
|
324
|
+
" ": togglePlayback,
|
|
325
|
+
k: togglePlayback,
|
|
326
|
+
j: () => skip(-SKIP.value),
|
|
327
|
+
l: () => skip(SKIP.value),
|
|
328
|
+
ArrowLeft: () => skip(-NUDGE.value),
|
|
329
|
+
ArrowRight: () => skip(NUDGE.value),
|
|
330
|
+
ArrowUp: () => setVolumeBy(0.1),
|
|
331
|
+
ArrowDown: () => setVolumeBy(-0.1),
|
|
332
|
+
m: () => media.setMuted(!muted.value),
|
|
333
|
+
f: () => toggleFullscreen(),
|
|
334
|
+
c: () => toggleCaptions(),
|
|
335
|
+
Home: () => media.seek(0),
|
|
336
|
+
End: () => media.seek(duration.value),
|
|
337
|
+
"<": () => stepRate(-1),
|
|
338
|
+
">": () => stepRate(1)
|
|
339
|
+
};
|
|
340
|
+
const digit = /^[0-9]$/.test(key) ? () => media.seek(Number(key) / 10 * duration.value) : void 0;
|
|
341
|
+
const run = actions[key.length === 1 ? key.toLowerCase() : key] ?? actions[key] ?? digit;
|
|
342
|
+
if (!run || key === " " && target.tagName === "BUTTON" || !ready.value && key !== " ") return;
|
|
343
|
+
event.preventDefault();
|
|
344
|
+
run();
|
|
345
|
+
wake();
|
|
346
|
+
}
|
|
347
|
+
let lastTap = { at: 0, side: 0 };
|
|
348
|
+
let tapTimer;
|
|
349
|
+
function onPictureUp(event) {
|
|
350
|
+
if (event.pointerType !== "touch" || !ready.value) return;
|
|
351
|
+
const box = event.currentTarget.getBoundingClientRect();
|
|
352
|
+
const x = (event.clientX - box.left) / box.width;
|
|
353
|
+
const side = x < 1 / 3 ? -1 : x > 2 / 3 ? 1 : 0;
|
|
354
|
+
const now = event.timeStamp;
|
|
355
|
+
if (now - lastTap.at < 300 && side !== 0 && side === lastTap.side) {
|
|
356
|
+
clearTimeout(tapTimer);
|
|
357
|
+
skip(side * SKIP.value);
|
|
358
|
+
lastTap = { at: 0, side: 0 };
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
361
|
+
lastTap = { at: now, side };
|
|
362
|
+
clearTimeout(tapTimer);
|
|
363
|
+
tapTimer = setTimeout(() => {
|
|
364
|
+
if (showControls.value && playing.value) awake.value = false;
|
|
365
|
+
else wake();
|
|
366
|
+
}, 300);
|
|
367
|
+
}
|
|
368
|
+
function onPictureClick(event) {
|
|
369
|
+
if (event.pointerType === "touch") return;
|
|
370
|
+
togglePlayback();
|
|
371
|
+
}
|
|
372
|
+
const rateItems = computed(
|
|
373
|
+
() => props.rates.map((r) => ({ label: rateLabel(r), icon: Math.abs(r - rate.value) < 1e-6 ? "lucide:check" : void 0, onSelect: () => setRate(r) }))
|
|
374
|
+
);
|
|
375
|
+
const menu = computed(() => {
|
|
376
|
+
if (!ready.value) return [];
|
|
377
|
+
const items = [
|
|
378
|
+
{ label: wantsPlay.value ? text.value.pause : text.value.play, icon: wantsPlay.value ? "lucide:pause" : "lucide:play", shortcut: "Space", onSelect: () => media.toggle() },
|
|
379
|
+
{ label: muted.value ? text.value.unmute : text.value.mute, icon: muted.value ? "lucide:volume-2" : "lucide:volume-x", shortcut: "M", onSelect: () => media.setMuted(!muted.value) },
|
|
380
|
+
{ label: text.value.rewind.replace("{n}", String(SKIP.value)), icon: "lucide:rewind", shortcut: "J", separatorBefore: true, onSelect: () => skip(-SKIP.value) },
|
|
381
|
+
{ label: text.value.fastForward.replace("{n}", String(SKIP.value)), icon: "lucide:fast-forward", shortcut: "L", onSelect: () => skip(SKIP.value) },
|
|
382
|
+
{ label: text.value.speed, icon: "lucide:gauge", separatorBefore: true, children: rateItems.value }
|
|
383
|
+
];
|
|
384
|
+
if (hasCaptions.value) items.push({ label: text.value.captions, icon: "lucide:captions", shortcut: "C", checked: captionsOn.value, onSelect: toggleCaptions });
|
|
385
|
+
if (canPip.value) items.push({ label: pip.value ? text.value.exitPip : text.value.pip, icon: "lucide:picture-in-picture-2", onSelect: togglePip });
|
|
386
|
+
if (canFullscreen.value) items.push({ label: fullscreen.value ? text.value.exitFullscreen : text.value.fullscreen, icon: fullscreen.value ? "lucide:minimize" : "lucide:maximize", shortcut: "F", onSelect: toggleFullscreen });
|
|
387
|
+
items.push(
|
|
388
|
+
{ label: text.value.copyTime, icon: "lucide:clock", separatorBefore: true, onSelect: copyTime },
|
|
389
|
+
{ label: text.value.copyFrame, icon: "lucide:image", onSelect: () => void copyFrame() }
|
|
390
|
+
);
|
|
391
|
+
const extra = props.menuItems?.() ?? [];
|
|
392
|
+
return [...items, ...extra.map((item, i) => i === 0 ? { ...item, separatorBefore: true } : item)];
|
|
393
|
+
});
|
|
394
|
+
const menuTitle = computed(() => text.value.menuAt.replace("{time}", formatClipTime(time.value, "fixed")));
|
|
395
|
+
onMounted(() => {
|
|
396
|
+
const root = rootEl.value;
|
|
397
|
+
const video = videoEl.value;
|
|
398
|
+
if (!root || !video) return;
|
|
399
|
+
const doc = root.ownerDocument;
|
|
400
|
+
canFullscreen.value = !!(root.requestFullscreen || root.webkitRequestFullscreen || video.webkitEnterFullscreen);
|
|
401
|
+
canPip.value = !!doc.pictureInPictureEnabled && !video.disablePictureInPicture || !!video.webkitSupportsPresentationMode?.("picture-in-picture");
|
|
402
|
+
doc.addEventListener("fullscreenchange", syncFullscreen);
|
|
403
|
+
doc.addEventListener("webkitfullscreenchange", syncFullscreen);
|
|
404
|
+
video.textTracks.addEventListener?.("addtrack", syncCaptions);
|
|
405
|
+
video.textTracks.addEventListener?.("change", syncCaptions);
|
|
406
|
+
syncCaptions();
|
|
407
|
+
});
|
|
408
|
+
onBeforeUnmount(() => {
|
|
409
|
+
clearTimeout(sleepTimer);
|
|
410
|
+
clearTimeout(osdTimer);
|
|
411
|
+
clearTimeout(tapTimer);
|
|
412
|
+
sampler?.dispose();
|
|
413
|
+
const doc = rootEl.value?.ownerDocument;
|
|
414
|
+
doc?.removeEventListener("fullscreenchange", syncFullscreen);
|
|
415
|
+
doc?.removeEventListener("webkitfullscreenchange", syncFullscreen);
|
|
416
|
+
const stills = samplerEl.value;
|
|
417
|
+
if (stills) {
|
|
418
|
+
stills.removeAttribute("src");
|
|
419
|
+
stills.load();
|
|
420
|
+
}
|
|
421
|
+
});
|
|
422
|
+
__expose({
|
|
423
|
+
play: media.play,
|
|
424
|
+
pause: media.pause,
|
|
425
|
+
toggle: togglePlayback,
|
|
426
|
+
seek: media.seek,
|
|
427
|
+
currentTime: () => time.value,
|
|
428
|
+
/** The frame on screen as a PNG, or null where it cannot be read back. */
|
|
429
|
+
captureFrame: media.captureFrame
|
|
430
|
+
});
|
|
431
|
+
const FRAME = "overflow-hidden rounded-card bg-black";
|
|
432
|
+
const { class: rootClass, attrs: rest } = useMergedAttrs(
|
|
433
|
+
() => props.fit ? "group/player relative flex size-full items-center justify-center text-white outline-none select-none [container-type:size] focus-visible:ring-2 focus-visible:ring-ring" : `group/player relative block w-full ${FRAME} text-white outline-none select-none focus-visible:ring-2 focus-visible:ring-ring`
|
|
434
|
+
);
|
|
435
|
+
const ratio = computed(() => size.value.width && size.value.height ? size.value.width / size.value.height : 16 / 9);
|
|
436
|
+
const aspect = computed(() => size.value.width && size.value.height ? `${size.value.width} / ${size.value.height}` : "16 / 9");
|
|
437
|
+
const frameStyle = computed(() => {
|
|
438
|
+
if (!props.fit || fullscreen.value) return void 0;
|
|
439
|
+
const natural = size.value.width ? `max(${size.value.width}px, 28rem)` : "100cqw";
|
|
440
|
+
return { width: `min(100cqw, calc(100cqh * ${ratio.value}), ${natural})` };
|
|
441
|
+
});
|
|
442
|
+
return (_ctx, _cache) => {
|
|
443
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
444
|
+
ref_key: "rootEl",
|
|
445
|
+
ref: rootEl,
|
|
446
|
+
class: [unref(rootClass), fullscreen.value ? "rounded-none" : "", unref(playing) && !showControls.value ? "cursor-none" : ""]
|
|
447
|
+
}, unref(rest), {
|
|
448
|
+
tabindex: "0",
|
|
449
|
+
role: "region",
|
|
450
|
+
"aria-label": __props.title ?? unref(text).player,
|
|
451
|
+
"data-fullscreen": fullscreen.value || void 0,
|
|
452
|
+
onKeydown,
|
|
453
|
+
onPointermove: wake,
|
|
454
|
+
onFocusin: wake
|
|
455
|
+
}), [
|
|
456
|
+
createVNode(_sfc_main$1, {
|
|
457
|
+
items: menu.value,
|
|
458
|
+
title: menuTitle.value,
|
|
459
|
+
always: ""
|
|
460
|
+
}, {
|
|
461
|
+
default: withCtx(() => [
|
|
462
|
+
createElementVNode("div", {
|
|
463
|
+
class: normalizeClass(["@container", __props.fit && !fullscreen.value ? FRAME : ""]),
|
|
464
|
+
style: normalizeStyle(frameStyle.value),
|
|
465
|
+
"data-lp-video-frame": ""
|
|
466
|
+
}, [
|
|
467
|
+
createElementVNode("div", {
|
|
468
|
+
class: normalizeClass(["relative w-full", fullscreen.value ? "h-dvh" : ""]),
|
|
469
|
+
style: normalizeStyle(fullscreen.value ? void 0 : { aspectRatio: aspect.value })
|
|
470
|
+
}, [
|
|
471
|
+
createElementVNode("video", mergeProps({
|
|
472
|
+
ref_key: "videoEl",
|
|
473
|
+
ref: videoEl,
|
|
474
|
+
class: "absolute inset-0 size-full object-contain",
|
|
475
|
+
src: __props.src,
|
|
476
|
+
poster: __props.poster,
|
|
477
|
+
loop: __props.loop,
|
|
478
|
+
muted: _ctx.$props.muted,
|
|
479
|
+
preload: "metadata",
|
|
480
|
+
playsinline: ""
|
|
481
|
+
}, toHandlers(unref(media).listeners, true), {
|
|
482
|
+
onEnterpictureinpicture: syncPip,
|
|
483
|
+
onLeavepictureinpicture: syncPip,
|
|
484
|
+
onWebkitpresentationmodechanged: syncPip,
|
|
485
|
+
onClick: onPictureClick,
|
|
486
|
+
onDblclick: _cache[0] || (_cache[0] = ($event) => canFullscreen.value && toggleFullscreen()),
|
|
487
|
+
onPointerup: onPictureUp
|
|
488
|
+
}), [
|
|
489
|
+
renderSlot(_ctx.$slots, "default")
|
|
490
|
+
], 16, _hoisted_2),
|
|
491
|
+
createVNode(VideoFlash, { flash: flash.value }, null, 8, ["flash"]),
|
|
492
|
+
previewWanted.value ? (openBlock(), createElementBlock("video", {
|
|
493
|
+
key: 0,
|
|
494
|
+
ref_key: "samplerEl",
|
|
495
|
+
ref: samplerEl,
|
|
496
|
+
class: "pointer-events-none absolute size-px opacity-0",
|
|
497
|
+
src: __props.src,
|
|
498
|
+
preload: "metadata",
|
|
499
|
+
muted: "",
|
|
500
|
+
playsinline: "",
|
|
501
|
+
"aria-hidden": "true",
|
|
502
|
+
tabindex: "-1"
|
|
503
|
+
}, null, 8, _hoisted_3)) : createCommentVNode("", true),
|
|
504
|
+
createVNode(Transition, normalizeProps(guardReactiveProps(unref(FADE_SCALE))), {
|
|
505
|
+
default: withCtx(() => [
|
|
506
|
+
ready.value && (!started.value || unref(ended)) && !unref(wantsPlay) ? (openBlock(), createElementBlock("button", {
|
|
507
|
+
key: 0,
|
|
508
|
+
type: "button",
|
|
509
|
+
class: "absolute top-1/2 left-1/2 flex size-16 -translate-1/2 items-center justify-center rounded-full bg-black/45 text-white shadow-lg ring-1 ring-white/20 outline-none transition-[background-color,scale] duration-(--duration-fast) ease-(--ease-emphasized) hover:scale-105 hover:bg-black/60 focus-visible:ring-2 focus-visible:ring-ring active:scale-95 motion-reduce:transition-none motion-reduce:hover:scale-100 motion-reduce:active:scale-100",
|
|
510
|
+
"aria-label": unref(ended) ? unref(text).replay : unref(text).play,
|
|
511
|
+
tabindex: "-1",
|
|
512
|
+
onClick: withModifiers(togglePlayback, ["stop"])
|
|
513
|
+
}, [
|
|
514
|
+
createVNode(_sfc_main$2, {
|
|
515
|
+
name: unref(ended) ? "lucide:rotate-ccw" : "lucide:play",
|
|
516
|
+
size: 28,
|
|
517
|
+
class: normalizeClass(unref(ended) ? "" : "translate-x-0.5")
|
|
518
|
+
}, null, 8, ["name", "class"])
|
|
519
|
+
], 8, _hoisted_4)) : createCommentVNode("", true)
|
|
520
|
+
]),
|
|
521
|
+
_: 1
|
|
522
|
+
}, 16),
|
|
523
|
+
createVNode(Transition, normalizeProps(guardReactiveProps(unref(FADE))), {
|
|
524
|
+
default: withCtx(() => [
|
|
525
|
+
unref(waiting) && unref(playing) ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
526
|
+
createVNode(_sfc_main$3, {
|
|
527
|
+
size: "lg",
|
|
528
|
+
class: "text-white"
|
|
529
|
+
})
|
|
530
|
+
])) : createCommentVNode("", true)
|
|
531
|
+
]),
|
|
532
|
+
_: 1
|
|
533
|
+
}, 16),
|
|
534
|
+
createVNode(Transition, normalizeProps(guardReactiveProps(unref(FADE))), {
|
|
535
|
+
default: withCtx(() => [
|
|
536
|
+
osd.value ? (openBlock(), createElementBlock("span", {
|
|
537
|
+
key: osd.value,
|
|
538
|
+
class: "pointer-events-none absolute top-4 left-1/2 -translate-x-1/2 rounded-pill bg-black/55 px-3 py-1 text-sm font-medium tabular-nums text-white",
|
|
539
|
+
"aria-live": "polite"
|
|
540
|
+
}, toDisplayString(osd.value), 1)) : createCommentVNode("", true)
|
|
541
|
+
]),
|
|
542
|
+
_: 1
|
|
543
|
+
}, 16),
|
|
544
|
+
createVNode(Transition, normalizeProps(guardReactiveProps(unref(FADE))), {
|
|
545
|
+
default: withCtx(() => [
|
|
546
|
+
unref(failure) ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
547
|
+
createVNode(_sfc_main$2, {
|
|
548
|
+
name: "lucide:video-off",
|
|
549
|
+
size: 32
|
|
550
|
+
}),
|
|
551
|
+
createElementVNode("p", null, toDisplayString(unref(failure) === "unsupported" ? unref(text).unsupported : unref(text).failed), 1)
|
|
552
|
+
])) : createCommentVNode("", true)
|
|
553
|
+
]),
|
|
554
|
+
_: 1
|
|
555
|
+
}, 16),
|
|
556
|
+
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", {
|
|
557
|
+
key: 1,
|
|
558
|
+
class: normalizeClass(["absolute inset-x-0 top-0 flex justify-end gap-0.5 bg-linear-to-b from-black/55 to-transparent px-2 pt-2 pb-8 transition-opacity duration-(--duration-medium) ease-(--ease-emphasized) motion-reduce:transition-none", showControls.value ? "" : "pointer-events-none opacity-0"]),
|
|
559
|
+
onPointerenter: _cache[1] || (_cache[1] = ($event) => overControls.value = true),
|
|
560
|
+
onPointerleave: _cache[2] || (_cache[2] = ($event) => overControls.value = false)
|
|
561
|
+
}, [
|
|
562
|
+
renderSlot(_ctx.$slots, "actions", { buttonClass: unref(OVERLAY_BUTTON) })
|
|
563
|
+
], 34)) : createCommentVNode("", true),
|
|
564
|
+
createElementVNode("div", {
|
|
565
|
+
class: normalizeClass(["absolute inset-x-0 bottom-0 bg-linear-to-t from-black/75 via-black/35 to-transparent px-3 pt-12 pb-2 transition-opacity duration-(--duration-medium) ease-(--ease-emphasized) motion-reduce:transition-none", showControls.value && !unref(failure) ? "" : "pointer-events-none opacity-0"]),
|
|
566
|
+
"data-lp-player-controls": "",
|
|
567
|
+
onPointerenter: _cache[8] || (_cache[8] = ($event) => overControls.value = true),
|
|
568
|
+
onPointerleave: _cache[9] || (_cache[9] = ($event) => {
|
|
569
|
+
overControls.value = false;
|
|
570
|
+
hover.value = null;
|
|
571
|
+
})
|
|
572
|
+
}, [
|
|
573
|
+
createElementVNode("div", {
|
|
574
|
+
ref_key: "barEl",
|
|
575
|
+
ref: barEl,
|
|
576
|
+
class: "group/seek relative flex h-4 cursor-pointer touch-none items-center outline-none",
|
|
577
|
+
role: "slider",
|
|
578
|
+
tabindex: "0",
|
|
579
|
+
"aria-label": unref(text).seek,
|
|
580
|
+
"aria-valuemin": 0,
|
|
581
|
+
"aria-valuemax": Math.round(unref(duration) * 10) / 10,
|
|
582
|
+
"aria-valuenow": Math.round(unref(time) * 10) / 10,
|
|
583
|
+
"aria-valuetext": unref(formatClipTime)(unref(time), "fixed"),
|
|
584
|
+
"aria-disabled": !ready.value || void 0,
|
|
585
|
+
onPointerdown: onBarDown,
|
|
586
|
+
onPointermove: onBarHover,
|
|
587
|
+
onPointerleave: _cache[3] || (_cache[3] = ($event) => !scrubbing.value && (hover.value = null))
|
|
588
|
+
}, [
|
|
589
|
+
createElementVNode("div", _hoisted_8, [
|
|
590
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(buffered), (b, i) => {
|
|
591
|
+
return openBlock(), createElementBlock("span", {
|
|
592
|
+
key: i,
|
|
593
|
+
class: "absolute inset-y-0 bg-white/35",
|
|
594
|
+
style: normalizeStyle({ left: `${b[0] * 100}%`, width: `${(b[1] - b[0]) * 100}%` })
|
|
595
|
+
}, null, 4);
|
|
596
|
+
}), 128)),
|
|
597
|
+
hover.value !== null ? (openBlock(), createElementBlock("span", {
|
|
598
|
+
key: 0,
|
|
599
|
+
class: "absolute inset-y-0 left-0 bg-white/25",
|
|
600
|
+
style: normalizeStyle({ width: `${hover.value * 100}%` })
|
|
601
|
+
}, null, 4)) : createCommentVNode("", true),
|
|
602
|
+
createElementVNode("span", {
|
|
603
|
+
class: "absolute inset-y-0 left-0 bg-white",
|
|
604
|
+
style: normalizeStyle({ width: pct(unref(time)) })
|
|
605
|
+
}, null, 4)
|
|
606
|
+
]),
|
|
607
|
+
createElementVNode("span", {
|
|
608
|
+
class: normalizeClass(["pointer-events-none absolute top-1/2 size-3 -translate-1/2 scale-0 rounded-full bg-white shadow transition-transform duration-(--duration-fast) ease-(--ease-emphasized) group-hover/seek:scale-100 group-focus-visible/seek:scale-100 group-focus-visible/seek:ring-2 group-focus-visible/seek:ring-ring motion-reduce:transition-none", scrubbing.value ? "scale-100" : ""]),
|
|
609
|
+
style: normalizeStyle({ left: pct(unref(time)) })
|
|
610
|
+
}, null, 6),
|
|
611
|
+
createVNode(Transition, normalizeProps(guardReactiveProps(unref(FADE))), {
|
|
612
|
+
default: withCtx(() => [
|
|
613
|
+
hover.value !== null && ready.value ? (openBlock(), createElementBlock("div", {
|
|
614
|
+
key: 0,
|
|
615
|
+
class: "pointer-events-none absolute bottom-full mb-2 flex -translate-x-1/2 flex-col items-center gap-1",
|
|
616
|
+
style: normalizeStyle({ left: `clamp(${__props.preview && previewFrame.value ? previewSize.value.width / 2 : 28}px, ${hover.value * 100}%, calc(100% - ${__props.preview && previewFrame.value ? previewSize.value.width / 2 : 28}px))` })
|
|
617
|
+
}, [
|
|
618
|
+
__props.preview && previewFrame.value ? (openBlock(), createElementBlock("div", {
|
|
619
|
+
key: 0,
|
|
620
|
+
ref: (el) => mountPreview(el),
|
|
621
|
+
class: "overflow-hidden rounded-control bg-black shadow-lg ring-1 ring-white/20 [&>canvas]:size-full [&>canvas]:object-cover",
|
|
622
|
+
style: normalizeStyle({ width: `${previewSize.value.width}px`, height: `${previewSize.value.height}px` })
|
|
623
|
+
}, null, 4)) : createCommentVNode("", true),
|
|
624
|
+
createElementVNode("span", _hoisted_9, toDisplayString(unref(formatClipTime)(hover.value * unref(duration), "fixed")), 1)
|
|
625
|
+
], 4)) : createCommentVNode("", true)
|
|
626
|
+
]),
|
|
627
|
+
_: 1
|
|
628
|
+
}, 16)
|
|
629
|
+
], 40, _hoisted_7),
|
|
630
|
+
createElementVNode("div", _hoisted_10, [
|
|
631
|
+
createVNode(_sfc_main$4, {
|
|
632
|
+
size: "sm",
|
|
633
|
+
variant: "ghost",
|
|
634
|
+
square: "",
|
|
635
|
+
class: normalizeClass(unref(OVERLAY_BUTTON)),
|
|
636
|
+
disabled: !ready.value,
|
|
637
|
+
"aria-label": unref(wantsPlay) ? unref(text).pause : unref(ended) ? unref(text).replay : unref(text).play,
|
|
638
|
+
title: unref(wantsPlay) ? unref(text).pause : unref(text).play,
|
|
639
|
+
onClick: _cache[4] || (_cache[4] = ($event) => unref(media).toggle())
|
|
640
|
+
}, {
|
|
641
|
+
default: withCtx(() => [
|
|
642
|
+
createVNode(Transition, normalizeProps(guardReactiveProps(unref(ICON_SWAP))), {
|
|
643
|
+
default: withCtx(() => [
|
|
644
|
+
(openBlock(), createBlock(_sfc_main$2, {
|
|
645
|
+
key: unref(wantsPlay) ? "pause" : unref(ended) ? "replay" : "play",
|
|
646
|
+
name: unref(wantsPlay) ? "lucide:pause" : unref(ended) ? "lucide:rotate-ccw" : "lucide:play",
|
|
647
|
+
size: 16
|
|
648
|
+
}, null, 8, ["name"]))
|
|
649
|
+
]),
|
|
650
|
+
_: 1
|
|
651
|
+
}, 16)
|
|
652
|
+
]),
|
|
653
|
+
_: 1
|
|
654
|
+
}, 8, ["class", "disabled", "aria-label", "title"]),
|
|
655
|
+
createVNode(_sfc_main$4, {
|
|
656
|
+
size: "sm",
|
|
657
|
+
variant: "ghost",
|
|
658
|
+
square: "",
|
|
659
|
+
class: normalizeClass([unref(OVERLAY_BUTTON), "@max-[26rem]:hidden"]),
|
|
660
|
+
disabled: !ready.value,
|
|
661
|
+
"aria-label": unref(text).rewind.replace("{n}", String(SKIP.value)),
|
|
662
|
+
title: unref(text).rewind.replace("{n}", String(SKIP.value)),
|
|
663
|
+
onClick: _cache[5] || (_cache[5] = ($event) => skip(-SKIP.value))
|
|
664
|
+
}, {
|
|
665
|
+
default: withCtx(() => [
|
|
666
|
+
createVNode(_sfc_main$2, {
|
|
667
|
+
name: "lucide:rewind",
|
|
668
|
+
size: 16
|
|
669
|
+
})
|
|
670
|
+
]),
|
|
671
|
+
_: 1
|
|
672
|
+
}, 8, ["class", "disabled", "aria-label", "title"]),
|
|
673
|
+
createVNode(_sfc_main$4, {
|
|
674
|
+
size: "sm",
|
|
675
|
+
variant: "ghost",
|
|
676
|
+
square: "",
|
|
677
|
+
class: normalizeClass([unref(OVERLAY_BUTTON), "@max-[26rem]:hidden"]),
|
|
678
|
+
disabled: !ready.value,
|
|
679
|
+
"aria-label": unref(text).fastForward.replace("{n}", String(SKIP.value)),
|
|
680
|
+
title: unref(text).fastForward.replace("{n}", String(SKIP.value)),
|
|
681
|
+
onClick: _cache[6] || (_cache[6] = ($event) => skip(SKIP.value))
|
|
682
|
+
}, {
|
|
683
|
+
default: withCtx(() => [
|
|
684
|
+
createVNode(_sfc_main$2, {
|
|
685
|
+
name: "lucide:fast-forward",
|
|
686
|
+
size: 16
|
|
687
|
+
})
|
|
688
|
+
]),
|
|
689
|
+
_: 1
|
|
690
|
+
}, 8, ["class", "disabled", "aria-label", "title"]),
|
|
691
|
+
createVNode(_sfc_main$5, {
|
|
692
|
+
media: unref(media),
|
|
693
|
+
labels: unref(text),
|
|
694
|
+
disabled: !ready.value,
|
|
695
|
+
overlay: ""
|
|
696
|
+
}, null, 8, ["media", "labels", "disabled"]),
|
|
697
|
+
createElementVNode("span", _hoisted_11, [
|
|
698
|
+
createVNode(_sfc_main$6, {
|
|
699
|
+
class: "text-white",
|
|
700
|
+
text: unref(formatClipTime)(unref(time), "fixed"),
|
|
701
|
+
widest: widest.value
|
|
702
|
+
}, null, 8, ["text", "widest"]),
|
|
703
|
+
createTextVNode(" / " + toDisplayString(unref(formatClipTime)(unref(duration), "fixed")), 1)
|
|
704
|
+
]),
|
|
705
|
+
_cache[10] || (_cache[10] = createElementVNode("span", { class: "flex-1" }, null, -1)),
|
|
706
|
+
createVNode(Transition, normalizeProps(guardReactiveProps(unref(FADE_SCALE))), {
|
|
707
|
+
default: withCtx(() => [
|
|
708
|
+
hasCaptions.value ? (openBlock(), createBlock(_sfc_main$4, {
|
|
709
|
+
key: 0,
|
|
710
|
+
size: "sm",
|
|
711
|
+
variant: "ghost",
|
|
712
|
+
square: "",
|
|
713
|
+
class: normalizeClass([unref(OVERLAY_BUTTON), captionsOn.value ? "bg-white/15 text-white" : ""]),
|
|
714
|
+
"aria-label": unref(text).captions,
|
|
715
|
+
title: unref(text).captions,
|
|
716
|
+
"aria-pressed": captionsOn.value,
|
|
717
|
+
onClick: toggleCaptions
|
|
718
|
+
}, {
|
|
719
|
+
default: withCtx(() => [
|
|
720
|
+
createVNode(_sfc_main$2, {
|
|
721
|
+
name: "lucide:captions",
|
|
722
|
+
size: 16
|
|
723
|
+
})
|
|
724
|
+
]),
|
|
725
|
+
_: 1
|
|
726
|
+
}, 8, ["class", "aria-label", "title", "aria-pressed"])) : createCommentVNode("", true)
|
|
727
|
+
]),
|
|
728
|
+
_: 1
|
|
729
|
+
}, 16),
|
|
730
|
+
renderSlot(_ctx.$slots, "controls", { buttonClass: unref(OVERLAY_BUTTON) }),
|
|
731
|
+
createVNode(_sfc_main$7, {
|
|
732
|
+
items: rateItems.value,
|
|
733
|
+
title: unref(text).speed,
|
|
734
|
+
"onUpdate:open": _cache[7] || (_cache[7] = (open) => menuOpen.value = open)
|
|
735
|
+
}, {
|
|
736
|
+
trigger: withCtx(() => [
|
|
737
|
+
createVNode(_sfc_main$4, {
|
|
738
|
+
size: "sm",
|
|
739
|
+
variant: "ghost",
|
|
740
|
+
class: normalizeClass(["min-w-12 px-2 font-mono text-xs @max-[18rem]:hidden", unref(OVERLAY_BUTTON)]),
|
|
741
|
+
disabled: !ready.value,
|
|
742
|
+
"aria-label": unref(text).speed,
|
|
743
|
+
title: unref(text).speed
|
|
744
|
+
}, {
|
|
745
|
+
default: withCtx(() => [
|
|
746
|
+
createVNode(_sfc_main$6, {
|
|
747
|
+
text: `${unref(rate)}×`,
|
|
748
|
+
widest: `${Math.max(...__props.rates)}×`.replace(/\d/g, "0")
|
|
749
|
+
}, null, 8, ["text", "widest"])
|
|
750
|
+
]),
|
|
751
|
+
_: 1
|
|
752
|
+
}, 8, ["class", "disabled", "aria-label", "title"])
|
|
753
|
+
]),
|
|
754
|
+
_: 1
|
|
755
|
+
}, 8, ["items", "title"]),
|
|
756
|
+
canPip.value ? (openBlock(), createBlock(_sfc_main$4, {
|
|
757
|
+
key: 0,
|
|
758
|
+
size: "sm",
|
|
759
|
+
variant: "ghost",
|
|
760
|
+
square: "",
|
|
761
|
+
class: normalizeClass([unref(OVERLAY_BUTTON), "@max-[22rem]:hidden"]),
|
|
762
|
+
disabled: !ready.value,
|
|
763
|
+
"aria-label": pip.value ? unref(text).exitPip : unref(text).pip,
|
|
764
|
+
title: pip.value ? unref(text).exitPip : unref(text).pip,
|
|
765
|
+
"aria-pressed": pip.value,
|
|
766
|
+
onClick: togglePip
|
|
767
|
+
}, {
|
|
768
|
+
default: withCtx(() => [
|
|
769
|
+
createVNode(_sfc_main$2, {
|
|
770
|
+
name: "lucide:picture-in-picture-2",
|
|
771
|
+
size: 16
|
|
772
|
+
})
|
|
773
|
+
]),
|
|
774
|
+
_: 1
|
|
775
|
+
}, 8, ["class", "disabled", "aria-label", "title", "aria-pressed"])) : createCommentVNode("", true),
|
|
776
|
+
canFullscreen.value ? (openBlock(), createBlock(_sfc_main$4, {
|
|
777
|
+
key: 1,
|
|
778
|
+
size: "sm",
|
|
779
|
+
variant: "ghost",
|
|
780
|
+
square: "",
|
|
781
|
+
class: normalizeClass(unref(OVERLAY_BUTTON)),
|
|
782
|
+
"aria-label": fullscreen.value ? unref(text).exitFullscreen : unref(text).fullscreen,
|
|
783
|
+
title: fullscreen.value ? unref(text).exitFullscreen : unref(text).fullscreen,
|
|
784
|
+
onClick: toggleFullscreen
|
|
785
|
+
}, {
|
|
786
|
+
default: withCtx(() => [
|
|
787
|
+
createVNode(Transition, normalizeProps(guardReactiveProps(unref(ICON_SWAP))), {
|
|
788
|
+
default: withCtx(() => [
|
|
789
|
+
(openBlock(), createBlock(_sfc_main$2, {
|
|
790
|
+
key: fullscreen.value ? "min" : "max",
|
|
791
|
+
name: fullscreen.value ? "lucide:minimize" : "lucide:maximize",
|
|
792
|
+
size: 16
|
|
793
|
+
}, null, 8, ["name"]))
|
|
794
|
+
]),
|
|
795
|
+
_: 1
|
|
796
|
+
}, 16)
|
|
797
|
+
]),
|
|
798
|
+
_: 1
|
|
799
|
+
}, 8, ["class", "aria-label", "title"])) : createCommentVNode("", true)
|
|
800
|
+
])
|
|
801
|
+
], 34)
|
|
802
|
+
], 6)
|
|
803
|
+
], 6)
|
|
804
|
+
]),
|
|
805
|
+
_: 3
|
|
806
|
+
}, 8, ["items", "title"])
|
|
807
|
+
], 16, _hoisted_1);
|
|
808
|
+
};
|
|
809
|
+
}
|
|
810
|
+
});
|
|
811
|
+
export {
|
|
812
|
+
_sfc_main as _
|
|
813
|
+
};
|