@prolibu-suite/cobalt-core 0.2.0 → 0.3.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/custom-elements.json +15675 -11199
- package/dist/cjs/co-accordion.cjs.entry.js +3 -3
- package/dist/cjs/co-app-shell.cjs.entry.js +4 -4
- package/dist/cjs/co-autocomplete.cjs.entry.js +10 -7
- package/dist/cjs/co-avatar-group.cjs.entry.js +77 -0
- package/dist/cjs/co-avatar.cjs.entry.js +6 -4
- package/dist/cjs/co-badge.cjs.entry.js +2 -2
- package/dist/cjs/co-bottom-sheet.cjs.entry.js +325 -0
- package/dist/cjs/co-button-group.cjs.entry.js +3 -3
- package/dist/cjs/co-button.cjs.entry.js +6 -6
- package/dist/cjs/co-calendar-month.cjs.entry.js +381 -0
- package/dist/cjs/co-calendar_3.cjs.entry.js +11 -11
- package/dist/cjs/co-card.cjs.entry.js +3 -3
- package/dist/cjs/co-checkbox-group.cjs.entry.js +5 -5
- package/dist/cjs/co-checkbox.cjs.entry.js +5 -5
- package/dist/cjs/co-chip.cjs.entry.js +11 -8
- package/dist/cjs/co-color-picker.cjs.entry.js +7 -5
- package/dist/cjs/co-column-picker.cjs.entry.js +3 -3
- package/dist/cjs/co-combobox.cjs.entry.js +7 -7
- package/dist/cjs/co-command-search.cjs.entry.js +151 -12
- package/dist/cjs/co-data-table-pagination.cjs.entry.js +5 -5
- package/dist/cjs/co-data-table.cjs.entry.js +25 -11
- package/dist/cjs/co-date-picker.cjs.entry.js +2 -2
- package/dist/cjs/co-date-range-picker.cjs.entry.js +3 -3
- package/dist/cjs/co-date-range.cjs.entry.js +2 -2
- package/dist/cjs/co-empty-state.cjs.entry.js +2 -2
- package/dist/cjs/co-event-calendar.cjs.entry.js +318 -0
- package/dist/cjs/co-fab.cjs.entry.js +3 -3
- package/dist/cjs/co-file-field.cjs.entry.js +8 -8
- package/dist/cjs/co-helper-text.cjs.entry.js +3 -3
- package/dist/cjs/co-icon-button.cjs.entry.js +5 -5
- package/dist/cjs/co-icon.cjs.entry.js +33 -25
- package/dist/cjs/co-input.cjs.entry.js +6 -6
- package/dist/cjs/co-json-field.cjs.entry.js +10 -6
- package/dist/cjs/co-lightbox.cjs.entry.js +5 -5
- package/dist/cjs/co-list-footer.cjs.entry.js +25 -0
- package/dist/cjs/co-list-item.cjs.entry.js +60 -4
- package/dist/cjs/co-loader_2.cjs.entry.js +293 -0
- package/dist/cjs/co-menu-divider.cjs.entry.js +2 -2
- package/dist/cjs/co-menu-item.cjs.entry.js +17 -10
- package/dist/cjs/co-menu.cjs.entry.js +2 -2
- package/dist/cjs/co-modal.cjs.entry.js +16 -4
- package/dist/cjs/co-navbar.cjs.entry.js +3 -3
- package/dist/cjs/co-number-field.cjs.entry.js +18 -6
- package/dist/cjs/co-page-header.cjs.entry.js +2 -2
- package/dist/cjs/co-phone-field.cjs.entry.js +6 -4
- package/dist/cjs/co-popover.cjs.entry.js +45 -14
- package/dist/cjs/co-progress-bar.cjs.entry.js +8 -4
- package/dist/cjs/co-progress-circle.cjs.entry.js +3 -3
- package/dist/cjs/co-radio-group.cjs.entry.js +4 -4
- package/dist/cjs/co-radio.cjs.entry.js +4 -4
- package/dist/cjs/co-rating.cjs.entry.js +4 -4
- package/dist/cjs/co-ref-field.cjs.entry.js +36 -13
- package/dist/cjs/co-rich-text-editor.cjs.entry.js +1879 -33
- package/dist/cjs/co-rich-text-toolbar.cjs.entry.js +995 -71
- package/dist/cjs/co-rich-text-viewer.cjs.entry.js +55 -19
- package/dist/cjs/co-row.cjs.entry.js +3 -3
- package/dist/cjs/co-select.cjs.entry.js +8 -8
- package/dist/cjs/co-separator.cjs.entry.js +2 -2
- package/dist/cjs/co-sidebar-nav.cjs.entry.js +29 -9
- package/dist/cjs/co-sidebar.cjs.entry.js +3 -3
- package/dist/cjs/co-skeleton.cjs.entry.js +26 -0
- package/dist/cjs/co-slider.cjs.entry.js +3 -3
- package/dist/cjs/co-switch.cjs.entry.js +6 -6
- package/dist/cjs/co-tab-group.cjs.entry.js +2 -2
- package/dist/cjs/co-tab.cjs.entry.js +3 -3
- package/dist/cjs/co-tags-field.cjs.entry.js +19 -13
- package/dist/cjs/co-textarea.cjs.entry.js +11 -7
- package/dist/cjs/co-toast.cjs.entry.js +2 -2
- package/dist/cjs/co-toggle-button-group.cjs.entry.js +4 -4
- package/dist/cjs/co-toggle-button.cjs.entry.js +4 -4
- package/dist/cjs/co-tooltip.cjs.entry.js +51 -16
- package/dist/cjs/co-transfer-list.cjs.entry.js +3 -3
- package/dist/cjs/co-video.cjs.entry.js +839 -0
- package/dist/cjs/cobalt.cjs.js +2 -2
- package/dist/cjs/fieldChip-CDIMz_Y6.js +7 -0
- package/dist/cjs/{index-CaEJnpZe.js → index-5NdsiFjZ.js} +14509 -6317
- package/dist/cjs/{index-DoFnrUVH.js → index-BumlM92r.js} +45 -21
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/overlayAfterClose-BdeXrhVY.js +12 -0
- package/dist/{esm/sanitizer-DcK0GGZC.js → cjs/purify.es-DX41ZWS2.js} +3 -107
- package/dist/cjs/{requiredMark-DA6y-4rp.js → requiredMark-CqMGt1H1.js} +1 -1
- package/dist/cjs/richTextI18n-B7ktXg3M.js +382 -0
- package/dist/cjs/toolbar-config-3PlT-3zm.js +216 -0
- package/dist/cjs/tz-Dgom0W69.js +127 -0
- package/dist/cobalt/cobalt.css +1 -1
- package/dist/cobalt/cobalt.esm.js +1 -1
- package/dist/cobalt/p-0a506c9d.entry.js +1 -0
- package/dist/cobalt/p-0bb55163.entry.js +1 -0
- package/dist/cobalt/{p-6404bd21.entry.js → p-0e8c0d87.entry.js} +1 -1
- package/dist/cobalt/p-12e2c2c4.entry.js +1 -0
- package/dist/cobalt/p-136ad468.entry.js +1 -0
- package/dist/cobalt/{p-654bbc2a.entry.js → p-14b59277.entry.js} +1 -1
- package/dist/cobalt/p-1531d3c9.entry.js +1 -0
- package/dist/cobalt/p-1774d211.entry.js +1 -0
- package/dist/cobalt/p-180e1106.entry.js +1 -0
- package/dist/cobalt/p-1a07c23c.entry.js +1 -0
- package/dist/cobalt/p-1dc9c49e.entry.js +1 -0
- package/dist/cobalt/p-1f747e45.entry.js +1 -0
- package/dist/cobalt/p-201eaf35.entry.js +1 -0
- package/dist/cobalt/p-260101ab.entry.js +1 -0
- package/dist/cobalt/p-279bf91c.entry.js +1 -0
- package/dist/cobalt/p-29be61a9.entry.js +1 -0
- package/dist/cobalt/p-2d2ce434.entry.js +1 -0
- package/dist/cobalt/{p-aa63812a.entry.js → p-2f86e1e0.entry.js} +1 -1
- package/dist/cobalt/{p-522fcdb7.entry.js → p-31ab9a46.entry.js} +1 -1
- package/dist/cobalt/{p-fe9e85b6.entry.js → p-37595103.entry.js} +1 -1
- package/dist/cobalt/{p-def448e4.entry.js → p-377c2ccc.entry.js} +1 -1
- package/dist/cobalt/p-3863ea91.entry.js +1 -0
- package/dist/cobalt/p-3a257cb0.entry.js +1 -0
- package/dist/cobalt/p-3e187456.entry.js +1 -0
- package/dist/cobalt/{p-5d01bd4d.entry.js → p-4431faac.entry.js} +1 -1
- package/dist/cobalt/{p-54f26e95.entry.js → p-4504f7b0.entry.js} +1 -1
- package/dist/cobalt/{p-f8728b21.entry.js → p-456fa86f.entry.js} +1 -1
- package/dist/cobalt/{p-3f9b3fcb.entry.js → p-4871690e.entry.js} +1 -1
- package/dist/cobalt/{p-d17e1444.entry.js → p-4c01d984.entry.js} +1 -1
- package/dist/cobalt/p-51a53177.entry.js +1 -0
- package/dist/cobalt/p-52de17da.entry.js +1 -0
- package/dist/cobalt/p-5890e4d1.entry.js +1 -0
- package/dist/cobalt/{p-f2c5cb74.entry.js → p-58a53421.entry.js} +1 -1
- package/dist/cobalt/p-62274eba.entry.js +1 -0
- package/dist/cobalt/p-635b03d5.entry.js +1 -0
- package/dist/cobalt/p-64ddee92.entry.js +1 -0
- package/dist/cobalt/p-65af5017.entry.js +1 -0
- package/dist/cobalt/p-69d4c0c8.entry.js +1 -0
- package/dist/cobalt/p-6c480916.entry.js +1 -0
- package/dist/cobalt/p-6d1217c3.entry.js +1 -0
- package/dist/cobalt/{p-f0e8fa7d.entry.js → p-6e808b3a.entry.js} +1 -1
- package/dist/cobalt/{p-f97ad9ad.entry.js → p-70b14b05.entry.js} +1 -1
- package/dist/cobalt/{p-97c20011.entry.js → p-790d384e.entry.js} +1 -1
- package/dist/cobalt/p-8012e152.entry.js +1 -0
- package/dist/cobalt/p-80b27203.entry.js +1 -0
- package/dist/cobalt/p-867c1465.entry.js +1 -0
- package/dist/cobalt/p-86a143d7.entry.js +1 -0
- package/dist/cobalt/{p-e8b58332.entry.js → p-8d59f5ad.entry.js} +1 -1
- package/dist/cobalt/p-8d7fdb9d.entry.js +1 -0
- package/dist/cobalt/{p-7f818368.entry.js → p-8dc1dab8.entry.js} +1 -1
- package/dist/cobalt/{p-beb9c11d.entry.js → p-8e1dc062.entry.js} +1 -1
- package/dist/cobalt/p-929e647f.entry.js +1 -0
- package/dist/cobalt/p-92bd9b29.entry.js +1 -0
- package/dist/cobalt/p-93046365.entry.js +1 -0
- package/dist/cobalt/p-98ab5f3f.entry.js +1 -0
- package/dist/cobalt/{p-c87285b6.entry.js → p-9a04ca90.entry.js} +1 -1
- package/dist/cobalt/{p-7ef766c6.entry.js → p-9a088515.entry.js} +1 -1
- package/dist/cobalt/p-9abbd436.entry.js +1 -0
- package/dist/cobalt/p-9d69c067.entry.js +1 -0
- package/dist/cobalt/p-B-ckjCUA.js +1 -0
- package/dist/cobalt/p-B2QLgWrz.js +2 -0
- package/dist/cobalt/p-B6JZk8fL.js +1 -0
- package/dist/cobalt/p-BZJ7NCm5.js +1 -0
- package/dist/cobalt/p-CYsftTKf.js +2 -0
- package/dist/cobalt/p-CegCk7FL.js +1 -0
- package/dist/cobalt/p-Ch1jfwZ2.js +1 -0
- package/dist/cobalt/p-ChibIpZv.js +1 -0
- package/dist/cobalt/p-afb7e19e.entry.js +1 -0
- package/dist/cobalt/{p-b758c2e6.entry.js → p-b6f20268.entry.js} +1 -1
- package/dist/cobalt/{p-bb07da22.entry.js → p-ba90e871.entry.js} +1 -1
- package/dist/cobalt/p-c10697e1.entry.js +1 -0
- package/dist/cobalt/p-c4f59532.entry.js +1 -0
- package/dist/cobalt/{p-1e0282b8.entry.js → p-cb235aa7.entry.js} +1 -1
- package/dist/cobalt/p-cfb36943.entry.js +1 -0
- package/dist/cobalt/p-d809bd44.entry.js +1 -0
- package/dist/cobalt/p-e53861e4.entry.js +1 -0
- package/dist/cobalt/p-e54dd404.entry.js +1 -0
- package/dist/cobalt/{p-01fc77c4.entry.js → p-eb18fdbf.entry.js} +1 -1
- package/dist/cobalt/{p-95d14878.entry.js → p-eb73052a.entry.js} +1 -1
- package/dist/cobalt/{p-273afd93.entry.js → p-ef7d4ae3.entry.js} +1 -1
- package/dist/cobalt/p-f4063c41.entry.js +1 -0
- package/dist/cobalt/p-oImf-7fN.js +1 -0
- package/dist/cobalt/{p-CyYF8IJE.js → p-tPYikBRJ.js} +1 -1
- package/dist/collection/collection-manifest.json +10 -3
- package/dist/collection/components/co-accordion/co-accordion.js +2 -2
- package/dist/collection/components/co-app-shell/co-app-shell.css +79 -6
- package/dist/collection/components/co-app-shell/co-app-shell.js +2 -2
- package/dist/collection/components/co-autocomplete/co-autocomplete.css +28 -1
- package/dist/collection/components/co-autocomplete/co-autocomplete.js +27 -4
- package/dist/collection/components/co-avatar/co-avatar.css +38 -1
- package/dist/collection/components/co-avatar/co-avatar.js +23 -2
- package/dist/collection/components/co-avatar-group/co-avatar-group.css +86 -0
- package/dist/collection/components/co-avatar-group/co-avatar-group.js +224 -0
- package/dist/collection/components/co-badge/co-badge.js +1 -1
- package/dist/collection/components/co-bottom-sheet/co-bottom-sheet.css +136 -0
- package/dist/collection/components/co-bottom-sheet/co-bottom-sheet.js +507 -0
- package/dist/collection/components/co-button/co-button.css +40 -7
- package/dist/collection/components/co-button/co-button.js +26 -7
- package/dist/collection/components/co-button-group/co-button-group.js +2 -2
- package/dist/collection/components/co-calendar/co-calendar.js +1 -1
- package/dist/collection/components/co-calendar-month/co-calendar-month.css +231 -0
- package/dist/collection/components/co-calendar-month/co-calendar-month.js +594 -0
- package/dist/collection/components/co-card/co-card.js +2 -2
- package/dist/collection/components/co-checkbox/co-checkbox.css +7 -1
- package/dist/collection/components/co-checkbox/co-checkbox.js +3 -3
- package/dist/collection/components/co-checkbox-group/co-checkbox-group.css +7 -1
- package/dist/collection/components/co-checkbox-group/co-checkbox-group.js +3 -3
- package/dist/collection/components/co-chip/co-chip.css +27 -7
- package/dist/collection/components/co-chip/co-chip.js +52 -10
- package/dist/collection/components/co-color-picker/co-color-picker.css +35 -1
- package/dist/collection/components/co-color-picker/co-color-picker.js +24 -2
- package/dist/collection/components/co-column-picker/co-column-picker.js +2 -2
- package/dist/collection/components/co-combobox/co-combobox.css +7 -47
- package/dist/collection/components/co-combobox/co-combobox.js +4 -4
- package/dist/collection/components/co-command-search/co-command-search.css +163 -1
- package/dist/collection/components/co-command-search/co-command-search.js +355 -14
- package/dist/collection/components/co-command-search/commandSearchGroup.js +17 -0
- package/dist/collection/components/co-command-search/commandSearchLogic.js +27 -0
- package/dist/collection/components/co-data-table/co-data-table.css +37 -1
- package/dist/collection/components/co-data-table/co-data-table.js +25 -11
- package/dist/collection/components/co-data-table-pagination/co-data-table-pagination.js +4 -4
- package/dist/collection/components/co-date-field/co-date-field.css +7 -1
- package/dist/collection/components/co-date-field/co-date-field.js +4 -4
- package/dist/collection/components/co-date-range/co-date-range.js +1 -1
- package/dist/collection/components/co-date-range-picker/co-date-range-picker.css +7 -1
- package/dist/collection/components/co-drawer/co-drawer.css +1 -0
- package/dist/collection/components/co-drawer/co-drawer.js +2 -2
- package/dist/collection/components/co-empty-state/co-empty-state.js +1 -1
- package/dist/collection/components/co-event-calendar/co-event-calendar.css +146 -0
- package/dist/collection/components/co-event-calendar/co-event-calendar.js +620 -0
- package/dist/collection/components/co-fab/co-fab.js +2 -2
- package/dist/collection/components/co-file-field/co-file-field.css +7 -1
- package/dist/collection/components/co-file-field/co-file-field.js +5 -5
- package/dist/collection/components/co-helper-text/co-helper-text.js +2 -2
- package/dist/collection/components/co-icon/co-icon.js +7 -37
- package/dist/collection/components/co-icon/iconLoader.js +39 -0
- package/dist/collection/components/co-icon-button/co-icon-button.css +19 -8
- package/dist/collection/components/co-icon-button/co-icon-button.js +23 -4
- package/dist/collection/components/co-input/co-input.css +7 -1
- package/dist/collection/components/co-input/co-input.js +3 -3
- package/dist/collection/components/co-json-field/co-json-field.css +25 -1
- package/dist/collection/components/co-json-field/co-json-field.js +27 -3
- package/dist/collection/components/co-lightbox/co-lightbox.js +4 -4
- package/dist/collection/components/co-list-footer/co-list-footer.css +50 -0
- package/dist/collection/components/co-list-footer/co-list-footer.js +149 -0
- package/dist/collection/components/co-list-item/co-list-item.css +7 -0
- package/dist/collection/components/co-list-item/co-list-item.js +65 -2
- package/dist/collection/components/co-loader/co-loader.css +9 -0
- package/dist/collection/components/co-menu/co-menu.js +1 -1
- package/dist/collection/components/co-menu-divider/co-menu-divider.js +1 -1
- package/dist/collection/components/co-menu-item/co-menu-item.css +18 -0
- package/dist/collection/components/co-menu-item/co-menu-item.js +15 -8
- package/dist/collection/components/co-modal/co-modal.css +42 -2
- package/dist/collection/components/co-modal/co-modal.js +42 -2
- package/dist/collection/components/co-navbar/co-navbar.js +2 -2
- package/dist/collection/components/co-number-field/co-number-field.css +19 -1
- package/dist/collection/components/co-number-field/co-number-field.js +34 -3
- package/dist/collection/components/co-overlay/co-overlay.css +15 -1
- package/dist/collection/components/co-overlay/co-overlay.js +266 -1
- package/dist/collection/components/co-overlay/focusTrap.js +53 -0
- package/dist/collection/components/co-overlay/overlayAfterClose.js +8 -0
- package/dist/collection/components/co-page-header/co-page-header.js +1 -1
- package/dist/collection/components/co-phone-field/co-phone-field.css +30 -2
- package/dist/collection/components/co-phone-field/co-phone-field.js +23 -1
- package/dist/collection/components/co-popover/co-popover.css +9 -0
- package/dist/collection/components/co-popover/co-popover.js +43 -12
- package/dist/collection/components/co-progress-bar/co-progress-bar.css +22 -0
- package/dist/collection/components/co-progress-bar/co-progress-bar.js +26 -2
- package/dist/collection/components/co-progress-circle/co-progress-circle.js +2 -2
- package/dist/collection/components/co-radio/co-radio.js +3 -3
- package/dist/collection/components/co-radio-group/co-radio-group.js +3 -3
- package/dist/collection/components/co-rating/co-rating.js +3 -3
- package/dist/collection/components/co-ref-field/co-ref-field.css +64 -6
- package/dist/collection/components/co-ref-field/co-ref-field.js +0 -0
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.css +1125 -41
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.js +2008 -53
- package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.css +791 -9
- package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.js +1071 -71
- package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.css +78 -0
- package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.js +46 -41
- package/dist/collection/components/co-row/co-row.js +2 -2
- package/dist/collection/components/co-select/co-select.css +7 -1
- package/dist/collection/components/co-select/co-select.js +5 -5
- package/dist/collection/components/co-separator/co-separator.js +1 -1
- package/dist/collection/components/co-sidebar/co-sidebar.js +2 -2
- package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.css +99 -12
- package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.js +28 -8
- package/dist/collection/components/co-skeleton/co-skeleton.css +28 -0
- package/dist/collection/components/co-skeleton/co-skeleton.js +97 -0
- package/dist/collection/components/co-slider/co-slider.js +2 -2
- package/dist/collection/components/co-switch/co-switch.css +9 -1
- package/dist/collection/components/co-switch/co-switch.js +3 -3
- package/dist/collection/components/co-tab/co-tab.js +2 -2
- package/dist/collection/components/co-tab-group/co-tab-group.js +1 -1
- package/dist/collection/components/co-tags-field/co-tags-field.css +39 -1
- package/dist/collection/components/co-tags-field/co-tags-field.js +36 -10
- package/dist/collection/components/co-textarea/co-textarea.css +26 -1
- package/dist/collection/components/co-textarea/co-textarea.js +28 -4
- package/dist/collection/components/co-toast/co-toast.js +1 -1
- package/dist/collection/components/co-toggle-button/co-toggle-button.css +26 -4
- package/dist/collection/components/co-toggle-button/co-toggle-button.js +3 -3
- package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.css +16 -12
- package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.js +2 -2
- package/dist/collection/components/co-tooltip/co-tooltip.css +8 -0
- package/dist/collection/components/co-tooltip/co-tooltip.js +69 -14
- package/dist/collection/components/co-transfer-list/co-transfer-list.js +2 -2
- package/dist/collection/components/co-video/co-video.css +497 -0
- package/dist/collection/components/co-video/co-video.js +1772 -0
- package/dist/collection/utils/fieldChip.js +2 -0
- package/dist/collection/utils/icon-config.js +12 -0
- package/dist/collection/utils/richTextI18n.js +378 -0
- package/dist/collection/utils/sheetGesture.js +53 -0
- package/dist/components/co-accordion.js +1 -1
- package/dist/components/co-app-shell.js +1 -1
- package/dist/components/co-autocomplete.js +1 -1
- package/dist/components/co-avatar-group.d.ts +11 -0
- package/dist/components/co-avatar-group.js +1 -0
- package/dist/components/co-avatar.js +1 -1
- package/dist/components/co-badge.js +1 -1
- package/dist/components/co-bottom-sheet.d.ts +11 -0
- package/dist/components/co-bottom-sheet.js +1 -0
- package/dist/components/co-button-group.js +1 -1
- package/dist/components/co-button.js +1 -1
- package/dist/components/co-calendar-month.d.ts +11 -0
- package/dist/components/co-calendar-month.js +1 -0
- package/dist/components/co-calendar.js +1 -1
- package/dist/components/co-card.js +1 -1
- package/dist/components/co-checkbox-group.js +1 -1
- package/dist/components/co-checkbox.js +1 -1
- package/dist/components/co-chip.js +1 -1
- package/dist/components/co-color-picker.js +1 -1
- package/dist/components/co-column-picker.js +1 -1
- package/dist/components/co-combobox.js +1 -1
- package/dist/components/co-command-search.js +1 -1
- package/dist/components/co-data-table-pagination.js +1 -1
- package/dist/components/co-data-table.js +1 -1
- package/dist/components/co-date-field.js +1 -1
- package/dist/components/co-date-picker.js +1 -1
- package/dist/components/co-date-range-picker.js +1 -1
- package/dist/components/co-date-range.js +1 -1
- package/dist/components/co-drawer.js +1 -1
- package/dist/components/co-empty-state.js +1 -1
- package/dist/components/co-event-calendar.d.ts +11 -0
- package/dist/components/co-event-calendar.js +1 -0
- package/dist/components/co-fab.js +1 -1
- package/dist/components/co-file-field.js +1 -1
- package/dist/components/co-helper-text.js +1 -1
- package/dist/components/co-icon-button.js +1 -1
- package/dist/components/co-icon.js +1 -1
- package/dist/components/co-input.js +1 -1
- package/dist/components/co-json-field.js +1 -1
- package/dist/components/co-lightbox.js +1 -1
- package/dist/components/co-list-footer.d.ts +11 -0
- package/dist/components/co-list-footer.js +1 -0
- package/dist/components/co-list-item.js +1 -1
- package/dist/components/co-loader.js +1 -1
- package/dist/components/co-menu-divider.js +1 -1
- package/dist/components/co-menu-item.js +1 -1
- package/dist/components/co-menu.js +1 -1
- package/dist/components/co-modal.js +1 -1
- package/dist/components/co-navbar.js +1 -1
- package/dist/components/co-number-field.js +1 -1
- package/dist/components/co-overlay.js +1 -1
- package/dist/components/co-page-header.js +1 -1
- package/dist/components/co-phone-field.js +1 -1
- package/dist/components/co-popover.js +1 -1
- package/dist/components/co-progress-bar.js +1 -1
- package/dist/components/co-progress-circle.js +1 -1
- package/dist/components/co-radio-group.js +1 -1
- package/dist/components/co-radio.js +1 -1
- package/dist/components/co-rating.js +1 -1
- package/dist/components/co-ref-field.js +1 -1
- package/dist/components/co-rich-text-editor.js +1 -1
- package/dist/components/co-rich-text-toolbar.js +1 -1
- package/dist/components/co-rich-text-viewer.js +1 -1
- package/dist/components/co-row.js +1 -1
- package/dist/components/co-select.js +1 -1
- package/dist/components/co-separator.js +1 -1
- package/dist/components/co-sidebar-nav.js +1 -1
- package/dist/components/co-sidebar.js +1 -1
- package/dist/components/co-skeleton.d.ts +11 -0
- package/dist/components/co-skeleton.js +1 -0
- package/dist/components/co-slider.js +1 -1
- package/dist/components/co-switch.js +1 -1
- package/dist/components/co-tab-group.js +1 -1
- package/dist/components/co-tab.js +1 -1
- package/dist/components/co-tags-field.js +1 -1
- package/dist/components/co-textarea.js +1 -1
- package/dist/components/co-toast.js +1 -1
- package/dist/components/co-toggle-button-group.js +1 -1
- package/dist/components/co-toggle-button.js +1 -1
- package/dist/components/co-tooltip.js +1 -1
- package/dist/components/co-transfer-list.js +1 -1
- package/dist/components/co-video.d.ts +11 -0
- package/dist/components/co-video.js +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-B2QLgWrz.js +2 -0
- package/dist/components/{p-BeWXpX8I.js → p-B7vGYFbO.js} +1 -1
- package/dist/components/p-BB2OaYKF.js +1 -0
- package/dist/components/p-BFeE_fiq.js +1 -0
- package/dist/components/p-BNKz39GA.js +1 -0
- package/dist/components/p-Ba4v1NXo.js +1 -0
- package/dist/components/p-C_ULDaks.js +1 -0
- package/dist/components/p-CegCk7FL.js +1 -0
- package/dist/components/p-ChibIpZv.js +1 -0
- package/dist/components/p-D3Y_ti3Q.js +1 -0
- package/dist/components/{p-DObrQi5F.js → p-DKh8ZK4U.js} +1 -1
- package/dist/components/{p-C9tHLXKS.js → p-DeZxp9vb.js} +1 -1
- package/dist/components/p-DvhR3H61.js +1 -0
- package/dist/components/p-DxCFMMfY.js +1 -0
- package/dist/components/{p-OGpfa9Yd.js → p-DzoNGEDU.js} +1 -1
- package/dist/components/p-EPZfLt5l.js +1 -0
- package/dist/components/p-FMnqPWcM.js +1 -0
- package/dist/components/p-Hzh9U2cM.js +1 -0
- package/dist/components/p-WZ06pT2Y.js +1 -0
- package/dist/components/p-tloAgDin.js +1 -0
- package/dist/esm/co-accordion.entry.js +3 -3
- package/dist/esm/co-app-shell.entry.js +4 -4
- package/dist/esm/co-autocomplete.entry.js +10 -7
- package/dist/esm/co-avatar-group.entry.js +75 -0
- package/dist/esm/co-avatar.entry.js +6 -4
- package/dist/esm/co-badge.entry.js +2 -2
- package/dist/esm/co-bottom-sheet.entry.js +323 -0
- package/dist/esm/co-button-group.entry.js +3 -3
- package/dist/esm/co-button.entry.js +6 -6
- package/dist/esm/co-calendar-month.entry.js +379 -0
- package/dist/esm/co-calendar_3.entry.js +12 -12
- package/dist/esm/co-card.entry.js +3 -3
- package/dist/esm/co-checkbox-group.entry.js +5 -5
- package/dist/esm/co-checkbox.entry.js +5 -5
- package/dist/esm/co-chip.entry.js +11 -8
- package/dist/esm/co-color-picker.entry.js +7 -5
- package/dist/esm/co-column-picker.entry.js +3 -3
- package/dist/esm/co-combobox.entry.js +7 -7
- package/dist/esm/co-command-search.entry.js +151 -12
- package/dist/esm/co-data-table-pagination.entry.js +5 -5
- package/dist/esm/co-data-table.entry.js +25 -11
- package/dist/esm/co-date-picker.entry.js +2 -2
- package/dist/esm/co-date-range-picker.entry.js +4 -4
- package/dist/esm/co-date-range.entry.js +2 -2
- package/dist/esm/co-empty-state.entry.js +2 -2
- package/dist/esm/co-event-calendar.entry.js +316 -0
- package/dist/esm/co-fab.entry.js +3 -3
- package/dist/esm/co-file-field.entry.js +8 -8
- package/dist/esm/co-helper-text.entry.js +3 -3
- package/dist/esm/co-icon-button.entry.js +5 -5
- package/dist/esm/co-icon.entry.js +33 -25
- package/dist/esm/co-input.entry.js +6 -6
- package/dist/esm/co-json-field.entry.js +10 -6
- package/dist/esm/co-lightbox.entry.js +5 -5
- package/dist/esm/co-list-footer.entry.js +23 -0
- package/dist/esm/co-list-item.entry.js +60 -4
- package/dist/esm/co-loader_2.entry.js +290 -0
- package/dist/esm/co-menu-divider.entry.js +2 -2
- package/dist/esm/co-menu-item.entry.js +17 -10
- package/dist/esm/co-menu.entry.js +2 -2
- package/dist/esm/co-modal.entry.js +16 -4
- package/dist/esm/co-navbar.entry.js +3 -3
- package/dist/esm/co-number-field.entry.js +18 -6
- package/dist/esm/co-page-header.entry.js +2 -2
- package/dist/esm/co-phone-field.entry.js +6 -4
- package/dist/esm/co-popover.entry.js +45 -14
- package/dist/esm/co-progress-bar.entry.js +8 -4
- package/dist/esm/co-progress-circle.entry.js +3 -3
- package/dist/esm/co-radio-group.entry.js +4 -4
- package/dist/esm/co-radio.entry.js +4 -4
- package/dist/esm/co-rating.entry.js +4 -4
- package/dist/esm/co-ref-field.entry.js +36 -13
- package/dist/esm/co-rich-text-editor.entry.js +1879 -33
- package/dist/esm/co-rich-text-toolbar.entry.js +995 -71
- package/dist/esm/co-rich-text-viewer.entry.js +55 -19
- package/dist/esm/co-row.entry.js +3 -3
- package/dist/esm/co-select.entry.js +8 -8
- package/dist/esm/co-separator.entry.js +2 -2
- package/dist/esm/co-sidebar-nav.entry.js +29 -9
- package/dist/esm/co-sidebar.entry.js +3 -3
- package/dist/esm/co-skeleton.entry.js +24 -0
- package/dist/esm/co-slider.entry.js +3 -3
- package/dist/esm/co-switch.entry.js +6 -6
- package/dist/esm/co-tab-group.entry.js +2 -2
- package/dist/esm/co-tab.entry.js +3 -3
- package/dist/esm/co-tags-field.entry.js +19 -13
- package/dist/esm/co-textarea.entry.js +11 -7
- package/dist/esm/co-toast.entry.js +2 -2
- package/dist/esm/co-toggle-button-group.entry.js +4 -4
- package/dist/esm/co-toggle-button.entry.js +4 -4
- package/dist/esm/co-tooltip.entry.js +51 -16
- package/dist/esm/co-transfer-list.entry.js +3 -3
- package/dist/esm/co-video.entry.js +837 -0
- package/dist/esm/cobalt.js +3 -3
- package/dist/esm/{dates-CyYF8IJE.js → dates-tPYikBRJ.js} +1 -1
- package/dist/esm/fieldChip-GPikjpYw.js +5 -0
- package/dist/esm/{index-BKmfyPZK.js → index-CYsftTKf.js} +45 -21
- package/dist/esm/{index-BjAqSidM.js → index-w_Wxgclf.js} +14508 -6305
- package/dist/esm/loader.js +3 -3
- package/dist/esm/overlayAfterClose-Ch1jfwZ2.js +10 -0
- package/dist/{cjs/sanitizer-CjHZAkOm.js → esm/purify.es-B2QLgWrz.js} +1 -110
- package/dist/esm/{requiredMark-DFvtYtkE.js → requiredMark-CEbXKHcU.js} +1 -1
- package/dist/esm/richTextI18n-B-ckjCUA.js +380 -0
- package/dist/esm/toolbar-config-ChibIpZv.js +212 -0
- package/dist/esm/tz-B6JZk8fL.js +119 -0
- package/dist/types/components/co-autocomplete/co-autocomplete.d.ts +2 -0
- package/dist/types/components/co-avatar/co-avatar.d.ts +2 -0
- package/dist/types/components/co-avatar-group/co-avatar-group.d.ts +33 -0
- package/dist/types/components/co-bottom-sheet/co-bottom-sheet.d.ts +81 -0
- package/dist/types/components/co-button/co-button.d.ts +3 -1
- package/dist/types/components/co-calendar-month/co-calendar-month.d.ts +83 -0
- package/dist/types/components/co-chip/co-chip.d.ts +7 -2
- package/dist/types/components/co-color-picker/co-color-picker.d.ts +2 -0
- package/dist/types/components/co-command-search/co-command-search.d.ts +39 -6
- package/dist/types/components/co-command-search/commandSearchGroup.d.ts +20 -0
- package/dist/types/components/co-command-search/commandSearchLogic.d.ts +17 -0
- package/dist/types/components/co-data-table/co-data-table.d.ts +2 -1
- package/dist/types/components/co-event-calendar/co-event-calendar.d.ts +110 -0
- package/dist/types/components/co-icon/co-icon.d.ts +1 -1
- package/dist/types/components/co-icon/iconLoader.d.ts +6 -0
- package/dist/types/components/co-icon-button/co-icon-button.d.ts +2 -0
- package/dist/types/components/co-json-field/co-json-field.d.ts +3 -0
- package/dist/types/components/co-list-footer/co-list-footer.d.ts +26 -0
- package/dist/types/components/co-list-item/co-list-item.d.ts +11 -0
- package/dist/types/components/co-modal/co-modal.d.ts +6 -0
- package/dist/types/components/co-number-field/co-number-field.d.ts +13 -0
- package/dist/types/components/co-overlay/co-overlay.d.ts +45 -0
- package/dist/types/components/co-overlay/focusTrap.d.ts +20 -0
- package/dist/types/components/co-overlay/overlayAfterClose.d.ts +5 -0
- package/dist/types/components/co-phone-field/co-phone-field.d.ts +2 -0
- package/dist/types/components/co-popover/co-popover.d.ts +9 -0
- package/dist/types/components/co-progress-bar/co-progress-bar.d.ts +2 -0
- package/dist/types/components/co-ref-field/co-ref-field.d.ts +17 -2
- package/dist/types/components/co-rich-text-editor/co-rich-text-editor.d.ts +161 -9
- package/dist/types/components/co-rich-text-toolbar/co-rich-text-toolbar.d.ts +119 -13
- package/dist/types/components/co-rich-text-viewer/co-rich-text-viewer.d.ts +1 -14
- package/dist/types/components/co-skeleton/co-skeleton.d.ts +13 -0
- package/dist/types/components/co-tags-field/co-tags-field.d.ts +2 -0
- package/dist/types/components/co-textarea/co-textarea.d.ts +3 -0
- package/dist/types/components/co-tooltip/co-tooltip.d.ts +12 -0
- package/dist/types/components/co-video/co-video.d.ts +203 -0
- package/dist/types/components.d.ts +1729 -72
- package/dist/types/utils/fieldChip.d.ts +37 -0
- package/dist/types/utils/icon-config.d.ts +11 -0
- package/dist/types/utils/richTextI18n.d.ts +130 -0
- package/dist/types/utils/sheetGesture.d.ts +31 -0
- package/package.json +3 -2
- package/dist/cjs/co-loader.cjs.entry.js +0 -34
- package/dist/cjs/co-overlay.cjs.entry.js +0 -23
- package/dist/cobalt/p-0a6d8061.entry.js +0 -1
- package/dist/cobalt/p-0bf288cd.entry.js +0 -1
- package/dist/cobalt/p-136bdbd2.entry.js +0 -1
- package/dist/cobalt/p-15708d32.entry.js +0 -1
- package/dist/cobalt/p-1578b019.entry.js +0 -1
- package/dist/cobalt/p-23d48581.entry.js +0 -1
- package/dist/cobalt/p-2718ff27.entry.js +0 -1
- package/dist/cobalt/p-2b4d8535.entry.js +0 -1
- package/dist/cobalt/p-3190d715.entry.js +0 -1
- package/dist/cobalt/p-41228dce.entry.js +0 -1
- package/dist/cobalt/p-44672953.entry.js +0 -1
- package/dist/cobalt/p-53ce9023.entry.js +0 -1
- package/dist/cobalt/p-5e7141aa.entry.js +0 -1
- package/dist/cobalt/p-5f905739.entry.js +0 -1
- package/dist/cobalt/p-6678ac0a.entry.js +0 -1
- package/dist/cobalt/p-66a912dd.entry.js +0 -1
- package/dist/cobalt/p-6759ee1c.entry.js +0 -1
- package/dist/cobalt/p-69a40bfd.entry.js +0 -1
- package/dist/cobalt/p-6a6a62cb.entry.js +0 -1
- package/dist/cobalt/p-6d43b6cd.entry.js +0 -1
- package/dist/cobalt/p-759c3dd0.entry.js +0 -1
- package/dist/cobalt/p-782f729f.entry.js +0 -1
- package/dist/cobalt/p-83b89bf8.entry.js +0 -1
- package/dist/cobalt/p-88dc561a.entry.js +0 -1
- package/dist/cobalt/p-8c27aff7.entry.js +0 -1
- package/dist/cobalt/p-996179f7.entry.js +0 -1
- package/dist/cobalt/p-9c533830.entry.js +0 -1
- package/dist/cobalt/p-9d89bf47.entry.js +0 -1
- package/dist/cobalt/p-BKmfyPZK.js +0 -2
- package/dist/cobalt/p-BchB6Hdr.js +0 -1
- package/dist/cobalt/p-DcK0GGZC.js +0 -2
- package/dist/cobalt/p-Qqq8fysz.js +0 -1
- package/dist/cobalt/p-aa17c70b.entry.js +0 -1
- package/dist/cobalt/p-ad4c1b41.entry.js +0 -1
- package/dist/cobalt/p-ae4d3207.entry.js +0 -1
- package/dist/cobalt/p-af64da37.entry.js +0 -1
- package/dist/cobalt/p-c6a242e4.entry.js +0 -1
- package/dist/cobalt/p-cd57e8b4.entry.js +0 -1
- package/dist/cobalt/p-ce3a535f.entry.js +0 -1
- package/dist/cobalt/p-d958566a.entry.js +0 -1
- package/dist/cobalt/p-dd873bf8.entry.js +0 -1
- package/dist/cobalt/p-e4de8865.entry.js +0 -1
- package/dist/cobalt/p-eba0bf7f.entry.js +0 -1
- package/dist/cobalt/p-fad3605d.entry.js +0 -1
- package/dist/cobalt/p-ff2690e5.entry.js +0 -1
- package/dist/components/p-BXdfh__-.js +0 -1
- package/dist/components/p-BchB6Hdr.js +0 -1
- package/dist/components/p-BiW0ubLs.js +0 -1
- package/dist/components/p-CaMgu2_g.js +0 -1
- package/dist/components/p-DBhNS7JD.js +0 -1
- package/dist/components/p-DPi_U-Kl.js +0 -1
- package/dist/components/p-DcK0GGZC.js +0 -2
- package/dist/components/p-MiSJXuBx.js +0 -1
- package/dist/components/p-Sgn-2g8m.js +0 -1
- package/dist/components/p-jDjfGZJp.js +0 -1
- package/dist/components/p-o8hrDIKe.js +0 -1
- package/dist/esm/co-loader.entry.js +0 -32
- package/dist/esm/co-overlay.entry.js +0 -21
|
@@ -0,0 +1,1772 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
const VIDEO_I18N = {
|
|
3
|
+
es: {
|
|
4
|
+
play: 'Reproducir',
|
|
5
|
+
pause: 'Pausar',
|
|
6
|
+
mute: 'Silenciar',
|
|
7
|
+
unmute: 'Activar sonido',
|
|
8
|
+
volume: 'Volumen',
|
|
9
|
+
fullscreen: 'Pantalla completa',
|
|
10
|
+
exitFullscreen: 'Salir de pantalla completa',
|
|
11
|
+
speed: 'Velocidad',
|
|
12
|
+
pip: 'Imagen en imagen',
|
|
13
|
+
exitPip: 'Salir de imagen en imagen',
|
|
14
|
+
download: 'Descargar',
|
|
15
|
+
seek: 'Buscar',
|
|
16
|
+
normal: 'Normal',
|
|
17
|
+
error: 'Error al reproducir el video',
|
|
18
|
+
retry: 'Reintentar',
|
|
19
|
+
player: 'Reproductor de video',
|
|
20
|
+
},
|
|
21
|
+
en: {
|
|
22
|
+
play: 'Play',
|
|
23
|
+
pause: 'Pause',
|
|
24
|
+
mute: 'Mute',
|
|
25
|
+
unmute: 'Unmute',
|
|
26
|
+
volume: 'Volume',
|
|
27
|
+
fullscreen: 'Fullscreen',
|
|
28
|
+
exitFullscreen: 'Exit fullscreen',
|
|
29
|
+
speed: 'Speed',
|
|
30
|
+
pip: 'Picture in picture',
|
|
31
|
+
exitPip: 'Exit picture in picture',
|
|
32
|
+
download: 'Download',
|
|
33
|
+
seek: 'Seek',
|
|
34
|
+
normal: 'Normal',
|
|
35
|
+
error: 'Error playing video',
|
|
36
|
+
retry: 'Retry',
|
|
37
|
+
player: 'Video player',
|
|
38
|
+
},
|
|
39
|
+
pt: {
|
|
40
|
+
play: 'Reproduzir',
|
|
41
|
+
pause: 'Pausar',
|
|
42
|
+
mute: 'Silenciar',
|
|
43
|
+
unmute: 'Ativar som',
|
|
44
|
+
volume: 'Volume',
|
|
45
|
+
fullscreen: 'Tela cheia',
|
|
46
|
+
exitFullscreen: 'Sair da tela cheia',
|
|
47
|
+
speed: 'Velocidade',
|
|
48
|
+
pip: 'Imagem em imagem',
|
|
49
|
+
exitPip: 'Sair de imagem em imagem',
|
|
50
|
+
download: 'Baixar',
|
|
51
|
+
seek: 'Buscar',
|
|
52
|
+
normal: 'Normal',
|
|
53
|
+
error: 'Erro ao reproduzir o vídeo',
|
|
54
|
+
retry: 'Tentar novamente',
|
|
55
|
+
player: 'Reprodutor de vídeo',
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
const ERROR_MESSAGES = {
|
|
59
|
+
1: {
|
|
60
|
+
es: 'La carga del video fue interrumpida',
|
|
61
|
+
en: 'Video loading was aborted',
|
|
62
|
+
pt: 'O carregamento do vídeo foi interrompido',
|
|
63
|
+
},
|
|
64
|
+
2: {
|
|
65
|
+
es: 'Error de red al cargar el video',
|
|
66
|
+
en: 'Network error while loading video',
|
|
67
|
+
pt: 'Erro de rede ao carregar o vídeo',
|
|
68
|
+
},
|
|
69
|
+
3: {
|
|
70
|
+
es: 'Error al decodificar el video',
|
|
71
|
+
en: 'Error decoding video',
|
|
72
|
+
pt: 'Erro ao decodificar o vídeo',
|
|
73
|
+
},
|
|
74
|
+
4: {
|
|
75
|
+
es: 'Formato de video no soportado',
|
|
76
|
+
en: 'Video format not supported',
|
|
77
|
+
pt: 'Formato de vídeo não suportado',
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* A fully configurable video player component with custom controls.
|
|
82
|
+
*
|
|
83
|
+
* @slot - Default slot (unused, reserved for future captions/overlays)
|
|
84
|
+
*/
|
|
85
|
+
export class CoVideo {
|
|
86
|
+
constructor() {
|
|
87
|
+
// ═══════════════════════════════════════════════════
|
|
88
|
+
// SOURCE & BEHAVIOR PROPS
|
|
89
|
+
// ═══════════════════════════════════════════════════
|
|
90
|
+
/** Video source URL */
|
|
91
|
+
this.src = '';
|
|
92
|
+
/** Poster/thumbnail image URL */
|
|
93
|
+
this.poster = '';
|
|
94
|
+
/** MIME type hint */
|
|
95
|
+
this.type = '';
|
|
96
|
+
/** Preload behavior */
|
|
97
|
+
this.preload = 'metadata';
|
|
98
|
+
/** Auto-start playback (requires muted for browser autoplay) */
|
|
99
|
+
this.autoplay = false;
|
|
100
|
+
/** Loop playback */
|
|
101
|
+
this.loop = false;
|
|
102
|
+
/** Muted state */
|
|
103
|
+
this.muted = false;
|
|
104
|
+
/** Initial volume (0-1) */
|
|
105
|
+
this.volume = 1;
|
|
106
|
+
/** Current playback position in seconds (enables resume) */
|
|
107
|
+
this.currentTime = 0;
|
|
108
|
+
/** Playback speed */
|
|
109
|
+
this.playbackRate = 1;
|
|
110
|
+
/** Available playback speeds (JSON array string) */
|
|
111
|
+
this.playbackRates = '[0.5, 0.75, 1, 1.25, 1.5, 2]';
|
|
112
|
+
// ═══════════════════════════════════════════════════
|
|
113
|
+
// CONTROL VISIBILITY PROPS
|
|
114
|
+
// ═══════════════════════════════════════════════════
|
|
115
|
+
/** Master toggle for custom control bar */
|
|
116
|
+
this.controls = true;
|
|
117
|
+
/** Show play/pause button */
|
|
118
|
+
this.showPlay = true;
|
|
119
|
+
/** Show volume controls */
|
|
120
|
+
this.showVolume = true;
|
|
121
|
+
/** Show progress/seek bar */
|
|
122
|
+
this.showProgress = true;
|
|
123
|
+
/** Show time display */
|
|
124
|
+
this.showTime = true;
|
|
125
|
+
/** Show fullscreen button */
|
|
126
|
+
this.showFullscreen = true;
|
|
127
|
+
/** Show playback speed selector */
|
|
128
|
+
this.showSpeed = false;
|
|
129
|
+
/** Show Picture-in-Picture button */
|
|
130
|
+
this.showPip = false;
|
|
131
|
+
/** Show download button */
|
|
132
|
+
this.showDownload = false;
|
|
133
|
+
// ═══════════════════════════════════════════════════
|
|
134
|
+
// APPEARANCE & BEHAVIOR PROPS
|
|
135
|
+
// ═══════════════════════════════════════════════════
|
|
136
|
+
/** Enable download functionality */
|
|
137
|
+
this.allowDownload = false;
|
|
138
|
+
/** Container aspect ratio */
|
|
139
|
+
this.aspectRatio = '16:9';
|
|
140
|
+
/** Border radius */
|
|
141
|
+
this.rounded = 'lg';
|
|
142
|
+
/** Auto-hide controls after inactivity */
|
|
143
|
+
this.controlsAutoHide = true;
|
|
144
|
+
/** Milliseconds before controls hide */
|
|
145
|
+
this.controlsAutoHideDelay = 3000;
|
|
146
|
+
/** Disabled state */
|
|
147
|
+
this.disabled = false;
|
|
148
|
+
/** Progress percentage (0-100) that triggers coThresholdReached. 0 = disabled */
|
|
149
|
+
this.watchThreshold = 0;
|
|
150
|
+
/** Language for labels and aria attributes */
|
|
151
|
+
this.locale = 'es';
|
|
152
|
+
// ═══════════════════════════════════════════════════
|
|
153
|
+
// STATE
|
|
154
|
+
// ═══════════════════════════════════════════════════
|
|
155
|
+
this.isPlaying = false;
|
|
156
|
+
this.internalCurrentTime = 0;
|
|
157
|
+
this.duration = 0;
|
|
158
|
+
this.buffered = 0;
|
|
159
|
+
this.volumeLevel = 1;
|
|
160
|
+
this.isMuted = false;
|
|
161
|
+
this.isFullscreen = false;
|
|
162
|
+
this.internalPlaybackRate = 1;
|
|
163
|
+
this.isLoading = true;
|
|
164
|
+
this.showControlBar = true;
|
|
165
|
+
this.hasError = false;
|
|
166
|
+
this.errorMessage = '';
|
|
167
|
+
this.showSpeedMenu = false;
|
|
168
|
+
this.isPip = false;
|
|
169
|
+
this.thresholdFired = false;
|
|
170
|
+
this.hasStarted = false;
|
|
171
|
+
this.isSeeking = false;
|
|
172
|
+
this.showVolumeSlider = false;
|
|
173
|
+
this.lastTimeUpdateEmit = 0;
|
|
174
|
+
this.parsedRates = [0.5, 0.75, 1, 1.25, 1.5, 2];
|
|
175
|
+
this.seekFromTime = 0;
|
|
176
|
+
this.externalTimeUpdate = false;
|
|
177
|
+
// ── Controls auto-hide ──────────────────────────
|
|
178
|
+
this.resetControlsTimer = () => {
|
|
179
|
+
if (!this.controlsAutoHide || !this.controls)
|
|
180
|
+
return;
|
|
181
|
+
this.showControlBar = true;
|
|
182
|
+
if (this.controlsTimer)
|
|
183
|
+
clearTimeout(this.controlsTimer);
|
|
184
|
+
this.controlsTimer = setTimeout(() => {
|
|
185
|
+
if (this.isPlaying && !this.showSpeedMenu) {
|
|
186
|
+
this.showControlBar = false;
|
|
187
|
+
}
|
|
188
|
+
}, this.controlsAutoHideDelay);
|
|
189
|
+
};
|
|
190
|
+
this.handleContainerMouseMove = () => {
|
|
191
|
+
this.resetControlsTimer();
|
|
192
|
+
};
|
|
193
|
+
this.handleContainerMouseLeave = () => {
|
|
194
|
+
if (this.isPlaying && this.controlsAutoHide) {
|
|
195
|
+
this.showControlBar = false;
|
|
196
|
+
this.showSpeedMenu = false;
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
this.handleContainerTouchStart = () => {
|
|
200
|
+
if (this.showControlBar && this.isPlaying) {
|
|
201
|
+
this.showControlBar = false;
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
this.resetControlsTimer();
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
// ── Video event handlers ────────────────────────
|
|
208
|
+
this.onLoadedMetadata = () => {
|
|
209
|
+
if (!this.videoEl)
|
|
210
|
+
return;
|
|
211
|
+
this.duration = this.videoEl.duration;
|
|
212
|
+
this.hasError = false;
|
|
213
|
+
this.coReady.emit({ duration: this.duration });
|
|
214
|
+
if (this.currentTime > 0 && this.currentTime < this.duration) {
|
|
215
|
+
this.videoEl.currentTime = this.currentTime;
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
this.onPlay = () => {
|
|
219
|
+
this.isPlaying = true;
|
|
220
|
+
this.hasStarted = true;
|
|
221
|
+
this.coPlay.emit();
|
|
222
|
+
this.resetControlsTimer();
|
|
223
|
+
};
|
|
224
|
+
this.onPause = () => {
|
|
225
|
+
this.isPlaying = false;
|
|
226
|
+
this.showControlBar = true;
|
|
227
|
+
this.coPause.emit();
|
|
228
|
+
if (this.controlsTimer)
|
|
229
|
+
clearTimeout(this.controlsTimer);
|
|
230
|
+
};
|
|
231
|
+
this.onEnded = () => {
|
|
232
|
+
this.isPlaying = false;
|
|
233
|
+
this.showControlBar = true;
|
|
234
|
+
this.coEnded.emit();
|
|
235
|
+
};
|
|
236
|
+
this.onTimeUpdate = () => {
|
|
237
|
+
if (!this.videoEl || this.isSeeking)
|
|
238
|
+
return;
|
|
239
|
+
this.internalCurrentTime = this.videoEl.currentTime;
|
|
240
|
+
this.externalTimeUpdate = true;
|
|
241
|
+
this.currentTime = this.videoEl.currentTime;
|
|
242
|
+
const now = performance.now();
|
|
243
|
+
if (now - this.lastTimeUpdateEmit > 250) {
|
|
244
|
+
this.lastTimeUpdateEmit = now;
|
|
245
|
+
const pct = this.duration > 0 ? Math.round((this.internalCurrentTime / this.duration) * 100) : 0;
|
|
246
|
+
this.coTimeUpdate.emit({
|
|
247
|
+
currentTime: this.internalCurrentTime,
|
|
248
|
+
duration: this.duration,
|
|
249
|
+
progressPercent: pct,
|
|
250
|
+
});
|
|
251
|
+
if (this.watchThreshold > 0 && !this.thresholdFired && pct >= this.watchThreshold) {
|
|
252
|
+
this.thresholdFired = true;
|
|
253
|
+
this.coThresholdReached.emit({
|
|
254
|
+
threshold: this.watchThreshold,
|
|
255
|
+
currentTime: this.internalCurrentTime,
|
|
256
|
+
duration: this.duration,
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
this.onWaiting = () => {
|
|
262
|
+
this.isLoading = true;
|
|
263
|
+
};
|
|
264
|
+
this.onCanPlay = () => {
|
|
265
|
+
this.isLoading = false;
|
|
266
|
+
};
|
|
267
|
+
this.onError = () => {
|
|
268
|
+
var _a, _b;
|
|
269
|
+
if (!((_a = this.videoEl) === null || _a === void 0 ? void 0 : _a.error))
|
|
270
|
+
return;
|
|
271
|
+
const code = this.videoEl.error.code;
|
|
272
|
+
const message = ((_b = ERROR_MESSAGES[code]) === null || _b === void 0 ? void 0 : _b[this.locale]) || this.t.error;
|
|
273
|
+
this.hasError = true;
|
|
274
|
+
this.errorMessage = message;
|
|
275
|
+
this.isLoading = false;
|
|
276
|
+
this.coError.emit({ code, message });
|
|
277
|
+
};
|
|
278
|
+
this.onProgress = () => {
|
|
279
|
+
if (!this.videoEl || this.duration <= 0)
|
|
280
|
+
return;
|
|
281
|
+
const buf = this.videoEl.buffered;
|
|
282
|
+
if (buf.length > 0) {
|
|
283
|
+
this.buffered = (buf.end(buf.length - 1) / this.duration) * 100;
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
this.onNativeVolumeChange = () => {
|
|
287
|
+
if (!this.videoEl)
|
|
288
|
+
return;
|
|
289
|
+
this.volumeLevel = this.videoEl.volume;
|
|
290
|
+
this.isMuted = this.videoEl.muted;
|
|
291
|
+
this.volume = this.videoEl.volume;
|
|
292
|
+
this.muted = this.videoEl.muted;
|
|
293
|
+
this.coVolumeChange.emit({ volume: this.volumeLevel, muted: this.isMuted });
|
|
294
|
+
};
|
|
295
|
+
this.onNativeRateChange = () => {
|
|
296
|
+
if (!this.videoEl)
|
|
297
|
+
return;
|
|
298
|
+
this.internalPlaybackRate = this.videoEl.playbackRate;
|
|
299
|
+
this.playbackRate = this.videoEl.playbackRate;
|
|
300
|
+
this.coPlaybackRateChange.emit({ rate: this.internalPlaybackRate });
|
|
301
|
+
};
|
|
302
|
+
// ── Control interactions ────────────────────────
|
|
303
|
+
this.handlePlayClick = () => {
|
|
304
|
+
if (this.disabled || !this.videoEl)
|
|
305
|
+
return;
|
|
306
|
+
if (this.isPlaying) {
|
|
307
|
+
this.videoEl.pause();
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
this.videoEl.play().catch(() => { });
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
this.handleBigPlayClick = () => {
|
|
314
|
+
if (this.disabled)
|
|
315
|
+
return;
|
|
316
|
+
this.handlePlayClick();
|
|
317
|
+
};
|
|
318
|
+
this.handleMuteClick = () => {
|
|
319
|
+
if (this.disabled || !this.videoEl)
|
|
320
|
+
return;
|
|
321
|
+
this.videoEl.muted = !this.videoEl.muted;
|
|
322
|
+
};
|
|
323
|
+
this.isDraggingVolume = false;
|
|
324
|
+
this.handleVolumeMouseEnter = () => {
|
|
325
|
+
this.showVolumeSlider = true;
|
|
326
|
+
};
|
|
327
|
+
this.handleVolumeMouseLeave = () => {
|
|
328
|
+
if (!this.isDraggingVolume) {
|
|
329
|
+
this.showVolumeSlider = false;
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
// ── Progress bar seek ───────────────────────────
|
|
333
|
+
this.handleProgressPointerDown = (e) => {
|
|
334
|
+
if (this.disabled || !this.videoEl)
|
|
335
|
+
return;
|
|
336
|
+
e.preventDefault();
|
|
337
|
+
this.isSeeking = true;
|
|
338
|
+
this.seekFromTime = this.videoEl.currentTime;
|
|
339
|
+
this.seekFromPointerEvent(e);
|
|
340
|
+
const onMove = (ev) => this.seekFromPointerEvent(ev);
|
|
341
|
+
const onUp = () => {
|
|
342
|
+
if (this.videoEl) {
|
|
343
|
+
this.coSeeked.emit({ from: this.seekFromTime, to: this.videoEl.currentTime });
|
|
344
|
+
}
|
|
345
|
+
this.isSeeking = false;
|
|
346
|
+
document.removeEventListener('pointermove', onMove);
|
|
347
|
+
document.removeEventListener('pointerup', onUp);
|
|
348
|
+
};
|
|
349
|
+
document.addEventListener('pointermove', onMove);
|
|
350
|
+
document.addEventListener('pointerup', onUp);
|
|
351
|
+
};
|
|
352
|
+
// ── Volume slider ──────────────────────────────
|
|
353
|
+
this.handleVolumePointerDown = (e) => {
|
|
354
|
+
if (this.disabled || !this.videoEl)
|
|
355
|
+
return;
|
|
356
|
+
e.preventDefault();
|
|
357
|
+
e.stopPropagation();
|
|
358
|
+
this.isDraggingVolume = true;
|
|
359
|
+
this.showVolumeSlider = true;
|
|
360
|
+
this.setVolumeFromPointerEvent(e);
|
|
361
|
+
const onMove = (ev) => this.setVolumeFromPointerEvent(ev);
|
|
362
|
+
const onUp = () => {
|
|
363
|
+
this.isDraggingVolume = false;
|
|
364
|
+
document.removeEventListener('pointermove', onMove);
|
|
365
|
+
document.removeEventListener('pointerup', onUp);
|
|
366
|
+
};
|
|
367
|
+
document.addEventListener('pointermove', onMove);
|
|
368
|
+
document.addEventListener('pointerup', onUp);
|
|
369
|
+
};
|
|
370
|
+
// ── Speed menu ─────────────────────────────────
|
|
371
|
+
this.handleSpeedClick = (e) => {
|
|
372
|
+
e.stopPropagation();
|
|
373
|
+
this.showSpeedMenu = !this.showSpeedMenu;
|
|
374
|
+
};
|
|
375
|
+
this.handleSpeedSelect = (rate) => {
|
|
376
|
+
if (this.disabled || !this.videoEl)
|
|
377
|
+
return;
|
|
378
|
+
this.videoEl.playbackRate = rate;
|
|
379
|
+
this.showSpeedMenu = false;
|
|
380
|
+
};
|
|
381
|
+
// ── Fullscreen ─────────────────────────────────
|
|
382
|
+
this.handleFullscreenClick = () => {
|
|
383
|
+
if (this.disabled)
|
|
384
|
+
return;
|
|
385
|
+
const fsEl = document.fullscreenElement || document.webkitFullscreenElement;
|
|
386
|
+
if (fsEl) {
|
|
387
|
+
if (document.exitFullscreen) {
|
|
388
|
+
document.exitFullscreen().catch(() => { });
|
|
389
|
+
}
|
|
390
|
+
else if (document.webkitExitFullscreen) {
|
|
391
|
+
document.webkitExitFullscreen();
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
else {
|
|
395
|
+
const target = this.el;
|
|
396
|
+
if (target.requestFullscreen) {
|
|
397
|
+
target.requestFullscreen().catch(() => { });
|
|
398
|
+
}
|
|
399
|
+
else if (target.webkitRequestFullscreen) {
|
|
400
|
+
target.webkitRequestFullscreen();
|
|
401
|
+
}
|
|
402
|
+
else if (this.videoEl && this.videoEl.webkitEnterFullscreen) {
|
|
403
|
+
this.videoEl.webkitEnterFullscreen();
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
};
|
|
407
|
+
this.handleFullscreenChange = () => {
|
|
408
|
+
const fsEl = document.fullscreenElement || document.webkitFullscreenElement;
|
|
409
|
+
this.isFullscreen = fsEl === this.el;
|
|
410
|
+
this.coFullscreenChange.emit({ fullscreen: this.isFullscreen });
|
|
411
|
+
};
|
|
412
|
+
// ── Picture-in-Picture ─────────────────────────
|
|
413
|
+
this.handlePipClick = async () => {
|
|
414
|
+
if (this.disabled || !this.videoEl)
|
|
415
|
+
return;
|
|
416
|
+
try {
|
|
417
|
+
if (this.isPip) {
|
|
418
|
+
await document.exitPictureInPicture();
|
|
419
|
+
}
|
|
420
|
+
else {
|
|
421
|
+
await this.videoEl.requestPictureInPicture();
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
catch (_a) {
|
|
425
|
+
// PiP not available
|
|
426
|
+
}
|
|
427
|
+
};
|
|
428
|
+
this.handleEnterPip = () => {
|
|
429
|
+
this.isPip = true;
|
|
430
|
+
this.coPipChange.emit({ pip: true });
|
|
431
|
+
};
|
|
432
|
+
this.handleLeavePip = () => {
|
|
433
|
+
this.isPip = false;
|
|
434
|
+
this.coPipChange.emit({ pip: false });
|
|
435
|
+
};
|
|
436
|
+
// ── Download ───────────────────────────────────
|
|
437
|
+
this.handleDownloadClick = () => {
|
|
438
|
+
if (!this.allowDownload || !this.src)
|
|
439
|
+
return;
|
|
440
|
+
this.coDownload.emit({ src: this.src });
|
|
441
|
+
const a = document.createElement('a');
|
|
442
|
+
a.href = this.src;
|
|
443
|
+
a.download = '';
|
|
444
|
+
a.target = '_blank';
|
|
445
|
+
a.rel = 'noopener';
|
|
446
|
+
document.body.appendChild(a);
|
|
447
|
+
a.click();
|
|
448
|
+
document.body.removeChild(a);
|
|
449
|
+
};
|
|
450
|
+
// ── Retry ──────────────────────────────────────
|
|
451
|
+
this.handleRetryClick = () => {
|
|
452
|
+
if (!this.videoEl)
|
|
453
|
+
return;
|
|
454
|
+
this.hasError = false;
|
|
455
|
+
this.errorMessage = '';
|
|
456
|
+
this.isLoading = true;
|
|
457
|
+
this.videoEl.load();
|
|
458
|
+
};
|
|
459
|
+
// ── Keyboard ───────────────────────────────────
|
|
460
|
+
this.handleKeyDown = (e) => {
|
|
461
|
+
var _a, _b;
|
|
462
|
+
if (this.disabled || !this.videoEl)
|
|
463
|
+
return;
|
|
464
|
+
const tag = (_b = (_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName) === null || _b === void 0 ? void 0 : _b.toLowerCase();
|
|
465
|
+
if (tag === 'input' || tag === 'textarea')
|
|
466
|
+
return;
|
|
467
|
+
switch (e.key) {
|
|
468
|
+
case ' ':
|
|
469
|
+
case 'k':
|
|
470
|
+
case 'K':
|
|
471
|
+
e.preventDefault();
|
|
472
|
+
this.handlePlayClick();
|
|
473
|
+
break;
|
|
474
|
+
case 'ArrowRight':
|
|
475
|
+
e.preventDefault();
|
|
476
|
+
this.videoEl.currentTime = Math.min(this.duration, this.videoEl.currentTime + 5);
|
|
477
|
+
break;
|
|
478
|
+
case 'ArrowLeft':
|
|
479
|
+
e.preventDefault();
|
|
480
|
+
this.videoEl.currentTime = Math.max(0, this.videoEl.currentTime - 5);
|
|
481
|
+
break;
|
|
482
|
+
case 'ArrowUp':
|
|
483
|
+
e.preventDefault();
|
|
484
|
+
this.videoEl.volume = Math.min(1, this.videoEl.volume + 0.1);
|
|
485
|
+
break;
|
|
486
|
+
case 'ArrowDown':
|
|
487
|
+
e.preventDefault();
|
|
488
|
+
this.videoEl.volume = Math.max(0, this.videoEl.volume - 0.1);
|
|
489
|
+
break;
|
|
490
|
+
case 'm':
|
|
491
|
+
case 'M':
|
|
492
|
+
e.preventDefault();
|
|
493
|
+
this.handleMuteClick();
|
|
494
|
+
break;
|
|
495
|
+
case 'f':
|
|
496
|
+
case 'F':
|
|
497
|
+
e.preventDefault();
|
|
498
|
+
this.handleFullscreenClick();
|
|
499
|
+
break;
|
|
500
|
+
case 'Escape':
|
|
501
|
+
if (this.showSpeedMenu) {
|
|
502
|
+
e.preventDefault();
|
|
503
|
+
this.showSpeedMenu = false;
|
|
504
|
+
}
|
|
505
|
+
break;
|
|
506
|
+
}
|
|
507
|
+
};
|
|
508
|
+
// ── Click on video area (toggle play) ──────────
|
|
509
|
+
this.handleVideoAreaClick = () => {
|
|
510
|
+
if (this.disabled)
|
|
511
|
+
return;
|
|
512
|
+
this.handlePlayClick();
|
|
513
|
+
this.resetControlsTimer();
|
|
514
|
+
};
|
|
515
|
+
}
|
|
516
|
+
// ═══════════════════════════════════════════════════
|
|
517
|
+
// i18n HELPER
|
|
518
|
+
// ═══════════════════════════════════════════════════
|
|
519
|
+
get t() {
|
|
520
|
+
return VIDEO_I18N[this.locale] || VIDEO_I18N['es'];
|
|
521
|
+
}
|
|
522
|
+
// ═══════════════════════════════════════════════════
|
|
523
|
+
// COMPUTED
|
|
524
|
+
// ═══════════════════════════════════════════════════
|
|
525
|
+
get progressPercent() {
|
|
526
|
+
if (this.duration <= 0)
|
|
527
|
+
return 0;
|
|
528
|
+
return (this.internalCurrentTime / this.duration) * 100;
|
|
529
|
+
}
|
|
530
|
+
get pipSupported() {
|
|
531
|
+
return typeof document !== 'undefined' && 'pictureInPictureEnabled' in document && document.pictureInPictureEnabled;
|
|
532
|
+
}
|
|
533
|
+
// ═══════════════════════════════════════════════════
|
|
534
|
+
// WATCHERS
|
|
535
|
+
// ═══════════════════════════════════════════════════
|
|
536
|
+
onSrcChange() {
|
|
537
|
+
this.resetState();
|
|
538
|
+
}
|
|
539
|
+
onMutedChange() {
|
|
540
|
+
if (this.videoEl)
|
|
541
|
+
this.videoEl.muted = this.muted;
|
|
542
|
+
this.isMuted = this.muted;
|
|
543
|
+
}
|
|
544
|
+
onVolumeChange() {
|
|
545
|
+
const clamped = Math.max(0, Math.min(1, this.volume));
|
|
546
|
+
if (this.videoEl)
|
|
547
|
+
this.videoEl.volume = clamped;
|
|
548
|
+
this.volumeLevel = clamped;
|
|
549
|
+
}
|
|
550
|
+
onCurrentTimeChange() {
|
|
551
|
+
if (this.externalTimeUpdate) {
|
|
552
|
+
this.externalTimeUpdate = false;
|
|
553
|
+
return;
|
|
554
|
+
}
|
|
555
|
+
if (this.videoEl && Math.abs(this.videoEl.currentTime - this.currentTime) > 0.5) {
|
|
556
|
+
this.videoEl.currentTime = this.currentTime;
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
onPlaybackRateChange() {
|
|
560
|
+
if (this.videoEl)
|
|
561
|
+
this.videoEl.playbackRate = this.playbackRate;
|
|
562
|
+
this.internalPlaybackRate = this.playbackRate;
|
|
563
|
+
}
|
|
564
|
+
onPlaybackRatesChange() {
|
|
565
|
+
this.parseRates();
|
|
566
|
+
}
|
|
567
|
+
// ═══════════════════════════════════════════════════
|
|
568
|
+
// LIFECYCLE
|
|
569
|
+
// ═══════════════════════════════════════════════════
|
|
570
|
+
componentWillLoad() {
|
|
571
|
+
this.parseRates();
|
|
572
|
+
this.volumeLevel = Math.max(0, Math.min(1, this.volume));
|
|
573
|
+
this.isMuted = this.muted;
|
|
574
|
+
this.internalPlaybackRate = this.playbackRate;
|
|
575
|
+
}
|
|
576
|
+
componentDidLoad() {
|
|
577
|
+
if (this.videoEl) {
|
|
578
|
+
this.bindVideoEvents();
|
|
579
|
+
this.videoEl.volume = this.volumeLevel;
|
|
580
|
+
this.videoEl.muted = this.isMuted;
|
|
581
|
+
this.videoEl.playbackRate = this.internalPlaybackRate;
|
|
582
|
+
if (this.autoplay && this.muted) {
|
|
583
|
+
this.videoEl.play().catch(() => { });
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
document.addEventListener('fullscreenchange', this.handleFullscreenChange);
|
|
587
|
+
document.addEventListener('webkitfullscreenchange', this.handleFullscreenChange);
|
|
588
|
+
}
|
|
589
|
+
disconnectedCallback() {
|
|
590
|
+
if (this.controlsTimer)
|
|
591
|
+
clearTimeout(this.controlsTimer);
|
|
592
|
+
document.removeEventListener('fullscreenchange', this.handleFullscreenChange);
|
|
593
|
+
document.removeEventListener('webkitfullscreenchange', this.handleFullscreenChange);
|
|
594
|
+
if (this.videoEl) {
|
|
595
|
+
this.videoEl.removeEventListener('loadedmetadata', this.onLoadedMetadata);
|
|
596
|
+
this.videoEl.removeEventListener('play', this.onPlay);
|
|
597
|
+
this.videoEl.removeEventListener('pause', this.onPause);
|
|
598
|
+
this.videoEl.removeEventListener('ended', this.onEnded);
|
|
599
|
+
this.videoEl.removeEventListener('timeupdate', this.onTimeUpdate);
|
|
600
|
+
this.videoEl.removeEventListener('waiting', this.onWaiting);
|
|
601
|
+
this.videoEl.removeEventListener('canplay', this.onCanPlay);
|
|
602
|
+
this.videoEl.removeEventListener('error', this.onError);
|
|
603
|
+
this.videoEl.removeEventListener('progress', this.onProgress);
|
|
604
|
+
this.videoEl.removeEventListener('volumechange', this.onNativeVolumeChange);
|
|
605
|
+
this.videoEl.removeEventListener('ratechange', this.onNativeRateChange);
|
|
606
|
+
this.videoEl.removeEventListener('enterpictureinpicture', this.handleEnterPip);
|
|
607
|
+
this.videoEl.removeEventListener('leavepictureinpicture', this.handleLeavePip);
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
// ═══════════════════════════════════════════════════
|
|
611
|
+
// PUBLIC METHODS
|
|
612
|
+
// ═══════════════════════════════════════════════════
|
|
613
|
+
async play() {
|
|
614
|
+
var _a;
|
|
615
|
+
await ((_a = this.videoEl) === null || _a === void 0 ? void 0 : _a.play());
|
|
616
|
+
}
|
|
617
|
+
async pause() {
|
|
618
|
+
var _a;
|
|
619
|
+
(_a = this.videoEl) === null || _a === void 0 ? void 0 : _a.pause();
|
|
620
|
+
}
|
|
621
|
+
async togglePlay() {
|
|
622
|
+
var _a, _b;
|
|
623
|
+
if (this.isPlaying) {
|
|
624
|
+
(_a = this.videoEl) === null || _a === void 0 ? void 0 : _a.pause();
|
|
625
|
+
}
|
|
626
|
+
else {
|
|
627
|
+
await ((_b = this.videoEl) === null || _b === void 0 ? void 0 : _b.play());
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
async seek(time) {
|
|
631
|
+
if (this.videoEl) {
|
|
632
|
+
this.videoEl.currentTime = time;
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
async setVolume(level) {
|
|
636
|
+
const clamped = Math.max(0, Math.min(1, level));
|
|
637
|
+
this.volume = clamped;
|
|
638
|
+
if (this.videoEl)
|
|
639
|
+
this.videoEl.volume = clamped;
|
|
640
|
+
this.volumeLevel = clamped;
|
|
641
|
+
}
|
|
642
|
+
async toggleMute() {
|
|
643
|
+
this.handleMuteClick();
|
|
644
|
+
}
|
|
645
|
+
async toggleFullscreen() {
|
|
646
|
+
this.handleFullscreenClick();
|
|
647
|
+
}
|
|
648
|
+
async togglePip() {
|
|
649
|
+
this.handlePipClick();
|
|
650
|
+
}
|
|
651
|
+
// ═══════════════════════════════════════════════════
|
|
652
|
+
// PRIVATE METHODS
|
|
653
|
+
// ═══════════════════════════════════════════════════
|
|
654
|
+
parseRates() {
|
|
655
|
+
try {
|
|
656
|
+
const parsed = JSON.parse(this.playbackRates);
|
|
657
|
+
if (Array.isArray(parsed)) {
|
|
658
|
+
this.parsedRates = parsed.filter(r => typeof r === 'number' && r > 0).sort((a, b) => a - b);
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
catch (_a) {
|
|
662
|
+
this.parsedRates = [0.5, 0.75, 1, 1.25, 1.5, 2];
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
resetState() {
|
|
666
|
+
this.isPlaying = false;
|
|
667
|
+
this.internalCurrentTime = 0;
|
|
668
|
+
this.duration = 0;
|
|
669
|
+
this.buffered = 0;
|
|
670
|
+
this.hasError = false;
|
|
671
|
+
this.errorMessage = '';
|
|
672
|
+
this.thresholdFired = false;
|
|
673
|
+
this.hasStarted = false;
|
|
674
|
+
this.isLoading = true;
|
|
675
|
+
this.showSpeedMenu = false;
|
|
676
|
+
}
|
|
677
|
+
bindVideoEvents() {
|
|
678
|
+
if (!this.videoEl)
|
|
679
|
+
return;
|
|
680
|
+
this.videoEl.addEventListener('loadedmetadata', this.onLoadedMetadata);
|
|
681
|
+
this.videoEl.addEventListener('play', this.onPlay);
|
|
682
|
+
this.videoEl.addEventListener('pause', this.onPause);
|
|
683
|
+
this.videoEl.addEventListener('ended', this.onEnded);
|
|
684
|
+
this.videoEl.addEventListener('timeupdate', this.onTimeUpdate);
|
|
685
|
+
this.videoEl.addEventListener('waiting', this.onWaiting);
|
|
686
|
+
this.videoEl.addEventListener('canplay', this.onCanPlay);
|
|
687
|
+
this.videoEl.addEventListener('error', this.onError);
|
|
688
|
+
this.videoEl.addEventListener('progress', this.onProgress);
|
|
689
|
+
this.videoEl.addEventListener('volumechange', this.onNativeVolumeChange);
|
|
690
|
+
this.videoEl.addEventListener('ratechange', this.onNativeRateChange);
|
|
691
|
+
this.videoEl.addEventListener('enterpictureinpicture', this.handleEnterPip);
|
|
692
|
+
this.videoEl.addEventListener('leavepictureinpicture', this.handleLeavePip);
|
|
693
|
+
}
|
|
694
|
+
formatTime(seconds) {
|
|
695
|
+
if (!isFinite(seconds) || seconds < 0)
|
|
696
|
+
return '0:00';
|
|
697
|
+
const h = Math.floor(seconds / 3600);
|
|
698
|
+
const m = Math.floor((seconds % 3600) / 60);
|
|
699
|
+
const s = Math.floor(seconds % 60);
|
|
700
|
+
if (h > 0) {
|
|
701
|
+
return `${h}:${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`;
|
|
702
|
+
}
|
|
703
|
+
return `${m}:${s.toString().padStart(2, '0')}`;
|
|
704
|
+
}
|
|
705
|
+
seekFromPointerEvent(e) {
|
|
706
|
+
if (!this.progressTrackEl || !this.videoEl)
|
|
707
|
+
return;
|
|
708
|
+
const rect = this.progressTrackEl.getBoundingClientRect();
|
|
709
|
+
const ratio = Math.max(0, Math.min(1, (e.clientX - rect.left) / rect.width));
|
|
710
|
+
const time = ratio * this.duration;
|
|
711
|
+
this.videoEl.currentTime = time;
|
|
712
|
+
this.internalCurrentTime = time;
|
|
713
|
+
}
|
|
714
|
+
setVolumeFromPointerEvent(e) {
|
|
715
|
+
if (!this.volumeTrackEl || !this.videoEl)
|
|
716
|
+
return;
|
|
717
|
+
const rect = this.volumeTrackEl.getBoundingClientRect();
|
|
718
|
+
const ratio = Math.max(0, Math.min(1, (e.clientX - rect.left) / rect.width));
|
|
719
|
+
this.videoEl.volume = ratio;
|
|
720
|
+
if (ratio > 0 && this.videoEl.muted) {
|
|
721
|
+
this.videoEl.muted = false;
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
// ═══════════════════════════════════════════════════
|
|
725
|
+
// RENDER HELPERS
|
|
726
|
+
// ═══════════════════════════════════════════════════
|
|
727
|
+
renderBigPlayButton() {
|
|
728
|
+
if (this.isPlaying || this.hasError || this.isLoading)
|
|
729
|
+
return null;
|
|
730
|
+
return (h("button", { class: "co-video__big-play", part: "big-play", onClick: this.handleBigPlayClick, "aria-label": this.t.play, tabindex: "-1" }, h("div", { class: "co-video__big-play-circle" }, h("co-icon", { name: "play", size: 32, weight: "fill" }))));
|
|
731
|
+
}
|
|
732
|
+
renderPoster() {
|
|
733
|
+
if (!this.poster || this.hasStarted)
|
|
734
|
+
return null;
|
|
735
|
+
return (h("div", { class: "co-video__poster", part: "poster", style: { backgroundImage: `url(${this.poster})` } }));
|
|
736
|
+
}
|
|
737
|
+
renderLoader() {
|
|
738
|
+
if (!this.isLoading || this.hasError)
|
|
739
|
+
return null;
|
|
740
|
+
return (h("div", { class: "co-video__loader" }, h("div", { class: "co-video__spinner" })));
|
|
741
|
+
}
|
|
742
|
+
renderError() {
|
|
743
|
+
if (!this.hasError)
|
|
744
|
+
return null;
|
|
745
|
+
return (h("div", { class: "co-video__error" }, h("co-icon", { name: "warning-circle", size: 48, weight: "regular" }), h("p", { class: "co-video__error-text" }, this.errorMessage || this.t.error), h("button", { class: "co-video__error-retry", onClick: this.handleRetryClick }, h("co-icon", { name: "arrow-clockwise", size: 16, weight: "bold" }), this.t.retry)));
|
|
746
|
+
}
|
|
747
|
+
renderProgressBar() {
|
|
748
|
+
if (!this.showProgress)
|
|
749
|
+
return null;
|
|
750
|
+
const playedPct = this.progressPercent;
|
|
751
|
+
const bufferedPct = this.buffered;
|
|
752
|
+
return (h("div", { class: "co-video__progress", part: "progress", role: "slider", "aria-label": this.t.seek, "aria-valuenow": Math.round(this.internalCurrentTime), "aria-valuemin": 0, "aria-valuemax": Math.round(this.duration), tabindex: 0, ref: el => (this.progressTrackEl = el), onPointerDown: this.handleProgressPointerDown }, h("div", { class: "co-video__progress-track" }, h("div", { class: "co-video__progress-buffered", style: { width: `${bufferedPct}%` } }), h("div", { class: "co-video__progress-played", style: { width: `${playedPct}%` } })), h("div", { class: "co-video__progress-thumb", style: { left: `${playedPct}%` } })));
|
|
753
|
+
}
|
|
754
|
+
renderVolumeControl() {
|
|
755
|
+
if (!this.showVolume)
|
|
756
|
+
return null;
|
|
757
|
+
const volumePct = this.isMuted ? 0 : this.volumeLevel * 100;
|
|
758
|
+
const volumeIcon = this.isMuted || this.volumeLevel === 0
|
|
759
|
+
? 'speaker-x'
|
|
760
|
+
: this.volumeLevel < 0.5
|
|
761
|
+
? 'speaker-low'
|
|
762
|
+
: 'speaker-high';
|
|
763
|
+
return (h("div", { class: "co-video__volume", onMouseEnter: this.handleVolumeMouseEnter, onMouseLeave: this.handleVolumeMouseLeave }, h("button", { class: "co-video__btn", onClick: this.handleMuteClick, "aria-label": this.isMuted ? this.t.unmute : this.t.mute }, h("co-icon", { name: volumeIcon, size: 20, weight: "fill" })), h("div", { class: { 'co-video__volume-slider-wrap': true, 'co-video__volume-slider-wrap--visible': this.showVolumeSlider } }, h("div", { class: "co-video__volume-slider", onPointerDown: this.handleVolumePointerDown, role: "slider", "aria-label": this.t.volume, "aria-valuenow": Math.round(volumePct), "aria-valuemin": 0, "aria-valuemax": 100 }, h("div", { class: "co-video__volume-track", ref: el => (this.volumeTrackEl = el) }, h("div", { class: "co-video__volume-fill", style: { width: `${volumePct}%` } }), h("div", { class: "co-video__volume-thumb", style: { left: `${volumePct}%` } }))))));
|
|
764
|
+
}
|
|
765
|
+
renderSpeedMenu() {
|
|
766
|
+
if (!this.showSpeed)
|
|
767
|
+
return null;
|
|
768
|
+
const label = this.internalPlaybackRate === 1
|
|
769
|
+
? `1x`
|
|
770
|
+
: `${this.internalPlaybackRate}x`;
|
|
771
|
+
return (h("div", { class: "co-video__speed-wrap" }, h("button", { class: "co-video__btn co-video__btn--speed", onClick: this.handleSpeedClick, "aria-label": this.t.speed, "aria-haspopup": "listbox", "aria-expanded": this.showSpeedMenu ? 'true' : 'false' }, h("span", { class: "co-video__speed-label" }, label)), this.showSpeedMenu && (h("div", { class: "co-video__speed-menu", role: "listbox", "aria-label": this.t.speed }, this.parsedRates.map(rate => (h("button", { class: {
|
|
772
|
+
'co-video__speed-option': true,
|
|
773
|
+
'co-video__speed-option--active': rate === this.internalPlaybackRate,
|
|
774
|
+
}, role: "option", "aria-selected": rate === this.internalPlaybackRate ? 'true' : 'false', onClick: () => this.handleSpeedSelect(rate) }, h("span", null, rate === 1 ? this.t.normal : `${rate}x`), rate === this.internalPlaybackRate && h("co-icon", { name: "check", size: 14, weight: "bold" }))))))));
|
|
775
|
+
}
|
|
776
|
+
renderControls() {
|
|
777
|
+
if (!this.controls)
|
|
778
|
+
return null;
|
|
779
|
+
return (h("div", { class: {
|
|
780
|
+
'co-video__controls': true,
|
|
781
|
+
'co-video__controls--hidden': !this.showControlBar,
|
|
782
|
+
}, part: "controls", onClick: (e) => e.stopPropagation() }, this.renderProgressBar(), h("div", { class: "co-video__toolbar", part: "toolbar" }, h("div", { class: "co-video__toolbar-left" }, this.showPlay && (h("button", { class: "co-video__btn", onClick: this.handlePlayClick, "aria-label": this.isPlaying ? this.t.pause : this.t.play }, h("co-icon", { name: this.isPlaying ? 'pause' : 'play', size: 20, weight: "fill" }))), this.renderVolumeControl(), this.showTime && (h("span", { class: "co-video__time", "aria-live": "off" }, this.formatTime(this.internalCurrentTime), " / ", this.formatTime(this.duration)))), h("div", { class: "co-video__toolbar-right" }, this.renderSpeedMenu(), this.showPip && this.pipSupported && (h("button", { class: "co-video__btn", onClick: this.handlePipClick, "aria-label": this.isPip ? this.t.exitPip : this.t.pip }, h("co-icon", { name: this.isPip ? 'picture-in-picture' : 'picture-in-picture', size: 20, weight: this.isPip ? 'fill' : 'regular' }))), this.showDownload && (h("button", { class: {
|
|
783
|
+
'co-video__btn': true,
|
|
784
|
+
'co-video__btn--disabled': !this.allowDownload,
|
|
785
|
+
}, onClick: this.handleDownloadClick, "aria-label": this.t.download, disabled: !this.allowDownload }, h("co-icon", { name: "download-simple", size: 20, weight: "regular" }))), this.showFullscreen && (h("button", { class: "co-video__btn", onClick: this.handleFullscreenClick, "aria-label": this.isFullscreen ? this.t.exitFullscreen : this.t.fullscreen }, h("co-icon", { name: this.isFullscreen ? 'corners-in' : 'corners-out', size: 20, weight: "regular" })))))));
|
|
786
|
+
}
|
|
787
|
+
// ═══════════════════════════════════════════════════
|
|
788
|
+
// RENDER
|
|
789
|
+
// ═══════════════════════════════════════════════════
|
|
790
|
+
render() {
|
|
791
|
+
const aspectClass = `co-video--${this.aspectRatio.replace(':', '-')}`;
|
|
792
|
+
return (h(Host, { key: '6c107daa400b98ec6f35e2229f948075ef57ec00' }, h("div", { key: '4c41f12bb65374d91c282e134ecf3129d4510268', class: {
|
|
793
|
+
'co-video': true,
|
|
794
|
+
[aspectClass]: true,
|
|
795
|
+
[`co-video--rounded-${this.rounded}`]: true,
|
|
796
|
+
'co-video--disabled': this.disabled,
|
|
797
|
+
'co-video--fullscreen': this.isFullscreen,
|
|
798
|
+
'co-video--playing': this.isPlaying,
|
|
799
|
+
}, part: "container", ref: el => (this.containerEl = el), role: "region", "aria-label": this.t.player, tabindex: 0, onKeyDown: this.handleKeyDown, onMouseMove: this.handleContainerMouseMove, onMouseLeave: this.handleContainerMouseLeave, onTouchStart: this.handleContainerTouchStart }, h("video", { key: '164a8115e79d73bc3781ae16af99e5cfdcb54a1c', ref: el => (this.videoEl = el), class: "co-video__native", part: "video", src: this.src || undefined, poster: undefined, preload: this.preload, loop: this.loop, playsinline: true, tabindex: -1, controlsList: this.allowDownload ? undefined : 'nodownload' }), this.renderPoster(), this.renderLoader(), this.renderBigPlayButton(), this.renderError(), h("div", { key: 'a03be76edc9eee1cc7dabc896190d4864dae729b', class: "co-video__click-area", onClick: this.handleVideoAreaClick }), this.renderControls())));
|
|
800
|
+
}
|
|
801
|
+
static get is() { return "co-video"; }
|
|
802
|
+
static get encapsulation() { return "shadow"; }
|
|
803
|
+
static get originalStyleUrls() {
|
|
804
|
+
return {
|
|
805
|
+
"$": ["co-video.css"]
|
|
806
|
+
};
|
|
807
|
+
}
|
|
808
|
+
static get styleUrls() {
|
|
809
|
+
return {
|
|
810
|
+
"$": ["co-video.css"]
|
|
811
|
+
};
|
|
812
|
+
}
|
|
813
|
+
static get properties() {
|
|
814
|
+
return {
|
|
815
|
+
"src": {
|
|
816
|
+
"type": "string",
|
|
817
|
+
"mutable": false,
|
|
818
|
+
"complexType": {
|
|
819
|
+
"original": "string",
|
|
820
|
+
"resolved": "string",
|
|
821
|
+
"references": {}
|
|
822
|
+
},
|
|
823
|
+
"required": false,
|
|
824
|
+
"optional": false,
|
|
825
|
+
"docs": {
|
|
826
|
+
"tags": [],
|
|
827
|
+
"text": "Video source URL"
|
|
828
|
+
},
|
|
829
|
+
"getter": false,
|
|
830
|
+
"setter": false,
|
|
831
|
+
"reflect": false,
|
|
832
|
+
"attribute": "src",
|
|
833
|
+
"defaultValue": "''"
|
|
834
|
+
},
|
|
835
|
+
"poster": {
|
|
836
|
+
"type": "string",
|
|
837
|
+
"mutable": false,
|
|
838
|
+
"complexType": {
|
|
839
|
+
"original": "string",
|
|
840
|
+
"resolved": "string",
|
|
841
|
+
"references": {}
|
|
842
|
+
},
|
|
843
|
+
"required": false,
|
|
844
|
+
"optional": false,
|
|
845
|
+
"docs": {
|
|
846
|
+
"tags": [],
|
|
847
|
+
"text": "Poster/thumbnail image URL"
|
|
848
|
+
},
|
|
849
|
+
"getter": false,
|
|
850
|
+
"setter": false,
|
|
851
|
+
"reflect": false,
|
|
852
|
+
"attribute": "poster",
|
|
853
|
+
"defaultValue": "''"
|
|
854
|
+
},
|
|
855
|
+
"type": {
|
|
856
|
+
"type": "string",
|
|
857
|
+
"mutable": false,
|
|
858
|
+
"complexType": {
|
|
859
|
+
"original": "string",
|
|
860
|
+
"resolved": "string",
|
|
861
|
+
"references": {}
|
|
862
|
+
},
|
|
863
|
+
"required": false,
|
|
864
|
+
"optional": false,
|
|
865
|
+
"docs": {
|
|
866
|
+
"tags": [],
|
|
867
|
+
"text": "MIME type hint"
|
|
868
|
+
},
|
|
869
|
+
"getter": false,
|
|
870
|
+
"setter": false,
|
|
871
|
+
"reflect": false,
|
|
872
|
+
"attribute": "type",
|
|
873
|
+
"defaultValue": "''"
|
|
874
|
+
},
|
|
875
|
+
"preload": {
|
|
876
|
+
"type": "string",
|
|
877
|
+
"mutable": false,
|
|
878
|
+
"complexType": {
|
|
879
|
+
"original": "'none' | 'metadata' | 'auto'",
|
|
880
|
+
"resolved": "\"auto\" | \"metadata\" | \"none\"",
|
|
881
|
+
"references": {}
|
|
882
|
+
},
|
|
883
|
+
"required": false,
|
|
884
|
+
"optional": false,
|
|
885
|
+
"docs": {
|
|
886
|
+
"tags": [],
|
|
887
|
+
"text": "Preload behavior"
|
|
888
|
+
},
|
|
889
|
+
"getter": false,
|
|
890
|
+
"setter": false,
|
|
891
|
+
"reflect": false,
|
|
892
|
+
"attribute": "preload",
|
|
893
|
+
"defaultValue": "'metadata'"
|
|
894
|
+
},
|
|
895
|
+
"autoplay": {
|
|
896
|
+
"type": "boolean",
|
|
897
|
+
"mutable": false,
|
|
898
|
+
"complexType": {
|
|
899
|
+
"original": "boolean",
|
|
900
|
+
"resolved": "boolean",
|
|
901
|
+
"references": {}
|
|
902
|
+
},
|
|
903
|
+
"required": false,
|
|
904
|
+
"optional": false,
|
|
905
|
+
"docs": {
|
|
906
|
+
"tags": [],
|
|
907
|
+
"text": "Auto-start playback (requires muted for browser autoplay)"
|
|
908
|
+
},
|
|
909
|
+
"getter": false,
|
|
910
|
+
"setter": false,
|
|
911
|
+
"reflect": false,
|
|
912
|
+
"attribute": "autoplay",
|
|
913
|
+
"defaultValue": "false"
|
|
914
|
+
},
|
|
915
|
+
"loop": {
|
|
916
|
+
"type": "boolean",
|
|
917
|
+
"mutable": false,
|
|
918
|
+
"complexType": {
|
|
919
|
+
"original": "boolean",
|
|
920
|
+
"resolved": "boolean",
|
|
921
|
+
"references": {}
|
|
922
|
+
},
|
|
923
|
+
"required": false,
|
|
924
|
+
"optional": false,
|
|
925
|
+
"docs": {
|
|
926
|
+
"tags": [],
|
|
927
|
+
"text": "Loop playback"
|
|
928
|
+
},
|
|
929
|
+
"getter": false,
|
|
930
|
+
"setter": false,
|
|
931
|
+
"reflect": false,
|
|
932
|
+
"attribute": "loop",
|
|
933
|
+
"defaultValue": "false"
|
|
934
|
+
},
|
|
935
|
+
"muted": {
|
|
936
|
+
"type": "boolean",
|
|
937
|
+
"mutable": true,
|
|
938
|
+
"complexType": {
|
|
939
|
+
"original": "boolean",
|
|
940
|
+
"resolved": "boolean",
|
|
941
|
+
"references": {}
|
|
942
|
+
},
|
|
943
|
+
"required": false,
|
|
944
|
+
"optional": false,
|
|
945
|
+
"docs": {
|
|
946
|
+
"tags": [],
|
|
947
|
+
"text": "Muted state"
|
|
948
|
+
},
|
|
949
|
+
"getter": false,
|
|
950
|
+
"setter": false,
|
|
951
|
+
"reflect": false,
|
|
952
|
+
"attribute": "muted",
|
|
953
|
+
"defaultValue": "false"
|
|
954
|
+
},
|
|
955
|
+
"volume": {
|
|
956
|
+
"type": "number",
|
|
957
|
+
"mutable": true,
|
|
958
|
+
"complexType": {
|
|
959
|
+
"original": "number",
|
|
960
|
+
"resolved": "number",
|
|
961
|
+
"references": {}
|
|
962
|
+
},
|
|
963
|
+
"required": false,
|
|
964
|
+
"optional": false,
|
|
965
|
+
"docs": {
|
|
966
|
+
"tags": [],
|
|
967
|
+
"text": "Initial volume (0-1)"
|
|
968
|
+
},
|
|
969
|
+
"getter": false,
|
|
970
|
+
"setter": false,
|
|
971
|
+
"reflect": false,
|
|
972
|
+
"attribute": "volume",
|
|
973
|
+
"defaultValue": "1"
|
|
974
|
+
},
|
|
975
|
+
"currentTime": {
|
|
976
|
+
"type": "number",
|
|
977
|
+
"mutable": true,
|
|
978
|
+
"complexType": {
|
|
979
|
+
"original": "number",
|
|
980
|
+
"resolved": "number",
|
|
981
|
+
"references": {}
|
|
982
|
+
},
|
|
983
|
+
"required": false,
|
|
984
|
+
"optional": false,
|
|
985
|
+
"docs": {
|
|
986
|
+
"tags": [],
|
|
987
|
+
"text": "Current playback position in seconds (enables resume)"
|
|
988
|
+
},
|
|
989
|
+
"getter": false,
|
|
990
|
+
"setter": false,
|
|
991
|
+
"reflect": false,
|
|
992
|
+
"attribute": "current-time",
|
|
993
|
+
"defaultValue": "0"
|
|
994
|
+
},
|
|
995
|
+
"playbackRate": {
|
|
996
|
+
"type": "number",
|
|
997
|
+
"mutable": true,
|
|
998
|
+
"complexType": {
|
|
999
|
+
"original": "number",
|
|
1000
|
+
"resolved": "number",
|
|
1001
|
+
"references": {}
|
|
1002
|
+
},
|
|
1003
|
+
"required": false,
|
|
1004
|
+
"optional": false,
|
|
1005
|
+
"docs": {
|
|
1006
|
+
"tags": [],
|
|
1007
|
+
"text": "Playback speed"
|
|
1008
|
+
},
|
|
1009
|
+
"getter": false,
|
|
1010
|
+
"setter": false,
|
|
1011
|
+
"reflect": false,
|
|
1012
|
+
"attribute": "playback-rate",
|
|
1013
|
+
"defaultValue": "1"
|
|
1014
|
+
},
|
|
1015
|
+
"playbackRates": {
|
|
1016
|
+
"type": "string",
|
|
1017
|
+
"mutable": false,
|
|
1018
|
+
"complexType": {
|
|
1019
|
+
"original": "string",
|
|
1020
|
+
"resolved": "string",
|
|
1021
|
+
"references": {}
|
|
1022
|
+
},
|
|
1023
|
+
"required": false,
|
|
1024
|
+
"optional": false,
|
|
1025
|
+
"docs": {
|
|
1026
|
+
"tags": [],
|
|
1027
|
+
"text": "Available playback speeds (JSON array string)"
|
|
1028
|
+
},
|
|
1029
|
+
"getter": false,
|
|
1030
|
+
"setter": false,
|
|
1031
|
+
"reflect": false,
|
|
1032
|
+
"attribute": "playback-rates",
|
|
1033
|
+
"defaultValue": "'[0.5, 0.75, 1, 1.25, 1.5, 2]'"
|
|
1034
|
+
},
|
|
1035
|
+
"controls": {
|
|
1036
|
+
"type": "boolean",
|
|
1037
|
+
"mutable": false,
|
|
1038
|
+
"complexType": {
|
|
1039
|
+
"original": "boolean",
|
|
1040
|
+
"resolved": "boolean",
|
|
1041
|
+
"references": {}
|
|
1042
|
+
},
|
|
1043
|
+
"required": false,
|
|
1044
|
+
"optional": false,
|
|
1045
|
+
"docs": {
|
|
1046
|
+
"tags": [],
|
|
1047
|
+
"text": "Master toggle for custom control bar"
|
|
1048
|
+
},
|
|
1049
|
+
"getter": false,
|
|
1050
|
+
"setter": false,
|
|
1051
|
+
"reflect": false,
|
|
1052
|
+
"attribute": "controls",
|
|
1053
|
+
"defaultValue": "true"
|
|
1054
|
+
},
|
|
1055
|
+
"showPlay": {
|
|
1056
|
+
"type": "boolean",
|
|
1057
|
+
"mutable": false,
|
|
1058
|
+
"complexType": {
|
|
1059
|
+
"original": "boolean",
|
|
1060
|
+
"resolved": "boolean",
|
|
1061
|
+
"references": {}
|
|
1062
|
+
},
|
|
1063
|
+
"required": false,
|
|
1064
|
+
"optional": false,
|
|
1065
|
+
"docs": {
|
|
1066
|
+
"tags": [],
|
|
1067
|
+
"text": "Show play/pause button"
|
|
1068
|
+
},
|
|
1069
|
+
"getter": false,
|
|
1070
|
+
"setter": false,
|
|
1071
|
+
"reflect": false,
|
|
1072
|
+
"attribute": "show-play",
|
|
1073
|
+
"defaultValue": "true"
|
|
1074
|
+
},
|
|
1075
|
+
"showVolume": {
|
|
1076
|
+
"type": "boolean",
|
|
1077
|
+
"mutable": false,
|
|
1078
|
+
"complexType": {
|
|
1079
|
+
"original": "boolean",
|
|
1080
|
+
"resolved": "boolean",
|
|
1081
|
+
"references": {}
|
|
1082
|
+
},
|
|
1083
|
+
"required": false,
|
|
1084
|
+
"optional": false,
|
|
1085
|
+
"docs": {
|
|
1086
|
+
"tags": [],
|
|
1087
|
+
"text": "Show volume controls"
|
|
1088
|
+
},
|
|
1089
|
+
"getter": false,
|
|
1090
|
+
"setter": false,
|
|
1091
|
+
"reflect": false,
|
|
1092
|
+
"attribute": "show-volume",
|
|
1093
|
+
"defaultValue": "true"
|
|
1094
|
+
},
|
|
1095
|
+
"showProgress": {
|
|
1096
|
+
"type": "boolean",
|
|
1097
|
+
"mutable": false,
|
|
1098
|
+
"complexType": {
|
|
1099
|
+
"original": "boolean",
|
|
1100
|
+
"resolved": "boolean",
|
|
1101
|
+
"references": {}
|
|
1102
|
+
},
|
|
1103
|
+
"required": false,
|
|
1104
|
+
"optional": false,
|
|
1105
|
+
"docs": {
|
|
1106
|
+
"tags": [],
|
|
1107
|
+
"text": "Show progress/seek bar"
|
|
1108
|
+
},
|
|
1109
|
+
"getter": false,
|
|
1110
|
+
"setter": false,
|
|
1111
|
+
"reflect": false,
|
|
1112
|
+
"attribute": "show-progress",
|
|
1113
|
+
"defaultValue": "true"
|
|
1114
|
+
},
|
|
1115
|
+
"showTime": {
|
|
1116
|
+
"type": "boolean",
|
|
1117
|
+
"mutable": false,
|
|
1118
|
+
"complexType": {
|
|
1119
|
+
"original": "boolean",
|
|
1120
|
+
"resolved": "boolean",
|
|
1121
|
+
"references": {}
|
|
1122
|
+
},
|
|
1123
|
+
"required": false,
|
|
1124
|
+
"optional": false,
|
|
1125
|
+
"docs": {
|
|
1126
|
+
"tags": [],
|
|
1127
|
+
"text": "Show time display"
|
|
1128
|
+
},
|
|
1129
|
+
"getter": false,
|
|
1130
|
+
"setter": false,
|
|
1131
|
+
"reflect": false,
|
|
1132
|
+
"attribute": "show-time",
|
|
1133
|
+
"defaultValue": "true"
|
|
1134
|
+
},
|
|
1135
|
+
"showFullscreen": {
|
|
1136
|
+
"type": "boolean",
|
|
1137
|
+
"mutable": false,
|
|
1138
|
+
"complexType": {
|
|
1139
|
+
"original": "boolean",
|
|
1140
|
+
"resolved": "boolean",
|
|
1141
|
+
"references": {}
|
|
1142
|
+
},
|
|
1143
|
+
"required": false,
|
|
1144
|
+
"optional": false,
|
|
1145
|
+
"docs": {
|
|
1146
|
+
"tags": [],
|
|
1147
|
+
"text": "Show fullscreen button"
|
|
1148
|
+
},
|
|
1149
|
+
"getter": false,
|
|
1150
|
+
"setter": false,
|
|
1151
|
+
"reflect": false,
|
|
1152
|
+
"attribute": "show-fullscreen",
|
|
1153
|
+
"defaultValue": "true"
|
|
1154
|
+
},
|
|
1155
|
+
"showSpeed": {
|
|
1156
|
+
"type": "boolean",
|
|
1157
|
+
"mutable": false,
|
|
1158
|
+
"complexType": {
|
|
1159
|
+
"original": "boolean",
|
|
1160
|
+
"resolved": "boolean",
|
|
1161
|
+
"references": {}
|
|
1162
|
+
},
|
|
1163
|
+
"required": false,
|
|
1164
|
+
"optional": false,
|
|
1165
|
+
"docs": {
|
|
1166
|
+
"tags": [],
|
|
1167
|
+
"text": "Show playback speed selector"
|
|
1168
|
+
},
|
|
1169
|
+
"getter": false,
|
|
1170
|
+
"setter": false,
|
|
1171
|
+
"reflect": false,
|
|
1172
|
+
"attribute": "show-speed",
|
|
1173
|
+
"defaultValue": "false"
|
|
1174
|
+
},
|
|
1175
|
+
"showPip": {
|
|
1176
|
+
"type": "boolean",
|
|
1177
|
+
"mutable": false,
|
|
1178
|
+
"complexType": {
|
|
1179
|
+
"original": "boolean",
|
|
1180
|
+
"resolved": "boolean",
|
|
1181
|
+
"references": {}
|
|
1182
|
+
},
|
|
1183
|
+
"required": false,
|
|
1184
|
+
"optional": false,
|
|
1185
|
+
"docs": {
|
|
1186
|
+
"tags": [],
|
|
1187
|
+
"text": "Show Picture-in-Picture button"
|
|
1188
|
+
},
|
|
1189
|
+
"getter": false,
|
|
1190
|
+
"setter": false,
|
|
1191
|
+
"reflect": false,
|
|
1192
|
+
"attribute": "show-pip",
|
|
1193
|
+
"defaultValue": "false"
|
|
1194
|
+
},
|
|
1195
|
+
"showDownload": {
|
|
1196
|
+
"type": "boolean",
|
|
1197
|
+
"mutable": false,
|
|
1198
|
+
"complexType": {
|
|
1199
|
+
"original": "boolean",
|
|
1200
|
+
"resolved": "boolean",
|
|
1201
|
+
"references": {}
|
|
1202
|
+
},
|
|
1203
|
+
"required": false,
|
|
1204
|
+
"optional": false,
|
|
1205
|
+
"docs": {
|
|
1206
|
+
"tags": [],
|
|
1207
|
+
"text": "Show download button"
|
|
1208
|
+
},
|
|
1209
|
+
"getter": false,
|
|
1210
|
+
"setter": false,
|
|
1211
|
+
"reflect": false,
|
|
1212
|
+
"attribute": "show-download",
|
|
1213
|
+
"defaultValue": "false"
|
|
1214
|
+
},
|
|
1215
|
+
"allowDownload": {
|
|
1216
|
+
"type": "boolean",
|
|
1217
|
+
"mutable": false,
|
|
1218
|
+
"complexType": {
|
|
1219
|
+
"original": "boolean",
|
|
1220
|
+
"resolved": "boolean",
|
|
1221
|
+
"references": {}
|
|
1222
|
+
},
|
|
1223
|
+
"required": false,
|
|
1224
|
+
"optional": false,
|
|
1225
|
+
"docs": {
|
|
1226
|
+
"tags": [],
|
|
1227
|
+
"text": "Enable download functionality"
|
|
1228
|
+
},
|
|
1229
|
+
"getter": false,
|
|
1230
|
+
"setter": false,
|
|
1231
|
+
"reflect": false,
|
|
1232
|
+
"attribute": "allow-download",
|
|
1233
|
+
"defaultValue": "false"
|
|
1234
|
+
},
|
|
1235
|
+
"aspectRatio": {
|
|
1236
|
+
"type": "string",
|
|
1237
|
+
"mutable": false,
|
|
1238
|
+
"complexType": {
|
|
1239
|
+
"original": "'16:9' | '4:3' | '1:1' | '21:9' | 'auto'",
|
|
1240
|
+
"resolved": "\"16:9\" | \"1:1\" | \"21:9\" | \"4:3\" | \"auto\"",
|
|
1241
|
+
"references": {}
|
|
1242
|
+
},
|
|
1243
|
+
"required": false,
|
|
1244
|
+
"optional": false,
|
|
1245
|
+
"docs": {
|
|
1246
|
+
"tags": [],
|
|
1247
|
+
"text": "Container aspect ratio"
|
|
1248
|
+
},
|
|
1249
|
+
"getter": false,
|
|
1250
|
+
"setter": false,
|
|
1251
|
+
"reflect": false,
|
|
1252
|
+
"attribute": "aspect-ratio",
|
|
1253
|
+
"defaultValue": "'16:9'"
|
|
1254
|
+
},
|
|
1255
|
+
"rounded": {
|
|
1256
|
+
"type": "string",
|
|
1257
|
+
"mutable": false,
|
|
1258
|
+
"complexType": {
|
|
1259
|
+
"original": "'none' | 'sm' | 'md' | 'lg' | 'xl'",
|
|
1260
|
+
"resolved": "\"lg\" | \"md\" | \"none\" | \"sm\" | \"xl\"",
|
|
1261
|
+
"references": {}
|
|
1262
|
+
},
|
|
1263
|
+
"required": false,
|
|
1264
|
+
"optional": false,
|
|
1265
|
+
"docs": {
|
|
1266
|
+
"tags": [],
|
|
1267
|
+
"text": "Border radius"
|
|
1268
|
+
},
|
|
1269
|
+
"getter": false,
|
|
1270
|
+
"setter": false,
|
|
1271
|
+
"reflect": false,
|
|
1272
|
+
"attribute": "rounded",
|
|
1273
|
+
"defaultValue": "'lg'"
|
|
1274
|
+
},
|
|
1275
|
+
"controlsAutoHide": {
|
|
1276
|
+
"type": "boolean",
|
|
1277
|
+
"mutable": false,
|
|
1278
|
+
"complexType": {
|
|
1279
|
+
"original": "boolean",
|
|
1280
|
+
"resolved": "boolean",
|
|
1281
|
+
"references": {}
|
|
1282
|
+
},
|
|
1283
|
+
"required": false,
|
|
1284
|
+
"optional": false,
|
|
1285
|
+
"docs": {
|
|
1286
|
+
"tags": [],
|
|
1287
|
+
"text": "Auto-hide controls after inactivity"
|
|
1288
|
+
},
|
|
1289
|
+
"getter": false,
|
|
1290
|
+
"setter": false,
|
|
1291
|
+
"reflect": false,
|
|
1292
|
+
"attribute": "controls-auto-hide",
|
|
1293
|
+
"defaultValue": "true"
|
|
1294
|
+
},
|
|
1295
|
+
"controlsAutoHideDelay": {
|
|
1296
|
+
"type": "number",
|
|
1297
|
+
"mutable": false,
|
|
1298
|
+
"complexType": {
|
|
1299
|
+
"original": "number",
|
|
1300
|
+
"resolved": "number",
|
|
1301
|
+
"references": {}
|
|
1302
|
+
},
|
|
1303
|
+
"required": false,
|
|
1304
|
+
"optional": false,
|
|
1305
|
+
"docs": {
|
|
1306
|
+
"tags": [],
|
|
1307
|
+
"text": "Milliseconds before controls hide"
|
|
1308
|
+
},
|
|
1309
|
+
"getter": false,
|
|
1310
|
+
"setter": false,
|
|
1311
|
+
"reflect": false,
|
|
1312
|
+
"attribute": "controls-auto-hide-delay",
|
|
1313
|
+
"defaultValue": "3000"
|
|
1314
|
+
},
|
|
1315
|
+
"disabled": {
|
|
1316
|
+
"type": "boolean",
|
|
1317
|
+
"mutable": false,
|
|
1318
|
+
"complexType": {
|
|
1319
|
+
"original": "boolean",
|
|
1320
|
+
"resolved": "boolean",
|
|
1321
|
+
"references": {}
|
|
1322
|
+
},
|
|
1323
|
+
"required": false,
|
|
1324
|
+
"optional": false,
|
|
1325
|
+
"docs": {
|
|
1326
|
+
"tags": [],
|
|
1327
|
+
"text": "Disabled state"
|
|
1328
|
+
},
|
|
1329
|
+
"getter": false,
|
|
1330
|
+
"setter": false,
|
|
1331
|
+
"reflect": false,
|
|
1332
|
+
"attribute": "disabled",
|
|
1333
|
+
"defaultValue": "false"
|
|
1334
|
+
},
|
|
1335
|
+
"watchThreshold": {
|
|
1336
|
+
"type": "number",
|
|
1337
|
+
"mutable": false,
|
|
1338
|
+
"complexType": {
|
|
1339
|
+
"original": "number",
|
|
1340
|
+
"resolved": "number",
|
|
1341
|
+
"references": {}
|
|
1342
|
+
},
|
|
1343
|
+
"required": false,
|
|
1344
|
+
"optional": false,
|
|
1345
|
+
"docs": {
|
|
1346
|
+
"tags": [],
|
|
1347
|
+
"text": "Progress percentage (0-100) that triggers coThresholdReached. 0 = disabled"
|
|
1348
|
+
},
|
|
1349
|
+
"getter": false,
|
|
1350
|
+
"setter": false,
|
|
1351
|
+
"reflect": false,
|
|
1352
|
+
"attribute": "watch-threshold",
|
|
1353
|
+
"defaultValue": "0"
|
|
1354
|
+
},
|
|
1355
|
+
"locale": {
|
|
1356
|
+
"type": "string",
|
|
1357
|
+
"mutable": false,
|
|
1358
|
+
"complexType": {
|
|
1359
|
+
"original": "VideoLang",
|
|
1360
|
+
"resolved": "\"en\" | \"es\" | \"pt\"",
|
|
1361
|
+
"references": {
|
|
1362
|
+
"VideoLang": {
|
|
1363
|
+
"location": "global",
|
|
1364
|
+
"id": "global::VideoLang"
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
},
|
|
1368
|
+
"required": false,
|
|
1369
|
+
"optional": false,
|
|
1370
|
+
"docs": {
|
|
1371
|
+
"tags": [],
|
|
1372
|
+
"text": "Language for labels and aria attributes"
|
|
1373
|
+
},
|
|
1374
|
+
"getter": false,
|
|
1375
|
+
"setter": false,
|
|
1376
|
+
"reflect": false,
|
|
1377
|
+
"attribute": "locale",
|
|
1378
|
+
"defaultValue": "'es'"
|
|
1379
|
+
}
|
|
1380
|
+
};
|
|
1381
|
+
}
|
|
1382
|
+
static get states() {
|
|
1383
|
+
return {
|
|
1384
|
+
"isPlaying": {},
|
|
1385
|
+
"internalCurrentTime": {},
|
|
1386
|
+
"duration": {},
|
|
1387
|
+
"buffered": {},
|
|
1388
|
+
"volumeLevel": {},
|
|
1389
|
+
"isMuted": {},
|
|
1390
|
+
"isFullscreen": {},
|
|
1391
|
+
"internalPlaybackRate": {},
|
|
1392
|
+
"isLoading": {},
|
|
1393
|
+
"showControlBar": {},
|
|
1394
|
+
"hasError": {},
|
|
1395
|
+
"errorMessage": {},
|
|
1396
|
+
"showSpeedMenu": {},
|
|
1397
|
+
"isPip": {},
|
|
1398
|
+
"thresholdFired": {},
|
|
1399
|
+
"hasStarted": {},
|
|
1400
|
+
"isSeeking": {},
|
|
1401
|
+
"showVolumeSlider": {}
|
|
1402
|
+
};
|
|
1403
|
+
}
|
|
1404
|
+
static get events() {
|
|
1405
|
+
return [{
|
|
1406
|
+
"method": "coPlay",
|
|
1407
|
+
"name": "coPlay",
|
|
1408
|
+
"bubbles": true,
|
|
1409
|
+
"cancelable": true,
|
|
1410
|
+
"composed": true,
|
|
1411
|
+
"docs": {
|
|
1412
|
+
"tags": [],
|
|
1413
|
+
"text": ""
|
|
1414
|
+
},
|
|
1415
|
+
"complexType": {
|
|
1416
|
+
"original": "void",
|
|
1417
|
+
"resolved": "void",
|
|
1418
|
+
"references": {}
|
|
1419
|
+
}
|
|
1420
|
+
}, {
|
|
1421
|
+
"method": "coPause",
|
|
1422
|
+
"name": "coPause",
|
|
1423
|
+
"bubbles": true,
|
|
1424
|
+
"cancelable": true,
|
|
1425
|
+
"composed": true,
|
|
1426
|
+
"docs": {
|
|
1427
|
+
"tags": [],
|
|
1428
|
+
"text": ""
|
|
1429
|
+
},
|
|
1430
|
+
"complexType": {
|
|
1431
|
+
"original": "void",
|
|
1432
|
+
"resolved": "void",
|
|
1433
|
+
"references": {}
|
|
1434
|
+
}
|
|
1435
|
+
}, {
|
|
1436
|
+
"method": "coEnded",
|
|
1437
|
+
"name": "coEnded",
|
|
1438
|
+
"bubbles": true,
|
|
1439
|
+
"cancelable": true,
|
|
1440
|
+
"composed": true,
|
|
1441
|
+
"docs": {
|
|
1442
|
+
"tags": [],
|
|
1443
|
+
"text": ""
|
|
1444
|
+
},
|
|
1445
|
+
"complexType": {
|
|
1446
|
+
"original": "void",
|
|
1447
|
+
"resolved": "void",
|
|
1448
|
+
"references": {}
|
|
1449
|
+
}
|
|
1450
|
+
}, {
|
|
1451
|
+
"method": "coReady",
|
|
1452
|
+
"name": "coReady",
|
|
1453
|
+
"bubbles": true,
|
|
1454
|
+
"cancelable": true,
|
|
1455
|
+
"composed": true,
|
|
1456
|
+
"docs": {
|
|
1457
|
+
"tags": [],
|
|
1458
|
+
"text": ""
|
|
1459
|
+
},
|
|
1460
|
+
"complexType": {
|
|
1461
|
+
"original": "{ duration: number }",
|
|
1462
|
+
"resolved": "{ duration: number; }",
|
|
1463
|
+
"references": {}
|
|
1464
|
+
}
|
|
1465
|
+
}, {
|
|
1466
|
+
"method": "coError",
|
|
1467
|
+
"name": "coError",
|
|
1468
|
+
"bubbles": true,
|
|
1469
|
+
"cancelable": true,
|
|
1470
|
+
"composed": true,
|
|
1471
|
+
"docs": {
|
|
1472
|
+
"tags": [],
|
|
1473
|
+
"text": ""
|
|
1474
|
+
},
|
|
1475
|
+
"complexType": {
|
|
1476
|
+
"original": "{ code: number; message: string }",
|
|
1477
|
+
"resolved": "{ code: number; message: string; }",
|
|
1478
|
+
"references": {}
|
|
1479
|
+
}
|
|
1480
|
+
}, {
|
|
1481
|
+
"method": "coTimeUpdate",
|
|
1482
|
+
"name": "coTimeUpdate",
|
|
1483
|
+
"bubbles": false,
|
|
1484
|
+
"cancelable": true,
|
|
1485
|
+
"composed": true,
|
|
1486
|
+
"docs": {
|
|
1487
|
+
"tags": [],
|
|
1488
|
+
"text": ""
|
|
1489
|
+
},
|
|
1490
|
+
"complexType": {
|
|
1491
|
+
"original": "{ currentTime: number; duration: number; progressPercent: number }",
|
|
1492
|
+
"resolved": "{ currentTime: number; duration: number; progressPercent: number; }",
|
|
1493
|
+
"references": {}
|
|
1494
|
+
}
|
|
1495
|
+
}, {
|
|
1496
|
+
"method": "coSeeked",
|
|
1497
|
+
"name": "coSeeked",
|
|
1498
|
+
"bubbles": true,
|
|
1499
|
+
"cancelable": true,
|
|
1500
|
+
"composed": true,
|
|
1501
|
+
"docs": {
|
|
1502
|
+
"tags": [],
|
|
1503
|
+
"text": ""
|
|
1504
|
+
},
|
|
1505
|
+
"complexType": {
|
|
1506
|
+
"original": "{ from: number; to: number }",
|
|
1507
|
+
"resolved": "{ from: number; to: number; }",
|
|
1508
|
+
"references": {}
|
|
1509
|
+
}
|
|
1510
|
+
}, {
|
|
1511
|
+
"method": "coVolumeChange",
|
|
1512
|
+
"name": "coVolumeChange",
|
|
1513
|
+
"bubbles": true,
|
|
1514
|
+
"cancelable": true,
|
|
1515
|
+
"composed": true,
|
|
1516
|
+
"docs": {
|
|
1517
|
+
"tags": [],
|
|
1518
|
+
"text": ""
|
|
1519
|
+
},
|
|
1520
|
+
"complexType": {
|
|
1521
|
+
"original": "{ volume: number; muted: boolean }",
|
|
1522
|
+
"resolved": "{ volume: number; muted: boolean; }",
|
|
1523
|
+
"references": {}
|
|
1524
|
+
}
|
|
1525
|
+
}, {
|
|
1526
|
+
"method": "coFullscreenChange",
|
|
1527
|
+
"name": "coFullscreenChange",
|
|
1528
|
+
"bubbles": true,
|
|
1529
|
+
"cancelable": true,
|
|
1530
|
+
"composed": true,
|
|
1531
|
+
"docs": {
|
|
1532
|
+
"tags": [],
|
|
1533
|
+
"text": ""
|
|
1534
|
+
},
|
|
1535
|
+
"complexType": {
|
|
1536
|
+
"original": "{ fullscreen: boolean }",
|
|
1537
|
+
"resolved": "{ fullscreen: boolean; }",
|
|
1538
|
+
"references": {}
|
|
1539
|
+
}
|
|
1540
|
+
}, {
|
|
1541
|
+
"method": "coPlaybackRateChange",
|
|
1542
|
+
"name": "coPlaybackRateChange",
|
|
1543
|
+
"bubbles": true,
|
|
1544
|
+
"cancelable": true,
|
|
1545
|
+
"composed": true,
|
|
1546
|
+
"docs": {
|
|
1547
|
+
"tags": [],
|
|
1548
|
+
"text": ""
|
|
1549
|
+
},
|
|
1550
|
+
"complexType": {
|
|
1551
|
+
"original": "{ rate: number }",
|
|
1552
|
+
"resolved": "{ rate: number; }",
|
|
1553
|
+
"references": {}
|
|
1554
|
+
}
|
|
1555
|
+
}, {
|
|
1556
|
+
"method": "coPipChange",
|
|
1557
|
+
"name": "coPipChange",
|
|
1558
|
+
"bubbles": true,
|
|
1559
|
+
"cancelable": true,
|
|
1560
|
+
"composed": true,
|
|
1561
|
+
"docs": {
|
|
1562
|
+
"tags": [],
|
|
1563
|
+
"text": ""
|
|
1564
|
+
},
|
|
1565
|
+
"complexType": {
|
|
1566
|
+
"original": "{ pip: boolean }",
|
|
1567
|
+
"resolved": "{ pip: boolean; }",
|
|
1568
|
+
"references": {}
|
|
1569
|
+
}
|
|
1570
|
+
}, {
|
|
1571
|
+
"method": "coDownload",
|
|
1572
|
+
"name": "coDownload",
|
|
1573
|
+
"bubbles": true,
|
|
1574
|
+
"cancelable": true,
|
|
1575
|
+
"composed": true,
|
|
1576
|
+
"docs": {
|
|
1577
|
+
"tags": [],
|
|
1578
|
+
"text": ""
|
|
1579
|
+
},
|
|
1580
|
+
"complexType": {
|
|
1581
|
+
"original": "{ src: string }",
|
|
1582
|
+
"resolved": "{ src: string; }",
|
|
1583
|
+
"references": {}
|
|
1584
|
+
}
|
|
1585
|
+
}, {
|
|
1586
|
+
"method": "coThresholdReached",
|
|
1587
|
+
"name": "coThresholdReached",
|
|
1588
|
+
"bubbles": true,
|
|
1589
|
+
"cancelable": true,
|
|
1590
|
+
"composed": true,
|
|
1591
|
+
"docs": {
|
|
1592
|
+
"tags": [],
|
|
1593
|
+
"text": ""
|
|
1594
|
+
},
|
|
1595
|
+
"complexType": {
|
|
1596
|
+
"original": "{ threshold: number; currentTime: number; duration: number }",
|
|
1597
|
+
"resolved": "{ threshold: number; currentTime: number; duration: number; }",
|
|
1598
|
+
"references": {}
|
|
1599
|
+
}
|
|
1600
|
+
}];
|
|
1601
|
+
}
|
|
1602
|
+
static get methods() {
|
|
1603
|
+
return {
|
|
1604
|
+
"play": {
|
|
1605
|
+
"complexType": {
|
|
1606
|
+
"signature": "() => Promise<void>",
|
|
1607
|
+
"parameters": [],
|
|
1608
|
+
"references": {
|
|
1609
|
+
"Promise": {
|
|
1610
|
+
"location": "global",
|
|
1611
|
+
"id": "global::Promise"
|
|
1612
|
+
}
|
|
1613
|
+
},
|
|
1614
|
+
"return": "Promise<void>"
|
|
1615
|
+
},
|
|
1616
|
+
"docs": {
|
|
1617
|
+
"text": "",
|
|
1618
|
+
"tags": []
|
|
1619
|
+
}
|
|
1620
|
+
},
|
|
1621
|
+
"pause": {
|
|
1622
|
+
"complexType": {
|
|
1623
|
+
"signature": "() => Promise<void>",
|
|
1624
|
+
"parameters": [],
|
|
1625
|
+
"references": {
|
|
1626
|
+
"Promise": {
|
|
1627
|
+
"location": "global",
|
|
1628
|
+
"id": "global::Promise"
|
|
1629
|
+
}
|
|
1630
|
+
},
|
|
1631
|
+
"return": "Promise<void>"
|
|
1632
|
+
},
|
|
1633
|
+
"docs": {
|
|
1634
|
+
"text": "",
|
|
1635
|
+
"tags": []
|
|
1636
|
+
}
|
|
1637
|
+
},
|
|
1638
|
+
"togglePlay": {
|
|
1639
|
+
"complexType": {
|
|
1640
|
+
"signature": "() => Promise<void>",
|
|
1641
|
+
"parameters": [],
|
|
1642
|
+
"references": {
|
|
1643
|
+
"Promise": {
|
|
1644
|
+
"location": "global",
|
|
1645
|
+
"id": "global::Promise"
|
|
1646
|
+
}
|
|
1647
|
+
},
|
|
1648
|
+
"return": "Promise<void>"
|
|
1649
|
+
},
|
|
1650
|
+
"docs": {
|
|
1651
|
+
"text": "",
|
|
1652
|
+
"tags": []
|
|
1653
|
+
}
|
|
1654
|
+
},
|
|
1655
|
+
"seek": {
|
|
1656
|
+
"complexType": {
|
|
1657
|
+
"signature": "(time: number) => Promise<void>",
|
|
1658
|
+
"parameters": [{
|
|
1659
|
+
"name": "time",
|
|
1660
|
+
"type": "number",
|
|
1661
|
+
"docs": ""
|
|
1662
|
+
}],
|
|
1663
|
+
"references": {
|
|
1664
|
+
"Promise": {
|
|
1665
|
+
"location": "global",
|
|
1666
|
+
"id": "global::Promise"
|
|
1667
|
+
}
|
|
1668
|
+
},
|
|
1669
|
+
"return": "Promise<void>"
|
|
1670
|
+
},
|
|
1671
|
+
"docs": {
|
|
1672
|
+
"text": "",
|
|
1673
|
+
"tags": []
|
|
1674
|
+
}
|
|
1675
|
+
},
|
|
1676
|
+
"setVolume": {
|
|
1677
|
+
"complexType": {
|
|
1678
|
+
"signature": "(level: number) => Promise<void>",
|
|
1679
|
+
"parameters": [{
|
|
1680
|
+
"name": "level",
|
|
1681
|
+
"type": "number",
|
|
1682
|
+
"docs": ""
|
|
1683
|
+
}],
|
|
1684
|
+
"references": {
|
|
1685
|
+
"Promise": {
|
|
1686
|
+
"location": "global",
|
|
1687
|
+
"id": "global::Promise"
|
|
1688
|
+
}
|
|
1689
|
+
},
|
|
1690
|
+
"return": "Promise<void>"
|
|
1691
|
+
},
|
|
1692
|
+
"docs": {
|
|
1693
|
+
"text": "",
|
|
1694
|
+
"tags": []
|
|
1695
|
+
}
|
|
1696
|
+
},
|
|
1697
|
+
"toggleMute": {
|
|
1698
|
+
"complexType": {
|
|
1699
|
+
"signature": "() => Promise<void>",
|
|
1700
|
+
"parameters": [],
|
|
1701
|
+
"references": {
|
|
1702
|
+
"Promise": {
|
|
1703
|
+
"location": "global",
|
|
1704
|
+
"id": "global::Promise"
|
|
1705
|
+
}
|
|
1706
|
+
},
|
|
1707
|
+
"return": "Promise<void>"
|
|
1708
|
+
},
|
|
1709
|
+
"docs": {
|
|
1710
|
+
"text": "",
|
|
1711
|
+
"tags": []
|
|
1712
|
+
}
|
|
1713
|
+
},
|
|
1714
|
+
"toggleFullscreen": {
|
|
1715
|
+
"complexType": {
|
|
1716
|
+
"signature": "() => Promise<void>",
|
|
1717
|
+
"parameters": [],
|
|
1718
|
+
"references": {
|
|
1719
|
+
"Promise": {
|
|
1720
|
+
"location": "global",
|
|
1721
|
+
"id": "global::Promise"
|
|
1722
|
+
}
|
|
1723
|
+
},
|
|
1724
|
+
"return": "Promise<void>"
|
|
1725
|
+
},
|
|
1726
|
+
"docs": {
|
|
1727
|
+
"text": "",
|
|
1728
|
+
"tags": []
|
|
1729
|
+
}
|
|
1730
|
+
},
|
|
1731
|
+
"togglePip": {
|
|
1732
|
+
"complexType": {
|
|
1733
|
+
"signature": "() => Promise<void>",
|
|
1734
|
+
"parameters": [],
|
|
1735
|
+
"references": {
|
|
1736
|
+
"Promise": {
|
|
1737
|
+
"location": "global",
|
|
1738
|
+
"id": "global::Promise"
|
|
1739
|
+
}
|
|
1740
|
+
},
|
|
1741
|
+
"return": "Promise<void>"
|
|
1742
|
+
},
|
|
1743
|
+
"docs": {
|
|
1744
|
+
"text": "",
|
|
1745
|
+
"tags": []
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
};
|
|
1749
|
+
}
|
|
1750
|
+
static get elementRef() { return "el"; }
|
|
1751
|
+
static get watchers() {
|
|
1752
|
+
return [{
|
|
1753
|
+
"propName": "src",
|
|
1754
|
+
"methodName": "onSrcChange"
|
|
1755
|
+
}, {
|
|
1756
|
+
"propName": "muted",
|
|
1757
|
+
"methodName": "onMutedChange"
|
|
1758
|
+
}, {
|
|
1759
|
+
"propName": "volume",
|
|
1760
|
+
"methodName": "onVolumeChange"
|
|
1761
|
+
}, {
|
|
1762
|
+
"propName": "currentTime",
|
|
1763
|
+
"methodName": "onCurrentTimeChange"
|
|
1764
|
+
}, {
|
|
1765
|
+
"propName": "playbackRate",
|
|
1766
|
+
"methodName": "onPlaybackRateChange"
|
|
1767
|
+
}, {
|
|
1768
|
+
"propName": "playbackRates",
|
|
1769
|
+
"methodName": "onPlaybackRatesChange"
|
|
1770
|
+
}];
|
|
1771
|
+
}
|
|
1772
|
+
}
|