@tarojs/components 3.5.0-canary.1 → 3.5.0-theta.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/README.md +2 -0
- package/dist/cjs/{index-dd4b7ba3.js → index-13289aba.js} +62 -53
- package/dist/cjs/index-47a1959e.js +34 -0
- package/dist/{esm/index-3c78bcaf.js → cjs/index-f9d21cc5.js} +12 -1
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/taro-ad-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-ad-custom-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-audio-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-block-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-button-core.cjs.entry.js +3 -3
- package/dist/cjs/taro-camera-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-canvas-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-checkbox-core_2.cjs.entry.js +2 -2
- package/dist/cjs/taro-components.cjs.js +3 -3
- package/dist/cjs/taro-cover-image-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-cover-view-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-custom-wrapper-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-editor-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-form-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-functional-page-navigator-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-icon-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-image-core.cjs.entry.js +3 -3
- package/dist/cjs/taro-input-core.cjs.entry.js +16 -19
- package/dist/cjs/taro-keyboard-accessory-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-label-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-live-player-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-live-pusher-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-map-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-match-media-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-movable-area-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-movable-view-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-navigation-bar-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-navigator-core.cjs.entry.js +4 -4
- package/dist/cjs/taro-official-account-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-open-data-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-page-container-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-page-meta-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-picker-core_2.cjs.entry.js +2 -2
- package/dist/cjs/taro-picker-view-column-core.cjs.entry.js +80 -4
- package/dist/cjs/taro-picker-view-core.cjs.entry.js +72 -3
- package/dist/cjs/taro-progress-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-pull-to-refresh.cjs.entry.js +15 -5
- package/dist/cjs/taro-radio-core_2.cjs.entry.js +1 -1
- package/dist/cjs/taro-rich-text-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-scroll-view-core.cjs.entry.js +6 -14
- package/dist/cjs/taro-share-element-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-slider-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-slot-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +14 -17
- package/dist/cjs/taro-switch-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-tabbar.cjs.entry.js +38 -38
- package/dist/cjs/taro-text-core.cjs.entry.js +3 -3
- package/dist/cjs/taro-textarea-core.cjs.entry.js +5 -3
- package/dist/cjs/taro-video-control_3.cjs.entry.js +27868 -224
- package/dist/cjs/taro-view-core.cjs.entry.js +5 -5
- package/dist/cjs/taro-voip-room-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-web-view-core.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/button/style/index.css +49 -49
- package/dist/collection/components/canvas/canvas.js +1 -1
- package/dist/collection/components/canvas/style/index.css +6 -6
- package/dist/collection/components/checkbox/style/index.css +21 -23
- package/dist/collection/components/image/image.js +1 -1
- package/dist/collection/components/image/style/index.css +7 -4
- package/dist/collection/components/input/index.css +2 -2
- package/dist/collection/components/input/input.js +15 -23
- package/dist/collection/components/navigator/navigator.js +2 -2
- package/dist/collection/components/navigator/{navigator.css → style/index.css} +3 -3
- package/dist/collection/components/picker/style/index.css +2 -1
- package/dist/collection/components/picker-view/picker-view-column.js +218 -4
- package/dist/collection/components/picker-view/picker-view.js +217 -3
- package/dist/collection/components/picker-view/style/column.css +12 -0
- package/dist/collection/components/picker-view/style/index.css +28 -0
- package/dist/collection/components/pull-to-refresh/pull-to-refresh.js +13 -3
- package/dist/collection/components/pull-to-refresh/style/index.css +53 -49
- package/dist/collection/components/rich-text/rich-text.js +1 -1
- package/dist/collection/components/scroll-view/scroll-view.js +3 -11
- package/dist/collection/components/swiper/swiper.js +10 -13
- package/dist/collection/components/tabbar/style/index.css +9 -6
- package/dist/collection/components/tabbar/tabbar.js +13 -13
- package/dist/collection/components/text/style/index.css +0 -6
- package/dist/collection/components/textarea/style/index.css +5 -5
- package/dist/collection/components/textarea/textarea.js +3 -1
- package/dist/collection/components/video/style/index.css +88 -109
- package/dist/collection/components/video/utils.js +95 -109
- package/dist/collection/components/video/video-control.js +9 -9
- package/dist/collection/components/video/video.js +57 -9
- package/dist/collection/components/view/style/index.css +3 -5
- package/dist/collection/components/view/view.js +2 -2
- package/dist/collection/components/web-view/style/index.css +1 -1
- package/dist/collection/utils/index.js +23 -83
- package/dist/collection/utils/style.js +10 -0
- package/dist/collection/utils/url.js +67 -0
- package/dist/{cjs/index-b9715722.js → esm/index-1d8e8acd.js} +6 -2
- package/dist/esm/{index-5bd7cbab.js → index-26d8b479.js} +62 -53
- package/dist/esm/index-cad8203e.js +31 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/taro-ad-core.entry.js +1 -1
- package/dist/esm/taro-ad-custom-core.entry.js +1 -1
- package/dist/esm/taro-audio-core.entry.js +1 -1
- package/dist/esm/taro-block-core.entry.js +1 -1
- package/dist/esm/taro-button-core.entry.js +3 -3
- package/dist/esm/taro-camera-core.entry.js +1 -1
- package/dist/esm/taro-canvas-core.entry.js +2 -2
- package/dist/esm/taro-checkbox-core_2.entry.js +2 -2
- package/dist/esm/taro-components.js +3 -3
- package/dist/esm/taro-cover-image-core.entry.js +1 -1
- package/dist/esm/taro-cover-view-core.entry.js +2 -2
- package/dist/esm/taro-custom-wrapper-core.entry.js +1 -1
- package/dist/esm/taro-editor-core.entry.js +1 -1
- package/dist/esm/taro-form-core.entry.js +1 -1
- package/dist/esm/taro-functional-page-navigator-core.entry.js +1 -1
- package/dist/esm/taro-icon-core.entry.js +2 -2
- package/dist/esm/taro-image-core.entry.js +3 -3
- package/dist/esm/taro-input-core.entry.js +16 -19
- package/dist/esm/taro-keyboard-accessory-core.entry.js +1 -1
- package/dist/esm/taro-label-core.entry.js +1 -1
- package/dist/esm/taro-live-player-core.entry.js +1 -1
- package/dist/esm/taro-live-pusher-core.entry.js +1 -1
- package/dist/esm/taro-map-core.entry.js +1 -1
- package/dist/esm/taro-match-media-core.entry.js +1 -1
- package/dist/esm/taro-movable-area-core.entry.js +1 -1
- package/dist/esm/taro-movable-view-core.entry.js +1 -1
- package/dist/esm/taro-navigation-bar-core.entry.js +1 -1
- package/dist/esm/taro-navigator-core.entry.js +4 -4
- package/dist/esm/taro-official-account-core.entry.js +1 -1
- package/dist/esm/taro-open-data-core.entry.js +1 -1
- package/dist/esm/taro-page-container-core.entry.js +1 -1
- package/dist/esm/taro-page-meta-core.entry.js +1 -1
- package/dist/esm/taro-picker-core_2.entry.js +2 -2
- package/dist/esm/taro-picker-view-column-core.entry.js +80 -4
- package/dist/esm/taro-picker-view-core.entry.js +72 -3
- package/dist/esm/taro-progress-core.entry.js +1 -1
- package/dist/esm/taro-pull-to-refresh.entry.js +15 -5
- package/dist/esm/taro-radio-core_2.entry.js +1 -1
- package/dist/esm/taro-rich-text-core.entry.js +2 -2
- package/dist/esm/taro-scroll-view-core.entry.js +5 -13
- package/dist/esm/taro-share-element-core.entry.js +1 -1
- package/dist/esm/taro-slider-core.entry.js +1 -1
- package/dist/esm/taro-slot-core.entry.js +1 -1
- package/dist/esm/taro-swiper-core_2.entry.js +11 -14
- package/dist/esm/taro-switch-core.entry.js +1 -1
- package/dist/esm/taro-tabbar.entry.js +38 -38
- package/dist/esm/taro-text-core.entry.js +3 -3
- package/dist/esm/taro-textarea-core.entry.js +5 -3
- package/dist/esm/taro-video-control_3.entry.js +27867 -223
- package/dist/esm/taro-view-core.entry.js +5 -5
- package/dist/esm/taro-voip-room-core.entry.js +1 -1
- package/dist/esm/taro-web-view-core.entry.js +2 -2
- package/dist/esm-es5/index-1d8e8acd.js +7 -0
- package/dist/esm-es5/{index-5bd7cbab.js → index-26d8b479.js} +1 -1
- package/dist/esm-es5/index-cad8203e.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/taro-ad-core.entry.js +1 -1
- package/dist/esm-es5/taro-ad-custom-core.entry.js +1 -1
- package/dist/esm-es5/taro-audio-core.entry.js +1 -1
- package/dist/esm-es5/taro-block-core.entry.js +1 -1
- package/dist/esm-es5/taro-button-core.entry.js +1 -1
- package/dist/esm-es5/taro-camera-core.entry.js +1 -1
- package/dist/esm-es5/taro-canvas-core.entry.js +1 -1
- package/dist/esm-es5/taro-checkbox-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-components.js +1 -1
- package/dist/esm-es5/taro-cover-image-core.entry.js +1 -1
- package/dist/esm-es5/taro-cover-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-custom-wrapper-core.entry.js +1 -1
- package/dist/esm-es5/taro-editor-core.entry.js +1 -1
- package/dist/esm-es5/taro-form-core.entry.js +1 -1
- package/dist/esm-es5/taro-functional-page-navigator-core.entry.js +1 -1
- package/dist/esm-es5/taro-icon-core.entry.js +1 -1
- package/dist/esm-es5/taro-image-core.entry.js +1 -1
- package/dist/esm-es5/taro-input-core.entry.js +1 -1
- package/dist/esm-es5/taro-keyboard-accessory-core.entry.js +1 -1
- package/dist/esm-es5/taro-label-core.entry.js +1 -1
- package/dist/esm-es5/taro-live-player-core.entry.js +1 -1
- package/dist/esm-es5/taro-live-pusher-core.entry.js +1 -1
- package/dist/esm-es5/taro-map-core.entry.js +1 -1
- package/dist/esm-es5/taro-match-media-core.entry.js +1 -1
- package/dist/esm-es5/taro-movable-area-core.entry.js +1 -1
- package/dist/esm-es5/taro-movable-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-navigation-bar-core.entry.js +1 -1
- package/dist/esm-es5/taro-navigator-core.entry.js +1 -1
- package/dist/esm-es5/taro-official-account-core.entry.js +1 -1
- package/dist/esm-es5/taro-open-data-core.entry.js +1 -1
- package/dist/esm-es5/taro-page-container-core.entry.js +1 -1
- package/dist/esm-es5/taro-page-meta-core.entry.js +1 -1
- package/dist/esm-es5/taro-picker-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-picker-view-column-core.entry.js +1 -1
- package/dist/esm-es5/taro-picker-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-progress-core.entry.js +1 -1
- package/dist/esm-es5/taro-pull-to-refresh.entry.js +1 -1
- package/dist/esm-es5/taro-radio-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-rich-text-core.entry.js +1 -1
- package/dist/esm-es5/taro-scroll-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-share-element-core.entry.js +1 -1
- package/dist/esm-es5/taro-slider-core.entry.js +1 -1
- package/dist/esm-es5/taro-slot-core.entry.js +1 -1
- package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-switch-core.entry.js +1 -1
- package/dist/esm-es5/taro-tabbar.entry.js +1 -1
- package/dist/esm-es5/taro-text-core.entry.js +1 -1
- package/dist/esm-es5/taro-textarea-core.entry.js +1 -1
- package/dist/esm-es5/taro-video-control_3.entry.js +365 -1
- package/dist/esm-es5/taro-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-voip-room-core.entry.js +1 -1
- package/dist/esm-es5/taro-web-view-core.entry.js +1 -1
- package/dist/taro-components/p-019591c8.system.entry.js +1 -0
- package/dist/taro-components/{p-8db237e0.entry.js → p-060858b1.entry.js} +1 -1
- package/dist/taro-components/{p-964692f7.system.entry.js → p-06e3d685.system.entry.js} +1 -1
- package/dist/taro-components/p-0996daee.entry.js +1 -0
- package/dist/taro-components/{p-94502fc3.entry.js → p-0ca42006.entry.js} +1 -1
- package/dist/taro-components/{p-3633bb84.entry.js → p-0d0b3677.entry.js} +1 -1
- package/dist/taro-components/{p-336f2b2a.system.entry.js → p-0d1e0e91.system.entry.js} +1 -1
- package/dist/taro-components/p-0ea13d67.system.entry.js +1 -0
- package/dist/taro-components/{p-cdffee54.system.entry.js → p-12deba0b.system.entry.js} +1 -1
- package/dist/taro-components/p-133e3ac4.entry.js +1 -0
- package/dist/taro-components/{p-5f8b5f62.entry.js → p-16aff829.entry.js} +1 -1
- package/dist/taro-components/{p-14dbbb42.entry.js → p-16c1e564.entry.js} +1 -1
- package/dist/taro-components/{p-0c2982fc.system.entry.js → p-178a3adf.system.entry.js} +1 -1
- package/dist/taro-components/p-1c0ebbd5.entry.js +1 -0
- package/dist/taro-components/p-1e0406ec.system.entry.js +1 -0
- package/dist/taro-components/p-1e516bd0.entry.js +1 -0
- package/dist/taro-components/p-2241b671.system.js +1 -0
- package/dist/taro-components/p-26e9ce75.entry.js +1 -0
- package/dist/taro-components/{p-98b47fc9.system.entry.js → p-2887213d.system.entry.js} +1 -1
- package/dist/taro-components/{p-3334ac67.system.entry.js → p-29b7c721.system.entry.js} +1 -1
- package/dist/taro-components/p-29bb3ebe.entry.js +1 -0
- package/dist/taro-components/{p-fdd73355.system.entry.js → p-2bd2ea9a.system.entry.js} +1 -1
- package/dist/taro-components/{p-e03fa2d5.system.entry.js → p-2e8a1479.system.entry.js} +1 -1
- package/dist/taro-components/{p-9a618935.system.entry.js → p-36f2c1e1.system.entry.js} +1 -1
- package/dist/taro-components/{p-fd8312e5.system.entry.js → p-372f53d8.system.entry.js} +1 -1
- package/dist/taro-components/p-38d7c2e8.system.entry.js +1 -0
- package/dist/taro-components/{p-cfbdd4e3.system.entry.js → p-3b801a38.system.entry.js} +1 -1
- package/dist/taro-components/p-3b85bb4b.system.entry.js +1 -0
- package/dist/taro-components/{p-59d38db0.entry.js → p-3bb72c08.entry.js} +1 -1
- package/dist/taro-components/{p-15bea37d.entry.js → p-3d3cd72f.entry.js} +1 -1
- package/dist/taro-components/p-4339ad63.system.entry.js +1 -0
- package/dist/taro-components/p-44a199e4.entry.js +1 -0
- package/dist/taro-components/{p-cfbfeee8.entry.js → p-45e6f8be.entry.js} +1 -1
- package/dist/taro-components/p-46b7f84e.entry.js +1 -0
- package/dist/taro-components/p-4793e6ba.system.entry.js +1 -0
- package/dist/taro-components/{p-74540410.entry.js → p-4c890c5d.entry.js} +1 -1
- package/dist/taro-components/p-53244eac.entry.js +1 -0
- package/dist/taro-components/p-5746d7ce.js +1 -0
- package/dist/taro-components/{p-1b790eb0.system.entry.js → p-5c2497a4.system.entry.js} +1 -1
- package/dist/taro-components/{p-df5a19b0.system.entry.js → p-5ff0e954.system.entry.js} +1 -1
- package/dist/taro-components/p-61f225ef.system.js +7 -0
- package/dist/taro-components/p-62608b28.system.entry.js +1 -0
- package/dist/taro-components/{p-0303f9e0.entry.js → p-62c64770.entry.js} +1 -1
- package/dist/taro-components/p-663d1bb9.system.js +1 -0
- package/dist/taro-components/{p-bd3fa355.system.entry.js → p-66b1d5f9.system.entry.js} +1 -1
- package/dist/taro-components/p-671defcd.entry.js +1 -0
- package/dist/taro-components/p-6f2f468b.entry.js +1 -0
- package/dist/taro-components/p-70313eed.entry.js +1 -0
- package/dist/taro-components/{p-b87cf623.entry.js → p-74013ace.entry.js} +1 -1
- package/dist/taro-components/{p-264b7229.system.entry.js → p-756d56d1.system.entry.js} +1 -1
- package/dist/taro-components/{p-fe156231.system.entry.js → p-75811f84.system.entry.js} +1 -1
- package/dist/taro-components/p-761d1085.entry.js +1 -0
- package/dist/taro-components/p-76724e58.js +7 -0
- package/dist/taro-components/{p-1e4f1702.system.entry.js → p-78676120.system.entry.js} +1 -1
- package/dist/taro-components/p-79b16736.system.entry.js +1 -0
- package/dist/taro-components/p-7b2049b7.entry.js +1 -0
- package/dist/taro-components/p-7dc268ee.entry.js +1 -0
- package/dist/taro-components/p-7f7aa688.entry.js +1 -0
- package/dist/taro-components/p-80abb865.entry.js +1 -0
- package/dist/taro-components/{p-55b0a30b.entry.js → p-81976128.entry.js} +1 -1
- package/dist/taro-components/p-81dc5b7b.entry.js +1 -0
- package/dist/taro-components/{p-99cb65a6.system.entry.js → p-828efe43.system.entry.js} +1 -1
- package/dist/taro-components/{p-7cdad34e.system.entry.js → p-831ebd02.system.entry.js} +1 -1
- package/dist/taro-components/{p-0ee69803.entry.js → p-832cc63a.entry.js} +1 -1
- package/dist/taro-components/{p-b2d01686.system.js → p-83adb645.system.js} +1 -1
- package/dist/taro-components/p-841a2031.system.entry.js +365 -0
- package/dist/taro-components/{p-b6d6c744.entry.js → p-86205110.entry.js} +1 -1
- package/dist/taro-components/{p-703dfad8.system.entry.js → p-8b23a081.system.entry.js} +1 -1
- package/dist/taro-components/{p-ffe63ce9.system.entry.js → p-8b30e18c.system.entry.js} +1 -1
- package/dist/taro-components/p-8ba35b31.system.entry.js +1 -0
- package/dist/taro-components/p-8ead6b19.entry.js +1 -0
- package/dist/taro-components/{p-ebf5b2eb.system.entry.js → p-8f466248.system.entry.js} +1 -1
- package/dist/taro-components/{p-cea9a198.system.entry.js → p-9130dfca.system.entry.js} +1 -1
- package/dist/taro-components/{p-8a5e67cb.entry.js → p-9151ef65.entry.js} +1 -1
- package/dist/taro-components/p-917830b4.system.entry.js +1 -0
- package/dist/taro-components/p-95e51d62.entry.js +1 -0
- package/dist/taro-components/p-9961074d.entry.js +1 -0
- package/dist/taro-components/{p-3643d8f7.system.entry.js → p-9b90554b.system.entry.js} +1 -1
- package/dist/taro-components/{p-06af26db.system.entry.js → p-9ce624a4.system.entry.js} +1 -1
- package/dist/taro-components/p-a097985b.entry.js +1 -0
- package/dist/taro-components/{p-7423fc3b.system.entry.js → p-a36bfe97.system.entry.js} +1 -1
- package/dist/taro-components/p-a4721ae0.js +1 -0
- package/dist/taro-components/{p-e6298500.entry.js → p-a74f4c26.entry.js} +1 -1
- package/dist/taro-components/{p-7d848382.system.entry.js → p-a838e0f7.system.entry.js} +1 -1
- package/dist/taro-components/p-a84098b5.system.entry.js +1 -0
- package/dist/taro-components/{p-8b2bf902.system.entry.js → p-a90bfe9d.system.entry.js} +1 -1
- package/dist/taro-components/{p-e2f6448d.system.entry.js → p-a9ab6434.system.entry.js} +1 -1
- package/dist/taro-components/{p-99ed3ed2.system.entry.js → p-ac398961.system.entry.js} +1 -1
- package/dist/taro-components/{p-4dbed323.entry.js → p-ac56ffed.entry.js} +1 -1
- package/dist/taro-components/{p-fc4939c6.system.entry.js → p-baa5019a.system.entry.js} +1 -1
- package/dist/taro-components/{p-fb0959c1.system.entry.js → p-c1458fbe.system.entry.js} +1 -1
- package/dist/taro-components/p-c7dd3c92.entry.js +1 -0
- package/dist/taro-components/p-c9b73495.entry.js +1 -0
- package/dist/taro-components/{p-8f90fca9.system.entry.js → p-ca7ad427.system.entry.js} +1 -1
- package/dist/taro-components/{p-8bc82aaa.entry.js → p-ce0489a6.entry.js} +1 -1
- package/dist/taro-components/{p-9d0ab7c4.entry.js → p-ce46f79d.entry.js} +1 -1
- package/dist/taro-components/{p-2d2f8064.entry.js → p-cfebd931.entry.js} +1 -1
- package/dist/taro-components/p-d2b6b891.entry.js +1 -0
- package/dist/taro-components/{p-9fc88fc1.system.entry.js → p-d56c45bf.system.entry.js} +1 -1
- package/dist/taro-components/{p-06bffead.entry.js → p-d636e22e.entry.js} +1 -1
- package/dist/taro-components/{p-b75d8a65.entry.js → p-d6c8f31d.entry.js} +1 -1
- package/dist/taro-components/p-d7e13592.entry.js +365 -0
- package/dist/taro-components/{p-0472e474.system.entry.js → p-de573939.system.entry.js} +1 -1
- package/dist/taro-components/p-e01af6c8.entry.js +1 -0
- package/dist/taro-components/{p-865c21b5.entry.js → p-e7dcb4d5.entry.js} +1 -1
- package/dist/taro-components/{p-527a38ee.system.entry.js → p-ec59899b.system.entry.js} +1 -1
- package/dist/taro-components/{p-d1c2481c.system.entry.js → p-f1da4ed7.system.entry.js} +1 -1
- package/dist/taro-components/p-fc226017.entry.js +1 -0
- package/dist/taro-components/{p-17039974.system.entry.js → p-fe252a81.system.entry.js} +1 -1
- package/dist/taro-components/taro-components.css +1 -1
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/taro-components/taro-components.js +1 -1
- package/dist/types/components/image/image.d.ts +1 -1
- package/dist/types/components/input/input.d.ts +0 -3
- package/dist/types/components/picker-view/picker-view-column.d.ts +15 -1
- package/dist/types/components/picker-view/picker-view.d.ts +24 -0
- package/dist/types/components/scroll-view/scroll-view.d.ts +1 -1
- package/dist/types/components/swiper/swiper.d.ts +2 -2
- package/dist/types/components/tabbar/tabbar.d.ts +3 -2
- package/dist/types/components/video/utils.d.ts +6 -0
- package/dist/types/components/video/video-control.d.ts +2 -2
- package/dist/types/components.d.ts +22 -0
- package/dist/types/home/runner/work/taro/taro/packages/taro-components/.stencil/types/props.d.ts +62 -0
- package/dist/types/props.js +1 -0
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/dist/types/utils/index.d.ts +4 -8
- package/dist/types/utils/style.d.ts +1 -0
- package/dist/types/utils/url.d.ts +6 -0
- package/dist-h5/react/components/index.js +63 -0
- package/dist-h5/react/components/input.js +2 -2
- package/dist-h5/react/index.js +1 -46
- package/dist-h5/react/utils/reactify-wc.js +8 -5
- package/dist-h5/vue/components/index.js +60 -0
- package/dist-h5/vue/components/picker.js +2 -2
- package/dist-h5/vue/components/scroll-view.js +2 -2
- package/dist-h5/vue/createFormsComponent.js +2 -2
- package/dist-h5/vue/index.js +23 -26
- package/dist-h5/vue/mixins/listeners.js +2 -2
- package/dist-h5/vue3/components/icon.js +3 -0
- package/dist-h5/vue3/components/image.js +3 -0
- package/dist-h5/vue3/components/index.js +64 -0
- package/dist-h5/vue3/components/scroll-view.js +3 -0
- package/dist-h5/vue3/components/text.js +3 -0
- package/dist-h5/vue3/createComponent.js +3 -0
- package/dist-h5/vue3/createFormsComponent.js +6 -3
- package/dist-h5/vue3/forwardRef.js +11 -0
- package/dist-h5/vue3/index.js +12 -29
- package/package.json +26 -10
- package/types/Ad.d.ts +15 -15
- package/types/Audio.d.ts +3 -3
- package/types/Block.d.ts +5 -2
- package/types/Button.d.ts +49 -33
- package/types/Camera.d.ts +20 -20
- package/types/Canvas.d.ts +1 -1
- package/types/Checkbox.d.ts +5 -5
- package/types/CheckboxGroup.d.ts +4 -4
- package/types/CoverImage.d.ts +1 -1
- package/types/CoverView.d.ts +1 -1
- package/types/CustomWrapper.d.ts +2 -2
- package/types/Editor.d.ts +10 -10
- package/types/Form.d.ts +8 -8
- package/types/FunctionalPageNavigator.d.ts +4 -4
- package/types/Image.d.ts +2 -2
- package/types/Input.d.ts +41 -37
- package/types/KeyboardAccessory.d.ts +21 -8
- package/types/Label.d.ts +2 -2
- package/types/LivePlayer.d.ts +18 -18
- package/types/LivePusher.d.ts +14 -14
- package/types/Map.d.ts +33 -33
- package/types/MovableArea.d.ts +1 -1
- package/types/MovableView.d.ts +18 -18
- package/types/Navigator.d.ts +7 -7
- package/types/OfficialAccount.d.ts +7 -7
- package/types/OpenData.d.ts +10 -10
- package/types/PageContainer.d.ts +22 -22
- package/types/Picker.d.ts +5 -5
- package/types/PickerViewColumn.d.ts +5 -3
- package/types/Progress.d.ts +1 -1
- package/types/Radio.d.ts +6 -6
- package/types/RadioGroup.d.ts +2 -2
- package/types/RichText.d.ts +7 -2
- package/types/ScrollView.d.ts +9 -9
- package/types/ShareElement.d.ts +196 -3
- package/types/Slider.d.ts +1 -1
- package/types/Slot.d.ts +2 -2
- package/types/Swiper.d.ts +7 -7
- package/types/Switch.d.ts +3 -3
- package/types/Text.d.ts +2 -2
- package/types/Textarea.d.ts +21 -21
- package/types/Video.d.ts +23 -23
- package/types/View.d.ts +2 -2
- package/types/VoipRoom.d.ts +5 -5
- package/types/WebView.d.ts +6 -6
- package/types/common.d.ts +4 -2
- package/types/index.d.ts +53 -52
- package/types/index.vue3.d.ts +157 -0
- package/types/props.ts +72 -0
- package/virtual-list/memoize.js +1 -0
- package/virtual-list/react/createListComponent.js +4 -3
- package/virtual-list/react/index.js +2 -1
- package/virtual-list/timer.js +1 -1
- package/virtual-list/vue/index.js +1 -1
- package/vue3.d.ts +3 -0
- package/LICENSE +0 -21
- package/dist/esm-es5/index-3c78bcaf.js +0 -7
- package/dist/taro-components/p-04818461.system.entry.js +0 -1
- package/dist/taro-components/p-065ec61d.entry.js +0 -1
- package/dist/taro-components/p-11932905.entry.js +0 -1
- package/dist/taro-components/p-17cf8b5b.entry.js +0 -1
- package/dist/taro-components/p-2dc57c71.system.entry.js +0 -1
- package/dist/taro-components/p-32937866.entry.js +0 -1
- package/dist/taro-components/p-33ee636a.system.js +0 -1
- package/dist/taro-components/p-37cfdd8f.js +0 -7
- package/dist/taro-components/p-3c0230ba.entry.js +0 -1
- package/dist/taro-components/p-3dfb1807.entry.js +0 -1
- package/dist/taro-components/p-431197bc.entry.js +0 -1
- package/dist/taro-components/p-43de2f12.system.entry.js +0 -1
- package/dist/taro-components/p-50066d5e.system.entry.js +0 -1
- package/dist/taro-components/p-554e1039.entry.js +0 -1
- package/dist/taro-components/p-56618f09.entry.js +0 -1
- package/dist/taro-components/p-5c420456.entry.js +0 -1
- package/dist/taro-components/p-63ff7fa7.entry.js +0 -1
- package/dist/taro-components/p-7721e046.entry.js +0 -1
- package/dist/taro-components/p-83dedaa2.entry.js +0 -1
- package/dist/taro-components/p-92e95d3f.entry.js +0 -1
- package/dist/taro-components/p-94c20f60.system.js +0 -7
- package/dist/taro-components/p-95529dc0.entry.js +0 -1
- package/dist/taro-components/p-9dc9c615.system.entry.js +0 -1
- package/dist/taro-components/p-9eb7dfa8.entry.js +0 -1
- package/dist/taro-components/p-a1423df9.entry.js +0 -1
- package/dist/taro-components/p-abe415b4.system.entry.js +0 -1
- package/dist/taro-components/p-b15d0302.system.entry.js +0 -1
- package/dist/taro-components/p-b55fedc1.entry.js +0 -1
- package/dist/taro-components/p-b9280444.entry.js +0 -1
- package/dist/taro-components/p-c218c298.entry.js +0 -1
- package/dist/taro-components/p-c362734b.entry.js +0 -1
- package/dist/taro-components/p-cb395e7d.entry.js +0 -1
- package/dist/taro-components/p-cc818a13.entry.js +0 -1
- package/dist/taro-components/p-cf55a63c.entry.js +0 -1
- package/dist/taro-components/p-d394a61f.system.entry.js +0 -1
- package/dist/taro-components/p-d567b95e.entry.js +0 -1
- package/dist/taro-components/p-d5971476.entry.js +0 -1
- package/dist/taro-components/p-e0af1d0d.system.entry.js +0 -1
- package/dist/taro-components/p-e1040131.entry.js +0 -1
- package/dist/taro-components/p-e27798a4.entry.js +0 -1
- package/dist/taro-components/p-f05e1558.js +0 -1
- package/dist/taro-components/p-fb2252b7.system.entry.js +0 -1
- package/dist/taro-components/p-fcc1c676.system.entry.js +0 -1
- package/dist/taro-components/p-fd0d1168.system.entry.js +0 -1
- package/dist/taro-components/p-fde3a009.system.entry.js +0 -1
- package/dist-h5/vue/simpleComponents.js +0 -19
|
@@ -1,109 +1,95 @@
|
|
|
1
|
-
export const formatTime = time => {
|
|
2
|
-
if (time
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export const calcDist = (x, y) => {
|
|
9
|
-
return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
'
|
|
38
|
-
'
|
|
39
|
-
'
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
'
|
|
46
|
-
'
|
|
47
|
-
'
|
|
48
|
-
'
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
'
|
|
54
|
-
'
|
|
55
|
-
'
|
|
56
|
-
'
|
|
57
|
-
'
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
]
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
if (!ret[fnMap[0][0]]) {
|
|
98
|
-
// when there is no any APIs be set.
|
|
99
|
-
|
|
100
|
-
// In IOS, there is no 'webkitEnterFullscreen' property `in document` but video can use it for fullscreen.
|
|
101
|
-
// ref: https://developer.apple.com/documentation/webkitjs/htmlvideoelement/1633500-webkitenterfullscreen
|
|
102
|
-
for (i = 0; i < defaultIOSMap.length; i++) {
|
|
103
|
-
ret[fnMap[0][i]] = defaultIOSMap[i]
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
// If it doesn't find any of them, this whole function returns {}
|
|
107
|
-
// and the fn variable is set to this returned value.
|
|
108
|
-
return ret
|
|
109
|
-
})()
|
|
1
|
+
export const formatTime = (time) => {
|
|
2
|
+
if (!time)
|
|
3
|
+
return '';
|
|
4
|
+
const sec = Math.round(time % 60);
|
|
5
|
+
const min = Math.round((time - sec) / 60);
|
|
6
|
+
return `${min < 10 ? `0${min}` : min}:${sec < 10 ? `0${sec}` : sec}`;
|
|
7
|
+
};
|
|
8
|
+
export const calcDist = (x, y) => {
|
|
9
|
+
return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));
|
|
10
|
+
};
|
|
11
|
+
export const normalizeNumber = (number) => {
|
|
12
|
+
return Math.max(-1, Math.min(number, 1));
|
|
13
|
+
};
|
|
14
|
+
export let scene = 'default';
|
|
15
|
+
export const screenFn = (function () {
|
|
16
|
+
let val;
|
|
17
|
+
const fnMap = [
|
|
18
|
+
[
|
|
19
|
+
'requestFullscreen',
|
|
20
|
+
'exitFullscreen',
|
|
21
|
+
'fullscreenElement',
|
|
22
|
+
'fullscreenEnabled',
|
|
23
|
+
'fullscreenchange',
|
|
24
|
+
'fullscreenerror'
|
|
25
|
+
],
|
|
26
|
+
// New WebKit
|
|
27
|
+
[
|
|
28
|
+
'webkitRequestFullscreen',
|
|
29
|
+
'webkitExitFullscreen',
|
|
30
|
+
'webkitFullscreenElement',
|
|
31
|
+
'webkitFullscreenEnabled',
|
|
32
|
+
'webkitfullscreenchange',
|
|
33
|
+
'webkitfullscreenerror'
|
|
34
|
+
],
|
|
35
|
+
// Old WebKit
|
|
36
|
+
[
|
|
37
|
+
'webkitRequestFullScreen',
|
|
38
|
+
'webkitCancelFullScreen',
|
|
39
|
+
'webkitCurrentFullScreenElement',
|
|
40
|
+
'webkitCancelFullScreen',
|
|
41
|
+
'webkitfullscreenchange',
|
|
42
|
+
'webkitfullscreenerror'
|
|
43
|
+
],
|
|
44
|
+
[
|
|
45
|
+
'mozRequestFullScreen',
|
|
46
|
+
'mozCancelFullScreen',
|
|
47
|
+
'mozFullScreenElement',
|
|
48
|
+
'mozFullScreenEnabled',
|
|
49
|
+
'mozfullscreenchange',
|
|
50
|
+
'mozfullscreenerror'
|
|
51
|
+
],
|
|
52
|
+
[
|
|
53
|
+
'msRequestFullscreen',
|
|
54
|
+
'msExitFullscreen',
|
|
55
|
+
'msFullscreenElement',
|
|
56
|
+
'msFullscreenEnabled',
|
|
57
|
+
'MSFullscreenChange',
|
|
58
|
+
'MSFullscreenError'
|
|
59
|
+
]
|
|
60
|
+
];
|
|
61
|
+
var defaultIOSMap = [
|
|
62
|
+
'webkitEnterFullscreen',
|
|
63
|
+
'webkitExitFullscreen',
|
|
64
|
+
'webkitCurrentFullScreenElement',
|
|
65
|
+
'webkitSupportsFullscreen',
|
|
66
|
+
'fullscreenchange',
|
|
67
|
+
'fullscreenerror'
|
|
68
|
+
];
|
|
69
|
+
let i = 0;
|
|
70
|
+
const l = fnMap.length;
|
|
71
|
+
const ret = {};
|
|
72
|
+
// This for loop essentially checks the current document object for the property/methods above.
|
|
73
|
+
for (; i < l; i++) {
|
|
74
|
+
val = fnMap[i];
|
|
75
|
+
if (val && val[1] in document) {
|
|
76
|
+
for (i = 0; i < val.length; i++) {
|
|
77
|
+
ret[fnMap[0][i]] = val[i];
|
|
78
|
+
}
|
|
79
|
+
return ret;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (!ret[fnMap[0][0]]) {
|
|
83
|
+
scene = 'iOS';
|
|
84
|
+
// when there is no any APIs be set.
|
|
85
|
+
// In IOS, there is no 'webkitEnterFullscreen' property `in document` but video can use it for fullscreen.
|
|
86
|
+
// ref: https://developer.apple.com/documentation/webkitjs/htmlvideoelement/1633500-webkitenterfullscreen
|
|
87
|
+
for (i = 0; i < defaultIOSMap.length; i++) {
|
|
88
|
+
ret[fnMap[0][i]] = defaultIOSMap[i];
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
// If it doesn't find any of them, this whole function returns {}
|
|
92
|
+
// and the fn variable is set to this returned value.
|
|
93
|
+
return ret;
|
|
94
|
+
})();
|
|
95
|
+
export const isHls = url => /\.(m3u8)($|\?)/i.test(url);
|
|
@@ -15,15 +15,15 @@ export class VideoControl {
|
|
|
15
15
|
this.visible = false;
|
|
16
16
|
this.isDraggingProgressBall = false;
|
|
17
17
|
this.percentage = 0;
|
|
18
|
-
this.
|
|
18
|
+
this.progressDimensions = {
|
|
19
19
|
left: 0,
|
|
20
20
|
width: 0
|
|
21
21
|
};
|
|
22
22
|
this.calcPercentage = (pageX) => {
|
|
23
|
-
let pos = pageX - this.
|
|
23
|
+
let pos = pageX - this.progressDimensions.left;
|
|
24
24
|
pos = Math.max(pos, 0);
|
|
25
|
-
pos = Math.min(pos, this.
|
|
26
|
-
return pos / this.
|
|
25
|
+
pos = Math.min(pos, this.progressDimensions.width);
|
|
26
|
+
return pos / this.progressDimensions.width;
|
|
27
27
|
};
|
|
28
28
|
this.onDragProgressBallStart = () => {
|
|
29
29
|
this.isDraggingProgressBall = true;
|
|
@@ -68,10 +68,10 @@ export class VideoControl {
|
|
|
68
68
|
this.toggleVisibility(false);
|
|
69
69
|
}, 2000);
|
|
70
70
|
}
|
|
71
|
-
this.
|
|
71
|
+
this.el.style.visibility = 'visible';
|
|
72
72
|
}
|
|
73
73
|
else {
|
|
74
|
-
this.
|
|
74
|
+
this.el.style.visibility = 'hidden';
|
|
75
75
|
}
|
|
76
76
|
this.visible = !!visible;
|
|
77
77
|
});
|
|
@@ -108,8 +108,8 @@ export class VideoControl {
|
|
|
108
108
|
if (!ref)
|
|
109
109
|
return;
|
|
110
110
|
const rect = ref.getBoundingClientRect();
|
|
111
|
-
this.
|
|
112
|
-
this.
|
|
111
|
+
this.progressDimensions.left = rect.left;
|
|
112
|
+
this.progressDimensions.width = rect.width;
|
|
113
113
|
} },
|
|
114
114
|
h("div", { class: 'taro-video-progress-buffered', style: { width: '100%' } }),
|
|
115
115
|
h("div", { class: 'taro-video-ball', ref: dom => (this.progressBallRef = dom), onTouchStart: this.onDragProgressBallStart, style: {
|
|
@@ -344,7 +344,7 @@ export class VideoControl {
|
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
}; }
|
|
347
|
-
static get elementRef() { return "
|
|
347
|
+
static get elementRef() { return "el"; }
|
|
348
348
|
static get listeners() { return [{
|
|
349
349
|
"name": "touchmove",
|
|
350
350
|
"method": "onDocumentTouchMove",
|
|
@@ -10,7 +10,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11
11
|
import { Component, h, Prop, State, Event, Host, Watch, Listen, Element, Method } from '@stencil/core';
|
|
12
12
|
import classNames from 'classnames';
|
|
13
|
-
import
|
|
13
|
+
import Hls from 'hls.js';
|
|
14
|
+
import { throttle } from '../../utils';
|
|
15
|
+
import { formatTime, calcDist, normalizeNumber, screenFn, isHls, scene } from './utils';
|
|
14
16
|
export class Video {
|
|
15
17
|
constructor() {
|
|
16
18
|
this.currentTime = 0;
|
|
@@ -91,7 +93,7 @@ export class Video {
|
|
|
91
93
|
this.isFullScreen = false;
|
|
92
94
|
this.fullScreenTimestamp = new Date().getTime();
|
|
93
95
|
this.isMute = false;
|
|
94
|
-
this.
|
|
96
|
+
this.analyzeGesture = (e) => {
|
|
95
97
|
var _a;
|
|
96
98
|
const obj = {
|
|
97
99
|
type: 'none'
|
|
@@ -133,6 +135,37 @@ export class Video {
|
|
|
133
135
|
obj.dataY = normalizeNumber(distY / 200);
|
|
134
136
|
return obj;
|
|
135
137
|
};
|
|
138
|
+
this.loadNativePlayer = () => {
|
|
139
|
+
if (this.videoRef) {
|
|
140
|
+
this.videoRef.src = this.src;
|
|
141
|
+
this.videoRef.load();
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
this.init = () => {
|
|
145
|
+
const { src, videoRef } = this;
|
|
146
|
+
if (isHls(src)) {
|
|
147
|
+
if (Hls.isSupported()) {
|
|
148
|
+
if (this.hls) {
|
|
149
|
+
this.hls.destroy();
|
|
150
|
+
}
|
|
151
|
+
this.hls = new Hls();
|
|
152
|
+
this.hls.loadSource(src);
|
|
153
|
+
this.hls.attachMedia(videoRef);
|
|
154
|
+
this.hls.on(Hls.Events.MANIFEST_PARSED, () => {
|
|
155
|
+
this.autoplay && this.play();
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
else if (videoRef.canPlayType('application/vnd.apple.mpegurl')) {
|
|
159
|
+
this.loadNativePlayer();
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
console.error('该浏览器不支持 HLS 播放');
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
this.loadNativePlayer();
|
|
167
|
+
}
|
|
168
|
+
};
|
|
136
169
|
this.handlePlay = () => {
|
|
137
170
|
this.isPlaying = true;
|
|
138
171
|
this.isFirst = false;
|
|
@@ -229,7 +262,7 @@ export class Video {
|
|
|
229
262
|
}
|
|
230
263
|
};
|
|
231
264
|
this.toggleFullScreen = (isFullScreen = !this.isFullScreen) => {
|
|
232
|
-
this.isFullScreen = isFullScreen;
|
|
265
|
+
this.isFullScreen = isFullScreen; // this.videoRef?.['webkitDisplayingFullscreen']
|
|
233
266
|
this.controlsRef.toggleVisibility(true);
|
|
234
267
|
this.fullScreenTimestamp = new Date().getTime();
|
|
235
268
|
this.onFullScreenChange.emit({
|
|
@@ -238,7 +271,7 @@ export class Video {
|
|
|
238
271
|
});
|
|
239
272
|
if (this.isFullScreen && !document[screenFn.fullscreenElement]) {
|
|
240
273
|
setTimeout(() => {
|
|
241
|
-
this.videoRef[screenFn.requestFullscreen]({ navigationUI: '
|
|
274
|
+
this.videoRef[screenFn.requestFullscreen]({ navigationUI: 'auto' });
|
|
242
275
|
}, 0);
|
|
243
276
|
}
|
|
244
277
|
};
|
|
@@ -258,6 +291,7 @@ export class Video {
|
|
|
258
291
|
this._enableDanmu = this.enableDanmu;
|
|
259
292
|
}
|
|
260
293
|
componentDidLoad() {
|
|
294
|
+
this.init();
|
|
261
295
|
if (this.initialTime) {
|
|
262
296
|
this.videoRef.currentTime = this.initialTime;
|
|
263
297
|
}
|
|
@@ -266,6 +300,10 @@ export class Video {
|
|
|
266
300
|
if (document.addEventListener) {
|
|
267
301
|
document.addEventListener(screenFn.fullscreenchange, this.handleFullScreenChange);
|
|
268
302
|
}
|
|
303
|
+
if (this.videoRef && scene === 'iOS') {
|
|
304
|
+
// NOTE: iOS 场景下 fullscreenchange 并不会在退出全屏状态下触发,仅 webkitpresentationmodechanged 与 webkitendfullscreen 可替代
|
|
305
|
+
this.videoRef.addEventListener('webkitendfullscreen', this.handleFullScreenChange);
|
|
306
|
+
}
|
|
269
307
|
}
|
|
270
308
|
componentDidRender() {
|
|
271
309
|
}
|
|
@@ -273,17 +311,23 @@ export class Video {
|
|
|
273
311
|
if (document.removeEventListener) {
|
|
274
312
|
document.removeEventListener(screenFn.fullscreenchange, this.handleFullScreenChange);
|
|
275
313
|
}
|
|
314
|
+
if (this.videoRef && scene === 'iOS') {
|
|
315
|
+
this.videoRef.removeEventListener('webkitendfullscreen', this.handleFullScreenChange);
|
|
316
|
+
}
|
|
276
317
|
}
|
|
277
318
|
watchEnableDanmu(newVal) {
|
|
278
319
|
this._enableDanmu = newVal;
|
|
279
320
|
}
|
|
321
|
+
watchSrc() {
|
|
322
|
+
this.init();
|
|
323
|
+
}
|
|
280
324
|
onDocumentTouchMove(e) {
|
|
281
325
|
return __awaiter(this, void 0, void 0, function* () {
|
|
282
326
|
if (this.lastTouchScreenX === undefined || this.lastTouchScreenY === undefined)
|
|
283
327
|
return;
|
|
284
328
|
if (yield this.controlsRef.getIsDraggingProgressBall())
|
|
285
329
|
return;
|
|
286
|
-
const gestureObj = this.
|
|
330
|
+
const gestureObj = this.analyzeGesture(e);
|
|
287
331
|
if (gestureObj.type === 'adjustVolume') {
|
|
288
332
|
this.toastVolumeRef.style.visibility = 'visible';
|
|
289
333
|
const nextVolume = Math.max(Math.min(this.lastVolume - gestureObj.dataY, 1), 0);
|
|
@@ -356,8 +400,9 @@ export class Video {
|
|
|
356
400
|
});
|
|
357
401
|
}
|
|
358
402
|
render() {
|
|
359
|
-
const {
|
|
360
|
-
const
|
|
403
|
+
const { controls, autoplay, loop, muted, poster, objectFit, isFirst, isMute, isFullScreen, showCenterPlayBtn, isPlaying, _enableDanmu, showMuteBtn, danmuBtn, showFullscreenBtn, nativeProps } = this;
|
|
404
|
+
const duration = this.duration || this._duration;
|
|
405
|
+
const durationTime = formatTime(duration);
|
|
361
406
|
return (h(Host, { class: classNames('taro-video-container', {
|
|
362
407
|
'taro-video-type-fullscreen': isFullScreen
|
|
363
408
|
}), onTouchStart: this.onTouchStartContainer, onClick: this.onClickContainer },
|
|
@@ -367,7 +412,7 @@ export class Video {
|
|
|
367
412
|
if (dom) {
|
|
368
413
|
this.videoRef = dom;
|
|
369
414
|
}
|
|
370
|
-
},
|
|
415
|
+
}, autoplay: autoplay, loop: loop, muted: muted, poster: controls ? poster : undefined, playsinline: true, "webkit-playsinline": true, onPlay: this.handlePlay, onPause: this.handlePause, onEnded: this.handleEnded, onTimeUpdate: this.handleTimeUpdate, onError: this.handleError, onDurationChange: this.handleDurationChange, onProgress: this.handleProgress, onLoadedMetaData: this.handleLoadedMetaData }, nativeProps), "\u6682\u65F6\u4E0D\u652F\u6301\u64AD\u653E\u8BE5\u89C6\u9891"),
|
|
371
416
|
h("taro-video-danmu", { ref: dom => {
|
|
372
417
|
if (dom) {
|
|
373
418
|
this.danmuRef = dom;
|
|
@@ -380,7 +425,7 @@ export class Video {
|
|
|
380
425
|
if (dom) {
|
|
381
426
|
this.controlsRef = dom;
|
|
382
427
|
}
|
|
383
|
-
}, controls: controls, currentTime: this.currentTime, duration:
|
|
428
|
+
}, controls: controls, currentTime: this.currentTime, duration: duration, isPlaying: this.isPlaying, pauseFunc: this._pause, playFunc: this._play, seekFunc: this._seek, showPlayBtn: this.showPlayBtn, showProgress: this.showProgress },
|
|
384
429
|
showMuteBtn && (h("div", { class: classNames('taro-video-mute', {
|
|
385
430
|
'taro-video-type-mute': isMute
|
|
386
431
|
}), onClick: this.toggleMute })),
|
|
@@ -1047,6 +1092,9 @@ export class Video {
|
|
|
1047
1092
|
static get watchers() { return [{
|
|
1048
1093
|
"propName": "enableDanmu",
|
|
1049
1094
|
"methodName": "watchEnableDanmu"
|
|
1095
|
+
}, {
|
|
1096
|
+
"propName": "src",
|
|
1097
|
+
"methodName": "watchSrc"
|
|
1050
1098
|
}]; }
|
|
1051
1099
|
static get listeners() { return [{
|
|
1052
1100
|
"name": "touchmove",
|
|
@@ -43,8 +43,8 @@ export class View {
|
|
|
43
43
|
componentDidRender() {
|
|
44
44
|
const el = this.el;
|
|
45
45
|
el.childNodes.forEach(item => {
|
|
46
|
-
if (item.nodeType === document.COMMENT_NODE)
|
|
47
|
-
|
|
46
|
+
if (item.nodeType === document.COMMENT_NODE && item["s-cn"])
|
|
47
|
+
item["s-cn"] = false;
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
render() {
|
|
@@ -1,91 +1,31 @@
|
|
|
1
|
-
export function throttle(fn,
|
|
2
|
-
|
|
3
|
-
let
|
|
4
|
-
return function () {
|
|
1
|
+
export function throttle(fn, threshold = 250, scope) {
|
|
2
|
+
let lastTime = 0;
|
|
3
|
+
let deferTimer;
|
|
4
|
+
return function (...args) {
|
|
5
5
|
const context = scope || this;
|
|
6
|
-
const now =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
const now = Date.now();
|
|
7
|
+
if (now - lastTime > threshold) {
|
|
8
|
+
fn.apply(this, args);
|
|
9
|
+
lastTime = now;
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
10
12
|
clearTimeout(deferTimer);
|
|
11
13
|
deferTimer = setTimeout(() => {
|
|
12
|
-
|
|
14
|
+
lastTime = now;
|
|
13
15
|
fn.apply(context, args);
|
|
14
|
-
},
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
last = now;
|
|
18
|
-
fn.apply(context, args);
|
|
16
|
+
}, threshold);
|
|
19
17
|
}
|
|
20
18
|
};
|
|
21
19
|
}
|
|
22
|
-
export
|
|
23
|
-
let
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
// handle relative files (as opposed to directories)
|
|
32
|
-
if (url.substring(-3) === '/..' || url.slice(-2) === '/.') {
|
|
33
|
-
url += '/';
|
|
34
|
-
}
|
|
35
|
-
// resolve simples
|
|
36
|
-
url = url.replace(/(\/(\.\/)+)|(\/\.$)/g, '/').replace(/\/{2,}/g, '/');
|
|
37
|
-
// remember leading parents
|
|
38
|
-
if (_isRelative) {
|
|
39
|
-
_leadingParents = url.substring(1).match(/^(\.\.\/)+/) || '';
|
|
40
|
-
if (_leadingParents) {
|
|
41
|
-
_leadingParents = _leadingParents[0];
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
// resolve parents
|
|
45
|
-
while (true) {
|
|
46
|
-
_parent = url.search(/\/\.\.(\/|$)/);
|
|
47
|
-
if (_parent === -1) {
|
|
48
|
-
// no more ../ to resolve
|
|
49
|
-
break;
|
|
50
|
-
}
|
|
51
|
-
else if (_parent === 0) {
|
|
52
|
-
// top level cannot be relative, skip it
|
|
53
|
-
url = url.substring(3);
|
|
54
|
-
continue;
|
|
55
|
-
}
|
|
56
|
-
_pos = url.substring(0, _parent).lastIndexOf('/');
|
|
57
|
-
if (_pos === -1) {
|
|
58
|
-
_pos = _parent;
|
|
59
|
-
}
|
|
60
|
-
url = url.substring(0, _pos) + url.substring(_parent + 3);
|
|
61
|
-
}
|
|
62
|
-
// revert to relative
|
|
63
|
-
if (_isRelative) {
|
|
64
|
-
url = _leadingParents + url.substring(1);
|
|
65
|
-
}
|
|
66
|
-
return url;
|
|
67
|
-
};
|
|
68
|
-
export const splitUrl = _url => {
|
|
69
|
-
let url = _url || '';
|
|
70
|
-
let pos;
|
|
71
|
-
const res = {
|
|
72
|
-
path: null,
|
|
73
|
-
query: null,
|
|
74
|
-
fragment: null
|
|
20
|
+
export function debounce(fn, ms = 250, scope) {
|
|
21
|
+
let timer;
|
|
22
|
+
return function (...args) {
|
|
23
|
+
const context = scope || this;
|
|
24
|
+
clearTimeout(timer);
|
|
25
|
+
timer = setTimeout(function () {
|
|
26
|
+
fn.apply(context, args);
|
|
27
|
+
}, ms);
|
|
75
28
|
};
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
url = url.substring(0, pos);
|
|
80
|
-
}
|
|
81
|
-
pos = url.indexOf('?');
|
|
82
|
-
if (pos > -1) {
|
|
83
|
-
res.query = url.substring(pos + 1);
|
|
84
|
-
url = url.substring(0, pos);
|
|
85
|
-
}
|
|
86
|
-
res.path = url;
|
|
87
|
-
return res;
|
|
88
|
-
};
|
|
89
|
-
export const isNumber = obj => {
|
|
90
|
-
return typeof obj === 'number';
|
|
91
|
-
};
|
|
29
|
+
}
|
|
30
|
+
export * from './style';
|
|
31
|
+
export * from './url';
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export const normalizePath = url => {
|
|
2
|
+
let _isRelative;
|
|
3
|
+
let _leadingParents = '';
|
|
4
|
+
let _parent, _pos;
|
|
5
|
+
// handle relative paths
|
|
6
|
+
if (url.charAt(0) !== '/') {
|
|
7
|
+
_isRelative = true;
|
|
8
|
+
url = '/' + url;
|
|
9
|
+
}
|
|
10
|
+
// handle relative files (as opposed to directories)
|
|
11
|
+
if (url.substring(-3) === '/..' || url.slice(-2) === '/.') {
|
|
12
|
+
url += '/';
|
|
13
|
+
}
|
|
14
|
+
// resolve simples
|
|
15
|
+
url = url.replace(/(\/(\.\/)+)|(\/\.$)/g, '/').replace(/\/{2,}/g, '/');
|
|
16
|
+
// remember leading parents
|
|
17
|
+
if (_isRelative) {
|
|
18
|
+
_leadingParents = url.substring(1).match(/^(\.\.\/)+/) || '';
|
|
19
|
+
if (_leadingParents) {
|
|
20
|
+
_leadingParents = _leadingParents[0];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
// resolve parents
|
|
24
|
+
while (true) {
|
|
25
|
+
_parent = url.search(/\/\.\.(\/|$)/);
|
|
26
|
+
if (_parent === -1) {
|
|
27
|
+
// no more ../ to resolve
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
else if (_parent === 0) {
|
|
31
|
+
// top level cannot be relative, skip it
|
|
32
|
+
url = url.substring(3);
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
_pos = url.substring(0, _parent).lastIndexOf('/');
|
|
36
|
+
if (_pos === -1) {
|
|
37
|
+
_pos = _parent;
|
|
38
|
+
}
|
|
39
|
+
url = url.substring(0, _pos) + url.substring(_parent + 3);
|
|
40
|
+
}
|
|
41
|
+
// revert to relative
|
|
42
|
+
if (_isRelative) {
|
|
43
|
+
url = _leadingParents + url.substring(1);
|
|
44
|
+
}
|
|
45
|
+
return url;
|
|
46
|
+
};
|
|
47
|
+
export const splitUrl = _url => {
|
|
48
|
+
let url = _url || '';
|
|
49
|
+
let pos;
|
|
50
|
+
const res = {
|
|
51
|
+
path: null,
|
|
52
|
+
query: null,
|
|
53
|
+
fragment: null
|
|
54
|
+
};
|
|
55
|
+
pos = url.indexOf('#');
|
|
56
|
+
if (pos > -1) {
|
|
57
|
+
res.fragment = url.substring(pos + 1);
|
|
58
|
+
url = url.substring(0, pos);
|
|
59
|
+
}
|
|
60
|
+
pos = url.indexOf('?');
|
|
61
|
+
if (pos > -1) {
|
|
62
|
+
res.query = url.substring(pos + 1);
|
|
63
|
+
url = url.substring(0, pos);
|
|
64
|
+
}
|
|
65
|
+
res.path = url;
|
|
66
|
+
return res;
|
|
67
|
+
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
'
|
|
1
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
2
|
+
|
|
3
|
+
function getDefaultExportFromCjs (x) {
|
|
4
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
5
|
+
}
|
|
2
6
|
|
|
3
7
|
function createCommonjsModule(fn, basedir, module) {
|
|
4
8
|
return module = {
|
|
@@ -69,4 +73,4 @@ var classnames = createCommonjsModule(function (module) {
|
|
|
69
73
|
}());
|
|
70
74
|
});
|
|
71
75
|
|
|
72
|
-
|
|
76
|
+
export { createCommonjsModule as a, commonjsGlobal as b, classnames as c, getDefaultExportFromCjs as g };
|