@fusion.dev/helix-headless 0.0.0-dev
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/LICENSE +21 -0
- package/custom-elements.json +75202 -0
- package/dist/accordion/index.d.ts +2 -0
- package/dist/accordion/index.js +2 -0
- package/dist/accordion/item/accordion-item.d.ts +141 -0
- package/dist/accordion/item/accordion-item.js +214 -0
- package/dist/accordion/root/accordion-root.d.ts +57 -0
- package/dist/accordion/root/accordion-root.js +96 -0
- package/dist/announcement/index.d.ts +1 -0
- package/dist/announcement/index.js +1 -0
- package/dist/announcement/root/announcement-root.d.ts +106 -0
- package/dist/announcement/root/announcement-root.js +144 -0
- package/dist/app-header/index.d.ts +1 -0
- package/dist/app-header/index.js +1 -0
- package/dist/app-header/root/app-header-root.d.ts +113 -0
- package/dist/app-header/root/app-header-root.js +147 -0
- package/dist/avatar/group/avatar-group.d.ts +116 -0
- package/dist/avatar/group/avatar-group.js +136 -0
- package/dist/avatar/index.d.ts +2 -0
- package/dist/avatar/index.js +2 -0
- package/dist/avatar/root/avatar-root.d.ts +71 -0
- package/dist/avatar/root/avatar-root.js +147 -0
- package/dist/badge/index.d.ts +1 -0
- package/dist/badge/index.js +1 -0
- package/dist/badge/root/badge-root.d.ts +61 -0
- package/dist/badge/root/badge-root.js +121 -0
- package/dist/bar-chart/index.d.ts +1 -0
- package/dist/bar-chart/index.js +1 -0
- package/dist/bar-chart/root/bar-chart-root.d.ts +266 -0
- package/dist/bar-chart/root/bar-chart-root.js +515 -0
- package/dist/blockquote/index.d.ts +1 -0
- package/dist/blockquote/index.js +1 -0
- package/dist/blockquote/root/blockquote-root.d.ts +51 -0
- package/dist/blockquote/root/blockquote-root.js +84 -0
- package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +104 -0
- package/dist/breadcrumbs/breadcrumb/breadcrumb.js +137 -0
- package/dist/breadcrumbs/index.d.ts +2 -0
- package/dist/breadcrumbs/index.js +2 -0
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +77 -0
- package/dist/breadcrumbs/root/breadcrumbs-root.js +94 -0
- package/dist/button/index.d.ts +1 -0
- package/dist/button/index.js +1 -0
- package/dist/button/root/button-root.d.ts +251 -0
- package/dist/button/root/button-root.js +401 -0
- package/dist/button-group/index.d.ts +1 -0
- package/dist/button-group/index.js +1 -0
- package/dist/button-group/root/button-group-root.d.ts +62 -0
- package/dist/button-group/root/button-group-root.js +62 -0
- package/dist/callout/index.d.ts +1 -0
- package/dist/callout/index.js +1 -0
- package/dist/callout/root/callout-root.d.ts +72 -0
- package/dist/callout/root/callout-root.js +90 -0
- package/dist/card/index.d.ts +1 -0
- package/dist/card/index.js +1 -0
- package/dist/card/root/card-root.d.ts +54 -0
- package/dist/card/root/card-root.js +71 -0
- package/dist/carousel/index.d.ts +1 -0
- package/dist/carousel/index.js +1 -0
- package/dist/carousel/root/carousel-root.d.ts +399 -0
- package/dist/carousel/root/carousel-root.js +723 -0
- package/dist/chat/composer/chat-composer.d.ts +160 -0
- package/dist/chat/composer/chat-composer.js +273 -0
- package/dist/chat/index.d.ts +3 -0
- package/dist/chat/index.js +3 -0
- package/dist/chat/message/chat-message.d.ts +170 -0
- package/dist/chat/message/chat-message.js +271 -0
- package/dist/chat/root/chat-root.d.ts +216 -0
- package/dist/chat/root/chat-root.js +389 -0
- package/dist/checkbox/index.d.ts +1 -0
- package/dist/checkbox/index.js +1 -0
- package/dist/checkbox/root/checkbox-root.d.ts +108 -0
- package/dist/checkbox/root/checkbox-root.js +207 -0
- package/dist/checkbox-group/index.d.ts +1 -0
- package/dist/checkbox-group/index.js +1 -0
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +155 -0
- package/dist/checkbox-group/root/checkbox-group-root.js +293 -0
- package/dist/code/index.d.ts +1 -0
- package/dist/code/index.js +1 -0
- package/dist/code/root/code-root.d.ts +36 -0
- package/dist/code/root/code-root.js +43 -0
- package/dist/code-block/index.d.ts +1 -0
- package/dist/code-block/index.js +1 -0
- package/dist/code-block/root/code-block-root.d.ts +112 -0
- package/dist/code-block/root/code-block-root.js +155 -0
- package/dist/color-input/index.d.ts +1 -0
- package/dist/color-input/index.js +1 -0
- package/dist/color-input/root/color-input-root.d.ts +227 -0
- package/dist/color-input/root/color-input-root.js +456 -0
- package/dist/color-picker/color.d.ts +74 -0
- package/dist/color-picker/color.js +238 -0
- package/dist/color-picker/index.d.ts +2 -0
- package/dist/color-picker/index.js +2 -0
- package/dist/color-picker/root/color-picker-root.d.ts +303 -0
- package/dist/color-picker/root/color-picker-root.js +576 -0
- package/dist/combobox/index.d.ts +1 -0
- package/dist/combobox/index.js +1 -0
- package/dist/combobox/root/combobox-root.d.ts +396 -0
- package/dist/combobox/root/combobox-root.js +808 -0
- package/dist/command/index.d.ts +1 -0
- package/dist/command/index.js +1 -0
- package/dist/command/root/command-root.d.ts +166 -0
- package/dist/command/root/command-root.js +353 -0
- package/dist/copy-button/index.d.ts +1 -0
- package/dist/copy-button/index.js +1 -0
- package/dist/copy-button/root/copy-button-root.d.ts +154 -0
- package/dist/copy-button/root/copy-button-root.js +225 -0
- package/dist/data-table/index.d.ts +2 -0
- package/dist/data-table/index.js +2 -0
- package/dist/data-table/root/data-table-root.d.ts +392 -0
- package/dist/data-table/root/data-table-root.js +729 -0
- package/dist/data-table/root/order.d.ts +116 -0
- package/dist/data-table/root/order.js +175 -0
- package/dist/date-input/index.d.ts +1 -0
- package/dist/date-input/index.js +1 -0
- package/dist/date-input/root/date-input-root.d.ts +361 -0
- package/dist/date-input/root/date-input-root.js +791 -0
- package/dist/date-picker/index.d.ts +1 -0
- package/dist/date-picker/index.js +1 -0
- package/dist/date-picker/root/date-picker-root.d.ts +361 -0
- package/dist/date-picker/root/date-picker-root.js +837 -0
- package/dist/dialog/index.d.ts +1 -0
- package/dist/dialog/index.js +1 -0
- package/dist/dialog/root/dialog-root.d.ts +185 -0
- package/dist/dialog/root/dialog-root.js +319 -0
- package/dist/divider/index.d.ts +1 -0
- package/dist/divider/index.js +1 -0
- package/dist/divider/root/divider-root.d.ts +68 -0
- package/dist/divider/root/divider-root.js +116 -0
- package/dist/donut-chart/index.d.ts +1 -0
- package/dist/donut-chart/index.js +1 -0
- package/dist/donut-chart/root/donut-chart-root.d.ts +209 -0
- package/dist/donut-chart/root/donut-chart-root.js +395 -0
- package/dist/drawer/index.d.ts +1 -0
- package/dist/drawer/index.js +1 -0
- package/dist/drawer/root/drawer-root.d.ts +144 -0
- package/dist/drawer/root/drawer-root.js +222 -0
- package/dist/drilldown/index.d.ts +2 -0
- package/dist/drilldown/index.js +2 -0
- package/dist/drilldown/item/drilldown-item.d.ts +87 -0
- package/dist/drilldown/item/drilldown-item.js +152 -0
- package/dist/drilldown/root/drilldown-root.d.ts +115 -0
- package/dist/drilldown/root/drilldown-root.js +263 -0
- package/dist/element-events.generated.d.ts +1 -0
- package/dist/element-events.generated.js +125 -0
- package/dist/empty/index.d.ts +1 -0
- package/dist/empty/index.js +1 -0
- package/dist/empty/root/empty-root.d.ts +47 -0
- package/dist/empty/root/empty-root.js +68 -0
- package/dist/file-input/index.d.ts +1 -0
- package/dist/file-input/index.js +1 -0
- package/dist/file-input/root/file-input-root.d.ts +196 -0
- package/dist/file-input/root/file-input-root.js +488 -0
- package/dist/format-date/index.d.ts +1 -0
- package/dist/format-date/index.js +1 -0
- package/dist/format-date/root/format-date-root.d.ts +151 -0
- package/dist/format-date/root/format-date-root.js +266 -0
- package/dist/heatmap/index.d.ts +2 -0
- package/dist/heatmap/index.js +2 -0
- package/dist/heatmap/root/buckets.d.ts +62 -0
- package/dist/heatmap/root/buckets.js +85 -0
- package/dist/heatmap/root/heatmap-root.d.ts +330 -0
- package/dist/heatmap/root/heatmap-root.js +526 -0
- package/dist/icon/index.d.ts +1 -0
- package/dist/icon/index.js +1 -0
- package/dist/icon/root/icon-root.d.ts +53 -0
- package/dist/icon/root/icon-root.js +93 -0
- package/dist/icon-button/index.d.ts +1 -0
- package/dist/icon-button/index.js +1 -0
- package/dist/icon-button/root/icon-button-root.d.ts +40 -0
- package/dist/icon-button/root/icon-button-root.js +46 -0
- package/dist/image/index.d.ts +1 -0
- package/dist/image/index.js +1 -0
- package/dist/image/root/image-root.d.ts +213 -0
- package/dist/image/root/image-root.js +335 -0
- package/dist/index.d.ts +99 -0
- package/dist/index.js +99 -0
- package/dist/input/index.d.ts +1 -0
- package/dist/input/index.js +1 -0
- package/dist/input/root/input-root.d.ts +281 -0
- package/dist/input/root/input-root.js +472 -0
- package/dist/kbd/index.d.ts +1 -0
- package/dist/kbd/index.js +1 -0
- package/dist/kbd/root/kbd-root.d.ts +98 -0
- package/dist/kbd/root/kbd-root.js +230 -0
- package/dist/legend/index.d.ts +1 -0
- package/dist/legend/index.js +1 -0
- package/dist/legend/root/legend-root.d.ts +83 -0
- package/dist/legend/root/legend-root.js +125 -0
- package/dist/line-chart/index.d.ts +1 -0
- package/dist/line-chart/index.js +1 -0
- package/dist/line-chart/root/line-chart-root.d.ts +238 -0
- package/dist/line-chart/root/line-chart-root.js +365 -0
- package/dist/list/index.d.ts +2 -0
- package/dist/list/index.js +2 -0
- package/dist/list/item/list-item.d.ts +95 -0
- package/dist/list/item/list-item.js +148 -0
- package/dist/list/root/list-root.d.ts +72 -0
- package/dist/list/root/list-root.js +61 -0
- package/dist/listbox/index.d.ts +1 -0
- package/dist/listbox/index.js +1 -0
- package/dist/listbox/root/listbox-root.d.ts +357 -0
- package/dist/listbox/root/listbox-root.js +890 -0
- package/dist/loader/index.d.ts +1 -0
- package/dist/loader/index.js +1 -0
- package/dist/loader/root/loader-root.d.ts +52 -0
- package/dist/loader/root/loader-root.js +74 -0
- package/dist/megamenu/index.d.ts +1 -0
- package/dist/megamenu/index.js +1 -0
- package/dist/megamenu/root/megamenu-root.d.ts +254 -0
- package/dist/megamenu/root/megamenu-root.js +526 -0
- package/dist/menu/index.d.ts +2 -0
- package/dist/menu/index.js +2 -0
- package/dist/menu/item/menu-item.d.ts +231 -0
- package/dist/menu/item/menu-item.js +405 -0
- package/dist/menu/root/menu-root.d.ts +158 -0
- package/dist/menu/root/menu-root.js +422 -0
- package/dist/meter/index.d.ts +1 -0
- package/dist/meter/index.js +1 -0
- package/dist/meter/root/meter-root.d.ts +234 -0
- package/dist/meter/root/meter-root.js +316 -0
- package/dist/navigation/index.d.ts +1 -0
- package/dist/navigation/index.js +1 -0
- package/dist/navigation/root/navigation-root.d.ts +55 -0
- package/dist/navigation/root/navigation-root.js +130 -0
- package/dist/notifications/index.d.ts +2 -0
- package/dist/notifications/index.js +2 -0
- package/dist/notifications/notification/notification.d.ts +181 -0
- package/dist/notifications/notification/notification.js +305 -0
- package/dist/notifications/root/notifications-root.d.ts +168 -0
- package/dist/notifications/root/notifications-root.js +291 -0
- package/dist/number-input/index.d.ts +1 -0
- package/dist/number-input/index.js +1 -0
- package/dist/number-input/root/number-input-root.d.ts +282 -0
- package/dist/number-input/root/number-input-root.js +592 -0
- package/dist/option/group/option-group.d.ts +38 -0
- package/dist/option/group/option-group.js +58 -0
- package/dist/option/index.d.ts +2 -0
- package/dist/option/index.js +2 -0
- package/dist/option/root/option-root.d.ts +194 -0
- package/dist/option/root/option-root.js +247 -0
- package/dist/outline/index.d.ts +1 -0
- package/dist/outline/index.js +1 -0
- package/dist/outline/root/outline-root.d.ts +237 -0
- package/dist/outline/root/outline-root.js +519 -0
- package/dist/pagination/index.d.ts +3 -0
- package/dist/pagination/index.js +3 -0
- package/dist/pagination/root/pagination-root.d.ts +390 -0
- package/dist/pagination/root/pagination-root.js +695 -0
- package/dist/pagination/size/pagination-size.d.ts +127 -0
- package/dist/pagination/size/pagination-size.js +232 -0
- package/dist/pagination/summary/pagination-summary.d.ts +90 -0
- package/dist/pagination/summary/pagination-summary.js +145 -0
- package/dist/pin-input/index.d.ts +1 -0
- package/dist/pin-input/index.js +1 -0
- package/dist/pin-input/root/pin-input-root.d.ts +292 -0
- package/dist/pin-input/root/pin-input-root.js +553 -0
- package/dist/popover/index.d.ts +1 -0
- package/dist/popover/index.js +1 -0
- package/dist/popover/root/popover-root.d.ts +108 -0
- package/dist/popover/root/popover-root.js +231 -0
- package/dist/progress/index.d.ts +1 -0
- package/dist/progress/index.js +1 -0
- package/dist/progress/root/progress-root.d.ts +125 -0
- package/dist/progress/root/progress-root.js +212 -0
- package/dist/qr-code/index.d.ts +1 -0
- package/dist/qr-code/index.js +1 -0
- package/dist/qr-code/root/qr-code-root.d.ts +93 -0
- package/dist/qr-code/root/qr-code-root.js +233 -0
- package/dist/quote/index.d.ts +1 -0
- package/dist/quote/index.js +1 -0
- package/dist/quote/root/quote-root.d.ts +36 -0
- package/dist/quote/root/quote-root.js +50 -0
- package/dist/radio/group/radio-group.d.ts +84 -0
- package/dist/radio/group/radio-group.js +170 -0
- package/dist/radio/index.d.ts +2 -0
- package/dist/radio/index.js +2 -0
- package/dist/radio/root/radio-root.d.ts +102 -0
- package/dist/radio/root/radio-root.js +151 -0
- package/dist/rating/index.d.ts +1 -0
- package/dist/rating/index.js +1 -0
- package/dist/rating/root/rating-root.d.ts +242 -0
- package/dist/rating/root/rating-root.js +484 -0
- package/dist/scroll-area/index.d.ts +1 -0
- package/dist/scroll-area/index.js +1 -0
- package/dist/scroll-area/root/scroll-area-root.d.ts +96 -0
- package/dist/scroll-area/root/scroll-area-root.js +215 -0
- package/dist/select/index.d.ts +1 -0
- package/dist/select/index.js +1 -0
- package/dist/select/root/select-root.d.ts +170 -0
- package/dist/select/root/select-root.js +419 -0
- package/dist/skeleton/index.d.ts +1 -0
- package/dist/skeleton/index.js +1 -0
- package/dist/skeleton/root/skeleton-root.d.ts +31 -0
- package/dist/skeleton/root/skeleton-root.js +42 -0
- package/dist/slider/index.d.ts +1 -0
- package/dist/slider/index.js +1 -0
- package/dist/slider/root/slider-root.d.ts +235 -0
- package/dist/slider/root/slider-root.js +488 -0
- package/dist/sparkline/index.d.ts +1 -0
- package/dist/sparkline/index.js +1 -0
- package/dist/sparkline/root/sparkline-root.d.ts +147 -0
- package/dist/sparkline/root/sparkline-root.js +278 -0
- package/dist/speed-dial/index.d.ts +2 -0
- package/dist/speed-dial/index.js +2 -0
- package/dist/speed-dial/item/speed-dial-item.d.ts +71 -0
- package/dist/speed-dial/item/speed-dial-item.js +113 -0
- package/dist/speed-dial/root/speed-dial-root.d.ts +122 -0
- package/dist/speed-dial/root/speed-dial-root.js +251 -0
- package/dist/splitter/index.d.ts +1 -0
- package/dist/splitter/index.js +1 -0
- package/dist/splitter/root/splitter-root.d.ts +491 -0
- package/dist/splitter/root/splitter-root.js +1030 -0
- package/dist/stat/group/stat-group.d.ts +30 -0
- package/dist/stat/group/stat-group.js +47 -0
- package/dist/stat/index.d.ts +2 -0
- package/dist/stat/index.js +2 -0
- package/dist/stat/root/stat-root.d.ts +62 -0
- package/dist/stat/root/stat-root.js +51 -0
- package/dist/steps/index.d.ts +2 -0
- package/dist/steps/index.js +2 -0
- package/dist/steps/root/steps-root.d.ts +110 -0
- package/dist/steps/root/steps-root.js +130 -0
- package/dist/steps/step/step.d.ts +139 -0
- package/dist/steps/step/step.js +215 -0
- package/dist/switch/index.d.ts +1 -0
- package/dist/switch/index.js +1 -0
- package/dist/switch/root/switch-root.d.ts +74 -0
- package/dist/switch/root/switch-root.js +153 -0
- package/dist/table/cell/table-cell.d.ts +34 -0
- package/dist/table/cell/table-cell.js +52 -0
- package/dist/table/column/table-column.d.ts +165 -0
- package/dist/table/column/table-column.js +222 -0
- package/dist/table/index.d.ts +4 -0
- package/dist/table/index.js +4 -0
- package/dist/table/root/table-root.d.ts +98 -0
- package/dist/table/root/table-root.js +161 -0
- package/dist/table/row/table-row.d.ts +27 -0
- package/dist/table/row/table-row.js +42 -0
- package/dist/tabs/index.d.ts +3 -0
- package/dist/tabs/index.js +3 -0
- package/dist/tabs/panel/tab-panel.d.ts +67 -0
- package/dist/tabs/panel/tab-panel.js +98 -0
- package/dist/tabs/root/tabs-root.d.ts +123 -0
- package/dist/tabs/root/tabs-root.js +217 -0
- package/dist/tabs/tab/tab.d.ts +64 -0
- package/dist/tabs/tab/tab.js +116 -0
- package/dist/tag/index.d.ts +1 -0
- package/dist/tag/index.js +1 -0
- package/dist/tag/root/tag-root.d.ts +41 -0
- package/dist/tag/root/tag-root.js +67 -0
- package/dist/textarea/index.d.ts +1 -0
- package/dist/textarea/index.js +1 -0
- package/dist/textarea/root/textarea-root.d.ts +215 -0
- package/dist/textarea/root/textarea-root.js +380 -0
- package/dist/time-input/index.d.ts +1 -0
- package/dist/time-input/index.js +1 -0
- package/dist/time-input/root/time-input-root.d.ts +322 -0
- package/dist/time-input/root/time-input-root.js +661 -0
- package/dist/time-picker/index.d.ts +1 -0
- package/dist/time-picker/index.js +1 -0
- package/dist/time-picker/root/time-picker-root.d.ts +380 -0
- package/dist/time-picker/root/time-picker-root.js +669 -0
- package/dist/timeline/index.d.ts +2 -0
- package/dist/timeline/index.js +2 -0
- package/dist/timeline/item/timeline-item.d.ts +81 -0
- package/dist/timeline/item/timeline-item.js +128 -0
- package/dist/timeline/root/timeline-root.d.ts +52 -0
- package/dist/timeline/root/timeline-root.js +72 -0
- package/dist/toast/index.d.ts +2 -0
- package/dist/toast/index.js +2 -0
- package/dist/toast/item/toast-item.d.ts +183 -0
- package/dist/toast/item/toast-item.js +345 -0
- package/dist/toast/root/toast-root.d.ts +72 -0
- package/dist/toast/root/toast-root.js +87 -0
- package/dist/toggle/group/toggle-group.d.ts +140 -0
- package/dist/toggle/group/toggle-group.js +278 -0
- package/dist/toggle/index.d.ts +2 -0
- package/dist/toggle/index.js +2 -0
- package/dist/toggle/root/toggle-root.d.ts +99 -0
- package/dist/toggle/root/toggle-root.js +146 -0
- package/dist/toolbar/index.d.ts +1 -0
- package/dist/toolbar/index.js +1 -0
- package/dist/toolbar/root/toolbar-root.d.ts +105 -0
- package/dist/toolbar/root/toolbar-root.js +260 -0
- package/dist/tooltip/index.d.ts +1 -0
- package/dist/tooltip/index.js +1 -0
- package/dist/tooltip/root/tooltip-root.d.ts +388 -0
- package/dist/tooltip/root/tooltip-root.js +707 -0
- package/dist/tour/index.d.ts +2 -0
- package/dist/tour/index.js +2 -0
- package/dist/tour/root/tour-root.d.ts +161 -0
- package/dist/tour/root/tour-root.js +351 -0
- package/dist/tour/stop/tour-stop.d.ts +131 -0
- package/dist/tour/stop/tour-stop.js +249 -0
- package/dist/tree/index.d.ts +2 -0
- package/dist/tree/index.js +2 -0
- package/dist/tree/item/tree-item.d.ts +208 -0
- package/dist/tree/item/tree-item.js +381 -0
- package/dist/tree/root/tree-root.d.ts +88 -0
- package/dist/tree/root/tree-root.js +287 -0
- package/dist/trend/index.d.ts +1 -0
- package/dist/trend/index.js +1 -0
- package/dist/trend/root/trend-root.d.ts +67 -0
- package/dist/trend/root/trend-root.js +106 -0
- package/dist/video/index.d.ts +1 -0
- package/dist/video/index.js +1 -0
- package/dist/video/root/video-root.d.ts +711 -0
- package/dist/video/root/video-root.js +1821 -0
- package/dist/video-playlist/index.d.ts +3 -0
- package/dist/video-playlist/index.js +3 -0
- package/dist/video-playlist/item/video-playlist-item.d.ts +101 -0
- package/dist/video-playlist/item/video-playlist-item.js +162 -0
- package/dist/video-playlist/menu/video-playlist-menu.d.ts +121 -0
- package/dist/video-playlist/menu/video-playlist-menu.js +237 -0
- package/dist/video-playlist/root/video-playlist-root.d.ts +108 -0
- package/dist/video-playlist/root/video-playlist-root.js +218 -0
- package/dist/virtual-list/index.d.ts +1 -0
- package/dist/virtual-list/index.js +1 -0
- package/dist/virtual-list/root/virtual-list-root.d.ts +121 -0
- package/dist/virtual-list/root/virtual-list-root.js +221 -0
- package/jsx.d.ts +49767 -0
- package/package.json +77 -0
- package/svelte.d.ts +129 -0
- package/vue.d.ts +9242 -0
|
@@ -0,0 +1,711 @@
|
|
|
1
|
+
import { HelixElement } from '@fusion.dev/helix-core';
|
|
2
|
+
import { nothing, type PropertyValues, type TemplateResult } from 'lit';
|
|
3
|
+
import '../../menu/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* @summary Plays a video, with controls this library draws rather than the
|
|
6
|
+
* browser's.
|
|
7
|
+
*
|
|
8
|
+
* @description
|
|
9
|
+
* **The picture is a real `<video>`.** Decoding, buffering, captions, Picture
|
|
10
|
+
* in Picture, AirPlay and the codecs a device happens to have are all the
|
|
11
|
+
* platform's, and none of them can be had from anything else. What is replaced
|
|
12
|
+
* is the control bar, which is the one part of a video element that cannot be
|
|
13
|
+
* styled and looks different in every browser.
|
|
14
|
+
*
|
|
15
|
+
* **Every control is a real control.** The scrubber and the volume are
|
|
16
|
+
* `<input type="range">`, so a reader gets arrow keys, Home and End, the
|
|
17
|
+
* platform's own touch target and its screen reader announcement without this
|
|
18
|
+
* element implementing any of it. Drawing a div and listening for pointer moves
|
|
19
|
+
* is how a media player ends up unusable from a keyboard.
|
|
20
|
+
*
|
|
21
|
+
* **Native controls are the fallback, not the default.** Where a consumer sets
|
|
22
|
+
* `controls`, the browser's bar is used and this one is not drawn: two sets of
|
|
23
|
+
* controls over one video is worse than either alone, and a consumer who asked
|
|
24
|
+
* for the native bar has a reason.
|
|
25
|
+
*
|
|
26
|
+
* The keys are the ones every player uses: Space and `k` to play or pause, the
|
|
27
|
+
* arrows to seek and to change the volume, `m` to mute, `f` for fullscreen.
|
|
28
|
+
* They are bound on this element rather than on the document, because a video
|
|
29
|
+
* is not a palette: keys belong to it only while a reader is on it.
|
|
30
|
+
*
|
|
31
|
+
* **And none of them where `controls` is set.** The browser's own bar owns
|
|
32
|
+
* those keys, and two handlers on one press is a video that seeks twice or
|
|
33
|
+
* plays and immediately pauses. The focus stop goes with them, since the native
|
|
34
|
+
* controls bring their own.
|
|
35
|
+
*
|
|
36
|
+
* **`<source>` and `<track>` are copied into the video, not slotted into it.**
|
|
37
|
+
* A media element runs its resource selection over its own child *nodes*, and a
|
|
38
|
+
* slot is one node: the sources and the caption tracks a consumer wrote were
|
|
39
|
+
* assigned into the flattened tree and the video never saw any of them. It had
|
|
40
|
+
* no text tracks, no current source and a `readyState` of zero, so a video
|
|
41
|
+
* given sources this way did not merely lack captions, it did not play.
|
|
42
|
+
*
|
|
43
|
+
* They are copied rather than moved, because the consumer's light DOM is theirs
|
|
44
|
+
* and a framework that re-renders it would find its children gone. The copies
|
|
45
|
+
* are rebuilt whenever the slot changes and the video is asked to load again,
|
|
46
|
+
* which is what makes a `<track>` added later take effect.
|
|
47
|
+
*
|
|
48
|
+
* **The lock screen and a headset's buttons work, and one player owns them.**
|
|
49
|
+
* There is one `navigator.mediaSession` per page, so the rule is stated rather
|
|
50
|
+
* than left to render order: whichever player was started last owns it, which
|
|
51
|
+
* is what a reader means by "this one" when they press play on their
|
|
52
|
+
* headphones. The title comes from `label` and the artwork from `poster`.
|
|
53
|
+
*
|
|
54
|
+
* **`remote` sends the picture somewhere else.** The Remote Playback API is
|
|
55
|
+
* what Safari implements for AirPlay and Chrome for Cast, so one control covers
|
|
56
|
+
* both and the platform supplies the device list. It is offered only once
|
|
57
|
+
* something has answered `watchAvailability`: a button that opens an empty list
|
|
58
|
+
* is worse than no button, and a consumer who wants none can set
|
|
59
|
+
* `disableremoteplayback` on this element.
|
|
60
|
+
*
|
|
61
|
+
* The properties below are written by this component and read by whoever draws
|
|
62
|
+
* it. A consumer sets none of them: they carry a number this element computed
|
|
63
|
+
* and CSS cannot, which is what lets a stylesheet on this tier draw the thing
|
|
64
|
+
* without measuring anything itself.
|
|
65
|
+
*
|
|
66
|
+
* @since 0.1.0
|
|
67
|
+
* @status experimental
|
|
68
|
+
* @category media
|
|
69
|
+
* @aliases Player, Media, Movie
|
|
70
|
+
* @documentation https://helix.fusion.dev/components/video
|
|
71
|
+
*
|
|
72
|
+
* @slot - `<source>` and `<track>` elements, which are copied into the video.
|
|
73
|
+
* @slot back - Top left over the frame, for a way out of a set.
|
|
74
|
+
* @slot controls - Added to the control bar, before fullscreen.
|
|
75
|
+
* @slot poster - Shown over the video until it starts.
|
|
76
|
+
*
|
|
77
|
+
* @event {Event} ended - Relayed for the same reason.
|
|
78
|
+
* @event {HelixNextEvent} helix-next - Fired when the reader asks for the next item.
|
|
79
|
+
* @event {HelixPreviousEvent} helix-previous - Fired when they ask for the previous one.
|
|
80
|
+
* @event {Event} pause - Relayed for the same reason.
|
|
81
|
+
* @event {Event} play - Relayed, because it does not cross a shadow boundary.
|
|
82
|
+
*
|
|
83
|
+
* @csspart back - The region top left, for a way out of a set.
|
|
84
|
+
* @csspart captions - Subtitles on and off.
|
|
85
|
+
* @csspart captions-menu - The language menu, where there is more than one.
|
|
86
|
+
* @csspart captions-menu-back - The control that returns from a submenu.
|
|
87
|
+
* @csspart captions-menu-back-mark - The glyph on the back control of a submenu.
|
|
88
|
+
* @csspart captions-menu-empty - Shown when there are no items to show.
|
|
89
|
+
* @csspart captions-menu-header - The bar above a submenu, holding the way back and its name.
|
|
90
|
+
* @csspart captions-menu-loading - Shown while the items are still on their way.
|
|
91
|
+
* @csspart captions-menu-surface - The floating panel the menu is drawn on.
|
|
92
|
+
* @csspart captions-menu-title - The name of the submenu that is showing.
|
|
93
|
+
* @csspart controls - The bar along the bottom.
|
|
94
|
+
* @csspart cue - The caption on screen now, drawn by this element.
|
|
95
|
+
* @csspart download - Saves the file, where it was asked for.
|
|
96
|
+
* @csspart entry - One row in a menu this player opens.
|
|
97
|
+
* @csspart entry-item - The row, which is an `<a>` where `href` is set.
|
|
98
|
+
* @csspart entry-mark - The trailing mark: a tick when checked, a caret when it opens.
|
|
99
|
+
* @csspart entry-start - The leading column, which is a slot and is always there.
|
|
100
|
+
* @csspart failure - What is said when the source will not play.
|
|
101
|
+
* @csspart forward - The control that goes on ten seconds.
|
|
102
|
+
* @csspart fullscreen - The whole screen, and back.
|
|
103
|
+
* @csspart icon - A glyph this component draws.
|
|
104
|
+
* @csspart loading - What is said while the picture waits for more of itself.
|
|
105
|
+
* @csspart loading-mark - The part of that which spins.
|
|
106
|
+
* @csspart more - The button that opens it.
|
|
107
|
+
* @csspart mute - Sound on and off.
|
|
108
|
+
* @csspart next - Asks for the next item, where it was asked for.
|
|
109
|
+
* @csspart overflow - The menu holding the controls kept off the bar.
|
|
110
|
+
* @csspart overflow-back - The control that returns from a submenu.
|
|
111
|
+
* @csspart overflow-back-mark - The glyph on the back control of a submenu.
|
|
112
|
+
* @csspart overflow-empty - Shown when there are no items to show.
|
|
113
|
+
* @csspart overflow-header - The bar above a submenu, holding the way back and its name.
|
|
114
|
+
* @csspart overflow-loading - Shown while the items are still on their way.
|
|
115
|
+
* @csspart overflow-surface - The floating panel the menu is drawn on.
|
|
116
|
+
* @csspart overflow-title - The name of the submenu that is showing.
|
|
117
|
+
* @csspart pip - Picture in picture, where it was asked for and exists.
|
|
118
|
+
* @csspart play - Play and pause.
|
|
119
|
+
* @csspart poster - What covers it before it plays.
|
|
120
|
+
* @csspart previous - Asks for the previous one.
|
|
121
|
+
* @csspart remote - Play on another device, where one is available.
|
|
122
|
+
* @csspart rewind - The control that goes back ten seconds.
|
|
123
|
+
* @csspart scrubber - Where it is, and where to go.
|
|
124
|
+
* @csspart sound - The speaker and its level, which are one control.
|
|
125
|
+
* @csspart speed - Playback speed, where it was asked for.
|
|
126
|
+
* @csspart stage - The box holding the picture and its controls, and the focus
|
|
127
|
+
* target the keys are bound to.
|
|
128
|
+
* @csspart start - The mark over the picture before anything has played.
|
|
129
|
+
* @csspart time - The position and the duration.
|
|
130
|
+
* @csspart video - The video itself.
|
|
131
|
+
* @csspart volume - How loud.
|
|
132
|
+
*
|
|
133
|
+
* @cssproperty --video-intrinsic-ratio - The media's own aspect ratio, once it is known. `--video-aspect-ratio` overrides it.
|
|
134
|
+
* @cssproperty --video-level - The current volume, 0 to 1.
|
|
135
|
+
* @cssproperty --video-progress - How far playback has reached, as a fraction of the duration.
|
|
136
|
+
*/
|
|
137
|
+
export declare class HelixHeadlessVideo extends HelixElement {
|
|
138
|
+
/**
|
|
139
|
+
* Where the video is, for the common case of one file.
|
|
140
|
+
*/
|
|
141
|
+
src: string;
|
|
142
|
+
/**
|
|
143
|
+
* A still shown before it plays, which the platform draws itself.
|
|
144
|
+
*/
|
|
145
|
+
poster: string;
|
|
146
|
+
/**
|
|
147
|
+
* Accessible name, since a video is not described by its filename.
|
|
148
|
+
*/
|
|
149
|
+
label: string;
|
|
150
|
+
/**
|
|
151
|
+
* Whether it starts again at the end.
|
|
152
|
+
*/
|
|
153
|
+
loop: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Whether it *starts* silent, which is what an autoplaying video must do.
|
|
156
|
+
*
|
|
157
|
+
* **Renamed from `muted`, because that is what it always was.** The platform
|
|
158
|
+
* splits these two: the `muted` content attribute reflects to `defaultMuted`,
|
|
159
|
+
* and the `muted` property is live state a reader's click moves without
|
|
160
|
+
* touching the attribute. This element declared one property called `muted`,
|
|
161
|
+
* bound it to the attribute, and tracked the live state privately as
|
|
162
|
+
* `silent`, so `<helix-video>.muted` answered what the author wrote rather
|
|
163
|
+
* than whether there was sound. A name matching the platform's while meaning
|
|
164
|
+
* something else is worse than a name the platform does not have, and
|
|
165
|
+
* `check:platform-fidelity` could not see it: it compares names.
|
|
166
|
+
*/
|
|
167
|
+
defaultMuted: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Whether it plays where it sits rather than taking over the screen.
|
|
170
|
+
*/
|
|
171
|
+
playsInline: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Whether the browser draws the controls instead of this element.
|
|
174
|
+
*
|
|
175
|
+
* A fallback rather than a default. Two bars over one video is worse than
|
|
176
|
+
* either alone, so this one is not drawn at all when it is set.
|
|
177
|
+
*/
|
|
178
|
+
controls: boolean;
|
|
179
|
+
/**
|
|
180
|
+
* How much to fetch before anything is asked for.
|
|
181
|
+
*/
|
|
182
|
+
preload: 'auto' | 'metadata' | 'none';
|
|
183
|
+
/**
|
|
184
|
+
* Whether it starts on its own, which a browser only allows while silent.
|
|
185
|
+
*
|
|
186
|
+
* Forwarded rather than acted on. Whether an unprompted play is permitted is
|
|
187
|
+
* the browser's policy and not this element's, and `play()` already swallows
|
|
188
|
+
* the refusal: what follows a refused autoplay is a paused player showing its
|
|
189
|
+
* start control, which is the correct thing to be looking at.
|
|
190
|
+
*/
|
|
191
|
+
autoplay: boolean;
|
|
192
|
+
/**
|
|
193
|
+
* How the media is fetched across origins, which decides whether a track can
|
|
194
|
+
* be read.
|
|
195
|
+
*/
|
|
196
|
+
crossOrigin: 'anonymous' | 'use-credentials' | null;
|
|
197
|
+
/**
|
|
198
|
+
* Whether the browser may offer picture in picture.
|
|
199
|
+
*/
|
|
200
|
+
disablePictureInPicture: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* Whether the browser may offer playback on a remote device.
|
|
203
|
+
*/
|
|
204
|
+
disableRemotePlayback: boolean;
|
|
205
|
+
/**
|
|
206
|
+
* Controls beyond the ones every player has, named in the order they appear.
|
|
207
|
+
*
|
|
208
|
+
* A list rather than a property apiece. A bar is a row with a budget, and a
|
|
209
|
+
* boolean per feature invites a consumer to switch all of them on: naming
|
|
210
|
+
* them makes the row a decision, and makes the order theirs. Anything
|
|
211
|
+
* unrecognised is skipped rather than throwing, since the list is markup and
|
|
212
|
+
* a typo should cost a control, not a page.
|
|
213
|
+
*
|
|
214
|
+
* `pip` is offered only where the platform has it, checked rather than
|
|
215
|
+
* assumed: it is absent on iPhone and behind a flag in Firefox, and a button
|
|
216
|
+
* that cannot work is worse than one that is not there.
|
|
217
|
+
*
|
|
218
|
+
* The names are `speed`, `pip`, `remote` and `download`.
|
|
219
|
+
*
|
|
220
|
+
* **`download` is named and never assumed.** Offering the file is a decision
|
|
221
|
+
* about the content rather than about the player, and plenty of consumers
|
|
222
|
+
* decline it deliberately. It is also the one control whose success is not
|
|
223
|
+
* ours to promise: the attribute is ignored cross-origin, so a file served
|
|
224
|
+
* from somewhere else opens rather than saves, which is the browser's rule
|
|
225
|
+
* and not something a player can work around.
|
|
226
|
+
*/
|
|
227
|
+
extraControls: string;
|
|
228
|
+
/**
|
|
229
|
+
* Controls that go behind one button instead of onto the bar, named the same
|
|
230
|
+
* way.
|
|
231
|
+
*
|
|
232
|
+
* **Named rather than measured, and the reason is that a width cannot answer
|
|
233
|
+
* this.** A media query asks about the window, and the bar's problem is its
|
|
234
|
+
* own width: a video in a 320px sidebar on a desktop is cramped and a
|
|
235
|
+
* full-bleed hero on a phone is not. A container query asks the right
|
|
236
|
+
* question and still cannot answer it, because how many controls there are is
|
|
237
|
+
* the consumer's, so the threshold is not a width but a width per control,
|
|
238
|
+
* which is a guess. And a control that moves between the bar and a hidden
|
|
239
|
+
* menu as the layout shifts is a control the reader has to find twice.
|
|
240
|
+
*
|
|
241
|
+
* So the consumer says where the fold is, which they can, having already
|
|
242
|
+
* named the controls in order. A name in both lists is drawn once, on the
|
|
243
|
+
* bar: two of the same control is worse than either placement.
|
|
244
|
+
*/
|
|
245
|
+
overflowControls: string;
|
|
246
|
+
/**
|
|
247
|
+
* The big mark over the picture before anything has played, or `none`.
|
|
248
|
+
*
|
|
249
|
+
* **On unless it is turned off, because a stopped video has nothing else.**
|
|
250
|
+
* Measured on the bar as it was: the play glyph is 16 by 16 in a 24 by 24
|
|
251
|
+
* target, which is 0.12% of a 528 by 396 picture and 0.33% at 320. What a
|
|
252
|
+
* reader meets first is a still frame with some chrome along the bottom, and
|
|
253
|
+
* nothing in it says "press to watch".
|
|
254
|
+
*
|
|
255
|
+
* `none` is for the cases where that is wrong rather than right: a muted loop
|
|
256
|
+
* behind a hero, a grid of eight thumbnails, anything where the video is
|
|
257
|
+
* decoration rather than something to start.
|
|
258
|
+
*
|
|
259
|
+
* **Only before the first play.** A video paused halfway already has its bar
|
|
260
|
+
* up, because a paused video never idles, so the small control is visible and
|
|
261
|
+
* the reader has just used it. Covering the picture they stopped to look at
|
|
262
|
+
* would be the opposite of helpful.
|
|
263
|
+
*
|
|
264
|
+
* A value rather than a boolean, so the resting state is the attribute's
|
|
265
|
+
* absence: a boolean defaulting to on would have to be spelled as its own
|
|
266
|
+
* negation.
|
|
267
|
+
*/
|
|
268
|
+
startControl?: 'none';
|
|
269
|
+
/**
|
|
270
|
+
* Whether the file this points at is ours to hand over.
|
|
271
|
+
*
|
|
272
|
+
* `blob:` and `data:` named rather than compared, because the rule `download`
|
|
273
|
+
* actually follows is same-origin *or one of those two*: a clip a consumer
|
|
274
|
+
* generated in the page has no origin to match and is theirs to save by
|
|
275
|
+
* definition. Comparing origins alone called both foreign, so the one case
|
|
276
|
+
* where a download certainly works was the one case it was not offered.
|
|
277
|
+
*/
|
|
278
|
+
private get localFile();
|
|
279
|
+
/**
|
|
280
|
+
* The speeds offered, slowest first, as multipliers of normal.
|
|
281
|
+
*/
|
|
282
|
+
speeds: string;
|
|
283
|
+
/**
|
|
284
|
+
* How long the bar waits after the pointer stops before it goes, in ms.
|
|
285
|
+
*
|
|
286
|
+
* It used to leave the moment the pointer did, which is not how a player
|
|
287
|
+
* behaves: a reader moving across the picture to reach a control watched it
|
|
288
|
+
* vanish under them. Zero turns the wait off and the bar goes immediately;
|
|
289
|
+
* a large number keeps it up for as long as anyone is likely to look.
|
|
290
|
+
*
|
|
291
|
+
* The wait is only ever about *idling*. A video that is paused keeps its bar
|
|
292
|
+
* regardless, because a reader who stopped it is deciding what to do next.
|
|
293
|
+
*/
|
|
294
|
+
idleDelay: number;
|
|
295
|
+
/**
|
|
296
|
+
* What the play control is called while it would start the video.
|
|
297
|
+
*/
|
|
298
|
+
playLabel: string;
|
|
299
|
+
/**
|
|
300
|
+
* And while it would stop it.
|
|
301
|
+
*/
|
|
302
|
+
pauseLabel: string;
|
|
303
|
+
/**
|
|
304
|
+
* What a reader is told while the picture is waiting for more of itself.
|
|
305
|
+
*/
|
|
306
|
+
loadingLabel: string;
|
|
307
|
+
/**
|
|
308
|
+
* And what they are told when it will not play at all.
|
|
309
|
+
*/
|
|
310
|
+
errorLabel: string;
|
|
311
|
+
/**
|
|
312
|
+
* Whether playback has stopped to wait for data.
|
|
313
|
+
*
|
|
314
|
+
* **Only ever after somebody asked for playback**, which is what `waiting`
|
|
315
|
+
* means: the element wanted the next frame and did not have it. Before that,
|
|
316
|
+
* a video that has loaded nothing is a poster with a play control over it,
|
|
317
|
+
* which looks deliberate and is. A spinner there would say something is
|
|
318
|
+
* happening when nothing is, on every video on the page.
|
|
319
|
+
*
|
|
320
|
+
* The case this covers is the one that looks like a bug: a picture frozen
|
|
321
|
+
* mid-play, the scrubber stopped, and nothing on screen saying why.
|
|
322
|
+
*/
|
|
323
|
+
private buffering;
|
|
324
|
+
/**
|
|
325
|
+
* Whether the source failed, which is the other thing a frozen frame can
|
|
326
|
+
* mean.
|
|
327
|
+
*/
|
|
328
|
+
private failed;
|
|
329
|
+
private playing;
|
|
330
|
+
private position;
|
|
331
|
+
private knownDuration;
|
|
332
|
+
private loudness;
|
|
333
|
+
private silent;
|
|
334
|
+
private full;
|
|
335
|
+
private captioned;
|
|
336
|
+
/**
|
|
337
|
+
* Which caption track is showing, or `-1` for none.
|
|
338
|
+
*
|
|
339
|
+
* `@state`, because it is read off the video rather than declared: a consumer
|
|
340
|
+
* asking for a language would be naming a track that may not have loaded, and
|
|
341
|
+
* `default` on the `<track>` is the platform's own way to say it.
|
|
342
|
+
*/
|
|
343
|
+
private captionIndex;
|
|
344
|
+
/**
|
|
345
|
+
* How many caption tracks there are, which decides which control is drawn.
|
|
346
|
+
*
|
|
347
|
+
* A count and not a boolean, and that is the whole reason it changed. Tracks
|
|
348
|
+
* resolve after the element renders, so this is what schedules the update
|
|
349
|
+
* that draws the control at all; as a boolean it went false to true when the
|
|
350
|
+
* first one arrived and then never moved again, so a second track landing
|
|
351
|
+
* left the toggle in place and the language menu was unreachable on exactly
|
|
352
|
+
* the videos it exists for.
|
|
353
|
+
*/
|
|
354
|
+
private captionCount;
|
|
355
|
+
/**
|
|
356
|
+
* The cue on screen now, as nodes, or nothing between cues.
|
|
357
|
+
*
|
|
358
|
+
* Nodes rather than a string, because `VTTCue.text` is the cue's *source*:
|
|
359
|
+
* WebVTT carries markup, and a caption file in the wild is full of it. `<v
|
|
360
|
+
* Hildy>` names who is speaking, `<b>` and `<i>` and `<u>` mark emphasis, and
|
|
361
|
+
* `<c.loud>` classes a line. Rendered as text every one of those arrives on
|
|
362
|
+
* screen as visible angle brackets.
|
|
363
|
+
*
|
|
364
|
+
* `getCueAsHTML` is the platform parsing its own format, so nothing here has
|
|
365
|
+
* to know the grammar and no cue text is ever treated as HTML: what comes
|
|
366
|
+
* back is a fragment the browser built, not a string anybody interpolated.
|
|
367
|
+
*/
|
|
368
|
+
private cue;
|
|
369
|
+
private rate;
|
|
370
|
+
/**
|
|
371
|
+
* Whether the reader has been still long enough for the bar to go.
|
|
372
|
+
*/
|
|
373
|
+
private idle;
|
|
374
|
+
private idleTimer?;
|
|
375
|
+
/**
|
|
376
|
+
* Whether anything on the network offers to play this.
|
|
377
|
+
*/
|
|
378
|
+
private remoteAvailable;
|
|
379
|
+
/**
|
|
380
|
+
* Whether it is playing somewhere else right now.
|
|
381
|
+
*/
|
|
382
|
+
private remoteConnected;
|
|
383
|
+
/** Cancels the availability watch, since it outlives a single render. */
|
|
384
|
+
private remoteWatch;
|
|
385
|
+
/** Whether this platform can do a named control at all. */
|
|
386
|
+
private offers;
|
|
387
|
+
/** The extras asked for, in order, and only the ones this platform can do. */
|
|
388
|
+
private get extras();
|
|
389
|
+
/**
|
|
390
|
+
* The controls asked for behind the overflow button, in order.
|
|
391
|
+
*
|
|
392
|
+
* A name in both lists is on the bar and not here. Drawing it twice is worse
|
|
393
|
+
* than either placement, and the bar is the one a reader can see.
|
|
394
|
+
*/
|
|
395
|
+
private get overflow();
|
|
396
|
+
/**
|
|
397
|
+
* The sources and caption tracks to copy into the video, as the consumer
|
|
398
|
+
* wrote them.
|
|
399
|
+
*/
|
|
400
|
+
private media;
|
|
401
|
+
/**
|
|
402
|
+
* The media's own state, under the platform's own names.
|
|
403
|
+
*
|
|
404
|
+
* **This element already knew every one of these and kept them private.** It
|
|
405
|
+
* tracks `currentTime` as `position`, `duration` as `knownDuration`, `volume`
|
|
406
|
+
* as `loudness`, `paused` as `playing` and `playbackRate` as `rate`, paints
|
|
407
|
+
* them, and published none of them, so a consumer asking where the video had
|
|
408
|
+
* reached had nowhere to ask: the `<video>` is inside this shadow root and
|
|
409
|
+
* `querySelector` does not cross it. 295 is that finding across the library
|
|
410
|
+
* and this is its clearest case.
|
|
411
|
+
*
|
|
412
|
+
* **Read from the element, with the mirror as the fallback.** The element is
|
|
413
|
+
* the truth and the mirror is a render cache that a media event refreshes, so
|
|
414
|
+
* reading the mirror alone would answer with whatever the last `timeupdate`
|
|
415
|
+
* said rather than with where the video is now. The fallback is what answers
|
|
416
|
+
* on the server and before the first render, where there is no element and
|
|
417
|
+
* the mirror holds what markup asked for.
|
|
418
|
+
*
|
|
419
|
+
* **Accessors rather than reactive properties**, because none of these is a
|
|
420
|
+
* setting: they are the media's state, and a `@property` would give each one
|
|
421
|
+
* an attribute that a consumer could write and the element would then have to
|
|
422
|
+
* disagree with. Where the platform makes one writable this writes it
|
|
423
|
+
* through, and where the platform does not neither does this.
|
|
424
|
+
*/
|
|
425
|
+
get currentSrc(): string;
|
|
426
|
+
/**
|
|
427
|
+
* Where playback has reached, in seconds.
|
|
428
|
+
*
|
|
429
|
+
* Writing seeks, through the same clamp `seek` uses, because a `currentTime`
|
|
430
|
+
* past the end is the one write the platform answers with an exception.
|
|
431
|
+
*/
|
|
432
|
+
get currentTime(): number;
|
|
433
|
+
set currentTime(seconds: number);
|
|
434
|
+
/** The rate playback returns to, which `defaultPlaybackRate` names natively. */
|
|
435
|
+
get defaultPlaybackRate(): number;
|
|
436
|
+
set defaultPlaybackRate(rate: number);
|
|
437
|
+
/** How long the media runs, in seconds, and `NaN` until that is known. */
|
|
438
|
+
get duration(): number;
|
|
439
|
+
/** Whether playback has run off the end. */
|
|
440
|
+
get ended(): boolean;
|
|
441
|
+
/** Whether playback is stopped, which is the resting state and not an error. */
|
|
442
|
+
get paused(): boolean;
|
|
443
|
+
/** How fast it plays, where 1 is the recorded speed. */
|
|
444
|
+
get playbackRate(): number;
|
|
445
|
+
set playbackRate(rate: number);
|
|
446
|
+
/** Whether pitch is held steady when the rate changes. */
|
|
447
|
+
get preservesPitch(): boolean;
|
|
448
|
+
set preservesPitch(preserve: boolean);
|
|
449
|
+
/** Whether it is currently moving to a new position. */
|
|
450
|
+
get seeking(): boolean;
|
|
451
|
+
/** The media's own height in pixels, and zero until the metadata has loaded. */
|
|
452
|
+
get videoHeight(): number;
|
|
453
|
+
/** The media's own width in pixels, and zero until the metadata has loaded. */
|
|
454
|
+
get videoWidth(): number;
|
|
455
|
+
/**
|
|
456
|
+
* Whether there is sound, now, which a reader's click moves.
|
|
457
|
+
*
|
|
458
|
+
* The live half of the pair above. Writing mutes or unmutes the media itself
|
|
459
|
+
* rather than the attribute, which is what the platform does and what the
|
|
460
|
+
* mute control here has always done directly.
|
|
461
|
+
*/
|
|
462
|
+
get muted(): boolean;
|
|
463
|
+
set muted(quiet: boolean);
|
|
464
|
+
/** How loud it plays, 0 to 1. */
|
|
465
|
+
get volume(): number;
|
|
466
|
+
set volume(level: number);
|
|
467
|
+
private get video();
|
|
468
|
+
/**
|
|
469
|
+
* Starts playing, where the platform allows it.
|
|
470
|
+
*
|
|
471
|
+
* The rejection is swallowed on purpose: a browser refuses `play()` when
|
|
472
|
+
* nothing the reader did asked for it, and that is a policy answer rather than
|
|
473
|
+
* a fault. What follows a refused play is a paused player showing its start
|
|
474
|
+
* control, which is the correct thing to be looking at.
|
|
475
|
+
*/
|
|
476
|
+
play(): void;
|
|
477
|
+
/** Stops, leaving the frame up. */
|
|
478
|
+
pause(): void;
|
|
479
|
+
/** Toggles playback, which is what every key and the button both come to. */
|
|
480
|
+
toggle(): void;
|
|
481
|
+
/** Moves to a point in seconds, clamped to what exists. */
|
|
482
|
+
seek(seconds: number): void;
|
|
483
|
+
/**
|
|
484
|
+
* The scrubber's new position, and the reason these two are named at all.
|
|
485
|
+
*
|
|
486
|
+
* **The stop is the first line.** `input` is composed by specification, so a
|
|
487
|
+
* range inside this shadow root sends its own straight past the host to
|
|
488
|
+
* whoever is listening on it, and this component declares no `input`: a
|
|
489
|
+
* consumer binding one received the scrubber's and the volume rail's under a
|
|
490
|
+
* name Video never promised, carrying a seconds count or a level between zero
|
|
491
|
+
* and one rather than anything about the element.
|
|
492
|
+
*
|
|
493
|
+
* Found by sweeping every family that renders a native control, which is what
|
|
494
|
+
* 308 said and not what it was read as: the first two passes both took "form
|
|
495
|
+
* control" as the population and a media component with two rails in its
|
|
496
|
+
* chrome is neither a form control nor exempt from the mechanism. See 308.
|
|
497
|
+
*/
|
|
498
|
+
private takeScrub;
|
|
499
|
+
/** The volume rail's new level, stopped for the reason `takeScrub` carries. */
|
|
500
|
+
private takeVolume;
|
|
501
|
+
/**
|
|
502
|
+
* Rebuilds the copies from whatever the consumer has slotted.
|
|
503
|
+
*
|
|
504
|
+
* The attribute list is explicit rather than a blind copy of every attribute:
|
|
505
|
+
* these are two elements with a known and small surface, and copying anything
|
|
506
|
+
* a consumer happened to put on one would carry their framework's own markers
|
|
507
|
+
* into a shadow root that has no use for them.
|
|
508
|
+
*/
|
|
509
|
+
private readonly handleMedia;
|
|
510
|
+
private readonly handleLoaded;
|
|
511
|
+
private readonly handleTime;
|
|
512
|
+
/**
|
|
513
|
+
* Relayed, because none of these cross a shadow boundary on their own.
|
|
514
|
+
*
|
|
515
|
+
* The video is inside this element's shadow root, so a consumer listening on
|
|
516
|
+
* the element they wrote hears nothing at all without this. Input relays
|
|
517
|
+
* `change` for the same reason.
|
|
518
|
+
*/
|
|
519
|
+
private readonly handleWaiting;
|
|
520
|
+
private readonly handleReady;
|
|
521
|
+
private readonly handleError;
|
|
522
|
+
private readonly handleState;
|
|
523
|
+
/**
|
|
524
|
+
* Takes the page's media session, and tells the platform what is playing.
|
|
525
|
+
*
|
|
526
|
+
* On play rather than on render, which is the ownership rule: a page with two
|
|
527
|
+
* players gives the session to whichever one the reader started, so a
|
|
528
|
+
* headset's buttons land on what they are listening to rather than on
|
|
529
|
+
* whichever came first in the markup.
|
|
530
|
+
*
|
|
531
|
+
* The handlers are what make a headset's play, pause and skip work at all.
|
|
532
|
+
* Without them a platform falls back to guessing which element was meant,
|
|
533
|
+
* which is right often enough to hide the fault and wrong exactly when there
|
|
534
|
+
* are two.
|
|
535
|
+
*/
|
|
536
|
+
private claimSession;
|
|
537
|
+
private readonly handleVolume;
|
|
538
|
+
/**
|
|
539
|
+
* Draws the active cue ourselves, so it can be put where we want it.
|
|
540
|
+
*
|
|
541
|
+
* The browser renders cues inside the video's own box and there is no
|
|
542
|
+
* standard way to inset that box: a caption lands under the control bar and
|
|
543
|
+
* stays there. `::cue` styles the text and not the region, and the property
|
|
544
|
+
* that moves the region is a `-webkit-` internal that two of the three
|
|
545
|
+
* engines do not have.
|
|
546
|
+
*
|
|
547
|
+
* So the track is set to `hidden` rather than `showing`, which is the mode
|
|
548
|
+
* that keeps the cues coming without drawing them, and what it reports is
|
|
549
|
+
* rendered into a part of our own. That also makes captions styleable, which
|
|
550
|
+
* `::cue` only half allows.
|
|
551
|
+
*/
|
|
552
|
+
private readonly handleCue;
|
|
553
|
+
/**
|
|
554
|
+
* Moves by a fixed length, clamped by `seek`.
|
|
555
|
+
*
|
|
556
|
+
* Separate from the arrow keys, which move by 5 and by 10 with Shift. Those
|
|
557
|
+
* are a scrub; this is the gesture for "I missed that", and a reader who
|
|
558
|
+
* presses it twice expects twenty seconds rather than an accelerating jump.
|
|
559
|
+
*/
|
|
560
|
+
private skipBy;
|
|
561
|
+
/**
|
|
562
|
+
* The tracks a reader could choose between, in the order they were written.
|
|
563
|
+
*
|
|
564
|
+
* Filtered by kind, because `textTracks` also carries `chapters`, `metadata`
|
|
565
|
+
* and `descriptions`, and a menu offering "Chapters" as a subtitle language
|
|
566
|
+
* would be offering something that draws no words. Read off the video rather
|
|
567
|
+
* than off the slot: a `<track>` added later is in one and not the other, and
|
|
568
|
+
* the video is the one that has resolved them.
|
|
569
|
+
*/
|
|
570
|
+
private get captionTracks();
|
|
571
|
+
/**
|
|
572
|
+
* Shows one track and disables every other, or shows none at `-1`.
|
|
573
|
+
*
|
|
574
|
+
* Every other, rather than only the one that was on. Two tracks in `hidden`
|
|
575
|
+
* both fire `cuechange`, so the rendered cue becomes whichever fired last and
|
|
576
|
+
* a reader who switched language gets the two interleaved. Measured as two
|
|
577
|
+
* subtitles alternating line by line.
|
|
578
|
+
*
|
|
579
|
+
* `hidden`, never `showing`. Hidden is the mode where a track still fires
|
|
580
|
+
* `cuechange` and still fills `activeCues`, and the browser draws nothing,
|
|
581
|
+
* which is exactly what is wanted when something else is doing the drawing.
|
|
582
|
+
*/
|
|
583
|
+
private showCaption;
|
|
584
|
+
/** Turns captions on or off, which is what the button means with one track. */
|
|
585
|
+
private toggleCaptions;
|
|
586
|
+
/**
|
|
587
|
+
* Says the reader asked for another item, and does nothing else.
|
|
588
|
+
*
|
|
589
|
+
* There is nothing else it could do. A `<video>` plays one resource, so what
|
|
590
|
+
* comes before or after it is a fact this element does not hold: a playlist
|
|
591
|
+
* has it, or the consumer does. Announcing is the whole of the contribution,
|
|
592
|
+
* and the event bubbles so a wrapper hears it.
|
|
593
|
+
*
|
|
594
|
+
* The same call answers the button, the row in the overflow menu, and the
|
|
595
|
+
* skip keys on a headset, which is why the media session's handlers point
|
|
596
|
+
* here rather than at anything of their own.
|
|
597
|
+
*/
|
|
598
|
+
private skip;
|
|
599
|
+
/** Steps through the speeds offered, which is what one button can do. */
|
|
600
|
+
private cycleSpeed;
|
|
601
|
+
/**
|
|
602
|
+
* Starts watching for something to play this on, and stops on the way out.
|
|
603
|
+
*
|
|
604
|
+
* The Remote Playback API is the standard one, and it is what Safari
|
|
605
|
+
* implements for AirPlay and Chrome for Cast: one call covers both, where the
|
|
606
|
+
* older `webkitShowPlaybackTargetPicker` covers only the first. Firefox has
|
|
607
|
+
* neither, and `remote` simply being absent is what turns the control off
|
|
608
|
+
* there.
|
|
609
|
+
*
|
|
610
|
+
* `watchAvailability` returns an id that has to be canceled, or the callback
|
|
611
|
+
* outlives the element that owns it.
|
|
612
|
+
*/
|
|
613
|
+
private watchRemote;
|
|
614
|
+
/** Opens the platform's own device picker. It has no list of its own. */
|
|
615
|
+
private promptRemote;
|
|
616
|
+
private togglePip;
|
|
617
|
+
/**
|
|
618
|
+
* Into fullscreen and back, and quiet about being refused.
|
|
619
|
+
*
|
|
620
|
+
* `requestFullscreen` rejects rather than returning false, and the two
|
|
621
|
+
* refusals a consumer will actually meet are a Permissions Policy that does
|
|
622
|
+
* not grant `fullscreen` to the frame the player is in, and a call without
|
|
623
|
+
* user activation. Both are `TypeError: Permissions check failed`, which is
|
|
624
|
+
* the same message for two different causes.
|
|
625
|
+
*
|
|
626
|
+
* It was `void`ed, so a refusal became an unhandled rejection: the button did
|
|
627
|
+
* nothing and said nothing, and the console entry it left named neither the
|
|
628
|
+
* element nor the reason. Caught here, the state stays honest because
|
|
629
|
+
* `aria-pressed` follows `fullscreenchange` rather than this call, so a
|
|
630
|
+
* refused request leaves a button that correctly reports "not fullscreen".
|
|
631
|
+
*/
|
|
632
|
+
private toggleFullscreen;
|
|
633
|
+
/**
|
|
634
|
+
* Restarts the wait, on anything that counts as the reader being here.
|
|
635
|
+
*
|
|
636
|
+
* Pointer movement and focus both count, and both have to: a reader using the
|
|
637
|
+
* keyboard never moves a pointer, and a bar that only answered the mouse
|
|
638
|
+
* would leave them nothing to look at.
|
|
639
|
+
*/
|
|
640
|
+
private readonly stir;
|
|
641
|
+
private readonly handleFullscreenChange;
|
|
642
|
+
/**
|
|
643
|
+
* The keys every player uses, bound to this element rather than the document.
|
|
644
|
+
*
|
|
645
|
+
* A video is not a command palette: its keys belong to it while a reader is
|
|
646
|
+
* on it, and a page with two videos on it would otherwise have both answering
|
|
647
|
+
* the same press.
|
|
648
|
+
*
|
|
649
|
+
* Nothing is taken while focus is in a range. The scrubber and the volume are
|
|
650
|
+
* real inputs and the arrows are already theirs, so intercepting would mean
|
|
651
|
+
* seeking twice for one press.
|
|
652
|
+
*/
|
|
653
|
+
private readonly handleKeydown;
|
|
654
|
+
/** The track currently being listened to, so the next one can take it off. */
|
|
655
|
+
private cued;
|
|
656
|
+
private readonly handleRemoteState;
|
|
657
|
+
connectedCallback(): void;
|
|
658
|
+
disconnectedCallback(): void;
|
|
659
|
+
protected firstUpdated(changed: PropertyValues): void;
|
|
660
|
+
/**
|
|
661
|
+
* Mirrors playback onto the host as `data-playing`.
|
|
662
|
+
*
|
|
663
|
+
* Because CSS cannot ask. `paused` is a property of a `<video>` and never an
|
|
664
|
+
* attribute, so `video:not([paused])` matches every video that has ever
|
|
665
|
+
* existed: the first version of the rule that hides the bar used exactly that
|
|
666
|
+
* and hid it always, including on a paused video, which is the one state it
|
|
667
|
+
* was written to keep it in.
|
|
668
|
+
*
|
|
669
|
+
* **A `data-` attribute is right here because of when it is written.** A fact
|
|
670
|
+
* that can be true on the first update mirrors to a custom state instead, or
|
|
671
|
+
* a consumer's server sends markup the element then grows an attribute on and
|
|
672
|
+
* React reports a mismatch it will not patch up. Nothing plays until somebody
|
|
673
|
+
* presses play, so this one is written long past hydration and there is
|
|
674
|
+
* nothing for it to disagree with. `data-closed` on `Toast.Item` and
|
|
675
|
+
* `data-closed` on `Toast.Item` is the same case; `:state(open)` and
|
|
676
|
+
* `:state(checked)` are the other one, and were `data-` attributes until
|
|
677
|
+
* 27 Aug 2026.
|
|
678
|
+
*/
|
|
679
|
+
protected updated(changed: PropertyValues): void;
|
|
680
|
+
/**
|
|
681
|
+
* One named control, as a button on the bar.
|
|
682
|
+
*
|
|
683
|
+
* A method rather than four branches inlined, because the same four names are
|
|
684
|
+
* asked for twice now, once for the bar and once for the menu behind it, and
|
|
685
|
+
* two lists that have to stay in step is how a control ends up offered in one
|
|
686
|
+
* place and not the other.
|
|
687
|
+
*/
|
|
688
|
+
protected renderExtra(one: string): TemplateResult;
|
|
689
|
+
/**
|
|
690
|
+
* A toggle for one track, a menu for several, and nothing for none.
|
|
691
|
+
*
|
|
692
|
+
* No menu at one, because a menu of a single language plus "Off" is a
|
|
693
|
+
* two-state control wearing a popover, and the button already says which
|
|
694
|
+
* state it is in through `aria-pressed`. The moment there are two the button
|
|
695
|
+
* cannot say which one is on, so it stops being a button.
|
|
696
|
+
*
|
|
697
|
+
* The label comes off the track: `label` where the markup gave one, and
|
|
698
|
+
* `srclang` where it did not, because a `<track>` with neither is a track
|
|
699
|
+
* nobody can choose between and that is the markup's fault to fix, not this
|
|
700
|
+
* component's to paper over with "Track 2".
|
|
701
|
+
*/
|
|
702
|
+
protected renderCaptions(): TemplateResult | typeof nothing;
|
|
703
|
+
protected renderOverflowItem(one: string): TemplateResult;
|
|
704
|
+
protected renderBar(): TemplateResult;
|
|
705
|
+
protected render(): TemplateResult;
|
|
706
|
+
}
|
|
707
|
+
declare global {
|
|
708
|
+
interface HTMLElementTagNameMap {
|
|
709
|
+
'helix-headless-video': HelixHeadlessVideo;
|
|
710
|
+
}
|
|
711
|
+
}
|