@tarojs/components 4.1.5 → 4.1.6-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ad-6e5e6c21.js +18 -0
- package/dist/cjs/ad-custom-03478475.js +18 -0
- package/dist/cjs/animation-video-7fc33f99.js +18 -0
- package/dist/cjs/animation-view-80fa5d0f.js +18 -0
- package/dist/cjs/ar-camera-a5b4fc84.js +18 -0
- package/dist/cjs/audio-df2bacdd.js +56 -0
- package/dist/cjs/aweme-data-c526f1a1.js +18 -0
- package/dist/cjs/block-019beb65.js +14 -0
- package/dist/cjs/button-8f729d81.js +73 -0
- package/dist/cjs/camera-d82d6f4d.js +18 -0
- package/dist/cjs/canvas-5ed991dd.js +49 -0
- package/dist/cjs/channel-live-691e20a5.js +18 -0
- package/dist/cjs/channel-video-126a3305.js +18 -0
- package/dist/cjs/checkbox-ffc9c1a2.js +122 -0
- package/dist/cjs/comment-detail-87637299.js +18 -0
- package/dist/cjs/comment-list-a18163da.js +18 -0
- package/dist/cjs/contact-button-75ae4609.js +18 -0
- package/dist/cjs/cover-image-1bf95a9b.js +32 -0
- package/dist/cjs/cover-view-a0e4395c.js +65 -0
- package/dist/cjs/custom-wrapper-64a8245e.js +14 -0
- package/dist/cjs/draggable-sheet-749618d6.js +18 -0
- package/dist/cjs/editor-81a773f9.js +18 -0
- package/dist/cjs/follow-swan-794e3367.js +18 -0
- package/dist/cjs/form-f24b8935.js +141 -0
- package/dist/cjs/functional-page-navigator-db0aeeb5.js +18 -0
- package/dist/cjs/grid-builder-0757691d.js +18 -0
- package/dist/cjs/grid-view-b77da424.js +18 -0
- package/dist/cjs/icon-93e7c472.js +30 -0
- package/dist/cjs/image-4a828d57.js +106 -0
- package/dist/cjs/index.cjs.js +205 -0
- package/dist/cjs/inline-payment-panel-0068d0e4.js +18 -0
- package/dist/cjs/input-f39a63db.js +213 -0
- package/dist/cjs/keyboard-accessory-d7d227b7.js +18 -0
- package/dist/cjs/label-e54a79ee.js +15 -0
- package/dist/cjs/lifestyle-189b4b3a.js +18 -0
- package/dist/cjs/like-b6a72cb7.js +18 -0
- package/dist/cjs/list-builder-d7a3f023.js +18 -0
- package/dist/cjs/list-view-7cf454c7.js +18 -0
- package/dist/cjs/live-player-2115d649.js +18 -0
- package/dist/cjs/live-pusher-6a8da38c.js +18 -0
- package/dist/cjs/login-cd972083.js +18 -0
- package/dist/cjs/lottie-802328ca.js +18 -0
- package/dist/cjs/map-841765a9.js +1338 -0
- package/dist/cjs/match-media-6e2efc2f.js +18 -0
- package/dist/cjs/movable-view-9fa169e1.js +482 -0
- package/dist/cjs/native-slot-142506c1.js +18 -0
- package/dist/cjs/navigation-bar-b4ff564a.js +18 -0
- package/dist/cjs/navigator-43495d4f.js +77 -0
- package/dist/cjs/nested-scroll-body-9caab58f.js +18 -0
- package/dist/cjs/nested-scroll-header-c5b64f3d.js +18 -0
- package/dist/cjs/official-account-f53ef4c9.js +18 -0
- package/dist/cjs/open-container-dcb0756e.js +18 -0
- package/dist/cjs/open-data-295d2a0f.js +18 -0
- package/dist/cjs/page-container-c02ef21e.js +18 -0
- package/dist/cjs/page-meta-80a7a861.js +18 -0
- package/dist/cjs/picker-0b3ae89d.js +689 -0
- package/dist/cjs/picker-view-ee39f2b6.js +179 -0
- package/dist/cjs/progress-0434432f.js +39 -0
- package/dist/cjs/pull-to-refresh-a7a9d80c.js +269 -0
- package/dist/cjs/radio-fa441dee.js +136 -0
- package/dist/cjs/rich-text-f88b18dd.js +73 -0
- package/dist/cjs/root-portal-849d424f.js +18 -0
- package/dist/cjs/rtc-room-e32e8e93.js +18 -0
- package/dist/cjs/rtc-room-item-f2696f3e.js +18 -0
- package/dist/cjs/script-1d8392d2.js +18 -0
- package/dist/cjs/script-2eb2d361.js +18 -0
- package/dist/cjs/script-33ab1b9b.js +18 -0
- package/dist/cjs/script-66238de4.js +18 -0
- package/dist/cjs/script-7d8a337e.js +18 -0
- package/dist/cjs/script-9767d763.js +18 -0
- package/dist/cjs/script-aa62f496.js +18 -0
- package/dist/cjs/script-d39c17ed.js +18 -0
- package/dist/cjs/script-d7887902.js +18 -0
- package/dist/cjs/scroll-view-65cb8d5f.js +170 -0
- package/dist/cjs/share-element-68928fbf.js +18 -0
- package/dist/cjs/slider-4093049a.js +163 -0
- package/dist/cjs/slot-bb81659e.js +18 -0
- package/dist/cjs/snapshot-c2520c58.js +18 -0
- package/dist/cjs/span-fb1efcaf.js +18 -0
- package/dist/cjs/sticky-header-dcde70ca.js +18 -0
- package/dist/cjs/sticky-section-170bc892.js +18 -0
- package/dist/cjs/swiper-3ab835bb.js +427 -0
- package/dist/cjs/switch-586022a8.js +62 -0
- package/dist/cjs/tab-item-cfa3339e.js +18 -0
- package/dist/cjs/tabbar-41113df5.js +353 -0
- package/dist/cjs/tabs-be7f918d.js +18 -0
- package/dist/cjs/taro-ad-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-ad-custom-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-animation-video-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-animation-view-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-ar-camera-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-audio-core.cjs.entry.js +3 -51
- package/dist/cjs/taro-aweme-data-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-block-core.cjs.entry.js +4 -10
- package/dist/cjs/taro-button-core.cjs.entry.js +4 -68
- package/dist/cjs/taro-camera-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-canvas-core.cjs.entry.js +3 -44
- package/dist/cjs/taro-channel-live-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-channel-video-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-checkbox-core_2.cjs.entry.js +4 -117
- package/dist/cjs/taro-comment-detail-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-comment-list-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-contact-button-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-cover-image-core.cjs.entry.js +3 -27
- package/dist/cjs/taro-cover-view-core.cjs.entry.js +4 -60
- package/dist/cjs/taro-custom-wrapper-core.cjs.entry.js +4 -10
- package/dist/cjs/taro-double-tap-gesture-handler-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-draggable-sheet-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-editor-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-follow-swan-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-force-press-gesture-handler-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-form-core.cjs.entry.js +4 -137
- package/dist/cjs/taro-functional-page-navigator-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-grid-builder-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-grid-view-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-horizontal-drag-gesture-handler-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-icon-core.cjs.entry.js +4 -25
- package/dist/cjs/taro-image-core.cjs.entry.js +4 -55
- package/dist/cjs/taro-inline-payment-panel-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-input-core.cjs.entry.js +3 -208
- package/dist/cjs/taro-keyboard-accessory-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-label-core.cjs.entry.js +4 -11
- package/dist/cjs/taro-lifestyle-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-like-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-list-builder-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-list-view-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-live-player-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-live-pusher-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-login-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-long-press-gesture-handler-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-lottie-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-map-core.cjs.entry.js +4 -1333
- package/dist/cjs/taro-match-media-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-movable-area-core_2.cjs.entry.js +5 -477
- package/dist/cjs/taro-native-slot-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-navigation-bar-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-navigator-core.cjs.entry.js +5 -72
- package/dist/cjs/taro-nested-scroll-body-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-nested-scroll-header-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-official-account-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-open-container-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-open-data-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-page-container-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-page-meta-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-pan-gesture-handler-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-picker-core_2.cjs.entry.js +5 -684
- package/dist/cjs/taro-picker-view-column-core_2.cjs.entry.js +6 -174
- package/dist/cjs/taro-progress-core.cjs.entry.js +3 -34
- package/dist/cjs/taro-pull-to-refresh-core.cjs.entry.js +5 -264
- package/dist/cjs/taro-radio-core_2.cjs.entry.js +4 -131
- package/dist/cjs/taro-rich-text-core.cjs.entry.js +3 -68
- package/dist/cjs/taro-root-portal-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-rtc-room-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-rtc-room-item-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-scale-gesture-handler-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-script-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-scroll-view-core.cjs.entry.js +6 -165
- package/dist/cjs/taro-share-element-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-slider-core.cjs.entry.js +3 -158
- package/dist/cjs/taro-slot-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-snapshot-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-span-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-sticky-header-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-sticky-section-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +8 -422
- package/dist/cjs/taro-switch-core.cjs.entry.js +3 -57
- package/dist/cjs/taro-tab-item-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-tabbar.cjs.entry.js +8 -347
- package/dist/cjs/taro-tabs-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-tap-gesture-handler-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-text-core.cjs.entry.js +3 -20
- package/dist/cjs/taro-textarea-core.cjs.entry.js +3 -156
- package/dist/cjs/taro-vertical-drag-gesture-handler-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-video-control_3.cjs.entry.js +8 -743
- package/dist/cjs/taro-view-core.cjs.entry.js +5 -65
- package/dist/cjs/taro-voip-room-core.cjs.entry.js +5 -14
- package/dist/cjs/taro-web-view-core.cjs.entry.js +3 -22
- package/dist/cjs/text-642f2f48.js +25 -0
- package/dist/cjs/textarea-3f14df1c.js +161 -0
- package/dist/cjs/video-75aca914.js +748 -0
- package/dist/cjs/view-609adfc6.js +70 -0
- package/dist/cjs/voip-room-7f55d8a0.js +18 -0
- package/dist/cjs/web-view-be5a2d1d.js +27 -0
- package/dist/collection/components/ad/index.js +1 -0
- package/dist/collection/components/ad-custom/index.js +1 -0
- package/dist/collection/components/animation-video/index.js +1 -0
- package/dist/collection/components/animation-view/index.js +1 -0
- package/dist/collection/components/ar-camera/index.js +1 -0
- package/dist/collection/components/audio/index.js +1 -0
- package/dist/collection/components/aweme-data/index.js +1 -0
- package/dist/collection/components/block/index.js +1 -0
- package/dist/collection/components/button/index.js +1 -0
- package/dist/collection/components/camera/index.js +1 -0
- package/dist/collection/components/canvas/index.js +1 -0
- package/dist/collection/components/channel-live/index.js +1 -0
- package/dist/collection/components/channel-video/index.js +1 -0
- package/dist/collection/components/checkbox/index.js +2 -0
- package/dist/collection/components/comment/index.js +2 -0
- package/dist/collection/components/contact-button/index.js +1 -0
- package/dist/collection/components/cover-image/index.js +1 -0
- package/dist/collection/components/cover-view/index.js +1 -0
- package/dist/collection/components/custom-wrapper/index.js +1 -0
- package/dist/collection/components/double-tap-gesture-handler/index.js +1 -0
- package/dist/collection/components/draggable-sheet/index.js +1 -0
- package/dist/collection/components/editor/index.js +1 -0
- package/dist/collection/components/follow-swan/index.js +1 -0
- package/dist/collection/components/force-press-gesture-handler/index.js +1 -0
- package/dist/collection/components/form/index.js +1 -0
- package/dist/collection/components/functional-page-navigator/index.js +1 -0
- package/dist/collection/components/grid-builder/index.js +1 -0
- package/dist/collection/components/grid-view/index.js +1 -0
- package/dist/collection/components/horizontal-drag-gesture-handler/index.js +1 -0
- package/dist/collection/components/icon/index.js +1 -0
- package/dist/collection/components/image/image.js +46 -0
- package/dist/collection/components/image/index.js +1 -0
- package/dist/collection/components/index.js +87 -0
- package/dist/collection/components/inline-payment-panel/index.js +1 -0
- package/dist/collection/components/input/index.js +1 -0
- package/dist/collection/components/keyboard-accessory/index.js +1 -0
- package/dist/collection/components/label/index.js +1 -0
- package/dist/collection/components/lifestyle/index.js +1 -0
- package/dist/collection/components/like/index.js +1 -0
- package/dist/collection/components/list-builder/index.js +1 -0
- package/dist/collection/components/list-view/index.js +1 -0
- package/dist/collection/components/live-player/index.js +1 -0
- package/dist/collection/components/live-pusher/index.js +1 -0
- package/dist/collection/components/login/index.js +1 -0
- package/dist/collection/components/long-press-gesture-handler/index.js +1 -0
- package/dist/collection/components/lottie/index.js +1 -0
- package/dist/collection/components/map/index.js +1 -0
- package/dist/collection/components/match-media/index.js +1 -0
- package/dist/collection/components/movable-area/index.js +2 -0
- package/dist/collection/components/navigation-bar/index.js +1 -0
- package/dist/collection/components/navigator/index.js +1 -0
- package/dist/collection/components/nested-scroll-body/index.js +1 -0
- package/dist/collection/components/nested-scroll-header/index.js +1 -0
- package/dist/collection/components/official-account/index.js +1 -0
- package/dist/collection/components/open-container/index.js +1 -0
- package/dist/collection/components/open-data/index.js +1 -0
- package/dist/collection/components/page-container/index.js +1 -0
- package/dist/collection/components/page-meta/index.js +1 -0
- package/dist/collection/components/pan-gesture-handler/index.js +1 -0
- package/dist/collection/components/picker/index.js +2 -0
- package/dist/collection/components/picker-view/index.js +2 -0
- package/dist/collection/components/progress/index.js +1 -0
- package/dist/collection/components/pull-to-refresh/index.js +1 -0
- package/dist/collection/components/radio/index.js +2 -0
- package/dist/collection/components/rich-text/index.js +1 -0
- package/dist/collection/components/root-portal/index.js +1 -0
- package/dist/collection/components/rtc-room/index.js +2 -0
- package/dist/collection/components/scale-gesture-handler/index.js +1 -0
- package/dist/collection/components/script/index.js +1 -0
- package/dist/collection/components/scroll-view/index.js +1 -0
- package/dist/collection/components/share-element/index.js +1 -0
- package/dist/collection/components/slider/index.js +1 -0
- package/dist/collection/components/slot/index.js +2 -0
- package/dist/collection/components/snapshot/index.js +1 -0
- package/dist/collection/components/span/index.js +1 -0
- package/dist/collection/components/sticky-header/index.js +1 -0
- package/dist/collection/components/sticky-section/index.js +1 -0
- package/dist/collection/components/swiper/index.js +2 -0
- package/dist/collection/components/switch/index.js +1 -0
- package/dist/collection/components/tabbar/index.js +2 -0
- package/dist/collection/components/tabs/index.js +2 -0
- package/dist/collection/components/tap-gesture-handler/index.js +1 -0
- package/dist/collection/components/text/index.js +1 -0
- package/dist/collection/components/textarea/index.js +1 -0
- package/dist/collection/components/vertical-drag-gesture-handler/index.js +1 -0
- package/dist/collection/components/video/index.js +3 -0
- package/dist/collection/components/view/index.js +1 -0
- package/dist/collection/components/voip-room/index.js +1 -0
- package/dist/collection/components/web-view/index.js +1 -0
- package/dist/collection/index.js +1 -1
- package/dist/components/index.js +98 -96
- package/dist/components/taro-ad-core.js +1 -1
- package/dist/components/taro-ad-custom-core.js +1 -1
- package/dist/components/taro-animation-video-core.js +1 -1
- package/dist/components/taro-animation-view-core.js +1 -1
- package/dist/components/taro-ar-camera-core.js +1 -1
- package/dist/components/taro-audio-core.js +1 -1
- package/dist/components/taro-aweme-data-core.js +1 -1
- package/dist/components/taro-block-core.js +1 -1
- package/dist/components/taro-button-core.js +1 -1
- package/dist/components/taro-camera-core.js +1 -1
- package/dist/components/taro-canvas-core.js +1 -1
- package/dist/components/taro-channel-live-core.js +1 -1
- package/dist/components/taro-channel-video-core.js +1 -1
- package/dist/components/taro-checkbox-core.js +1 -1
- package/dist/components/taro-checkbox-group-core.js +1 -1
- package/dist/components/taro-comment-detail-core.js +1 -1
- package/dist/components/taro-comment-list-core.js +1 -1
- package/dist/components/taro-contact-button-core.js +1 -1
- package/dist/components/taro-cover-image-core.js +1 -1
- package/dist/components/taro-cover-view-core.js +1 -1
- package/dist/components/taro-custom-wrapper-core.js +1 -1
- package/dist/components/taro-double-tap-gesture-handler-core.js +1 -1
- package/dist/components/taro-draggable-sheet-core.js +1 -1
- package/dist/components/taro-editor-core.js +1 -1
- package/dist/components/taro-follow-swan-core.js +1 -1
- package/dist/components/taro-force-press-gesture-handler-core.js +1 -1
- package/dist/components/taro-form-core.js +1 -1
- package/dist/components/taro-functional-page-navigator-core.js +1 -1
- package/dist/components/taro-grid-builder-core.js +1 -1
- package/dist/components/taro-grid-view-core.js +1 -1
- package/dist/components/taro-horizontal-drag-gesture-handler-core.js +1 -1
- package/dist/components/taro-icon-core.js +1 -1
- package/dist/components/taro-image-core.js +47 -1
- package/dist/components/taro-inline-payment-panel-core.js +1 -1
- package/dist/components/taro-input-core.js +1 -1
- package/dist/components/taro-keyboard-accessory-core.js +1 -1
- package/dist/components/taro-label-core.js +1 -1
- package/dist/components/taro-lifestyle-core.js +1 -1
- package/dist/components/taro-like-core.js +1 -1
- package/dist/components/taro-list-builder-core.js +1 -1
- package/dist/components/taro-list-view-core.js +1 -1
- package/dist/components/taro-live-player-core.js +1 -1
- package/dist/components/taro-live-pusher-core.js +1 -1
- package/dist/components/taro-login-core.js +1 -1
- package/dist/components/taro-long-press-gesture-handler-core.js +1 -1
- package/dist/components/taro-lottie-core.js +1 -1
- package/dist/components/taro-map-core.js +1 -1
- package/dist/components/taro-match-media-core.js +1 -1
- package/dist/components/taro-movable-area-core.js +1 -1
- package/dist/components/taro-movable-view-core.js +1 -1
- package/dist/components/taro-native-slot-core.js +1 -1
- package/dist/components/taro-navigation-bar-core.js +1 -1
- package/dist/components/taro-navigator-core.js +1 -1
- package/dist/components/taro-nested-scroll-body-core.js +1 -1
- package/dist/components/taro-nested-scroll-header-core.js +1 -1
- package/dist/components/taro-official-account-core.js +1 -1
- package/dist/components/taro-open-container-core.js +1 -1
- package/dist/components/taro-open-data-core.js +1 -1
- package/dist/components/taro-page-container-core.js +1 -1
- package/dist/components/taro-page-meta-core.js +1 -1
- package/dist/components/taro-pan-gesture-handler-core.js +1 -1
- package/dist/components/taro-picker-core.js +1 -1
- package/dist/components/taro-picker-view-column-core.js +1 -1
- package/dist/components/taro-picker-view-core.js +1 -1
- package/dist/components/taro-progress-core.js +1 -1
- package/dist/components/taro-pull-to-refresh-core.js +1 -1
- package/dist/components/taro-radio-core.js +1 -1
- package/dist/components/taro-radio-group-core.js +1 -1
- package/dist/components/taro-rich-text-core.js +1 -1
- package/dist/components/taro-root-portal-core.js +1 -1
- package/dist/components/taro-rtc-room-core.js +1 -1
- package/dist/components/taro-rtc-room-item-core.js +1 -1
- package/dist/components/taro-scale-gesture-handler-core.js +1 -1
- package/dist/components/taro-script-core.js +1 -1
- package/dist/components/taro-scroll-view-core.js +1 -1
- package/dist/components/taro-share-element-core.js +1 -1
- package/dist/components/taro-slider-core.js +1 -1
- package/dist/components/taro-slot-core.js +1 -1
- package/dist/components/taro-snapshot-core.js +1 -1
- package/dist/components/taro-span-core.js +1 -1
- package/dist/components/taro-sticky-header-core.js +1 -1
- package/dist/components/taro-sticky-section-core.js +1 -1
- package/dist/components/taro-swiper-core.js +1 -1
- package/dist/components/taro-swiper-item-core.js +1 -1
- package/dist/components/taro-switch-core.js +1 -1
- package/dist/components/taro-tab-item-core.js +1 -1
- package/dist/components/taro-tabbar.js +1 -1
- package/dist/components/taro-tabs-core.js +1 -1
- package/dist/components/taro-tap-gesture-handler-core.js +1 -1
- package/dist/components/taro-text-core.js +1 -1
- package/dist/components/taro-textarea-core.js +1 -1
- package/dist/components/taro-vertical-drag-gesture-handler-core.js +1 -1
- package/dist/components/taro-video-core.js +2 -2
- package/dist/components/taro-view-core.js +1 -1
- package/dist/components/taro-voip-room-core.js +1 -1
- package/dist/components/taro-web-view-core.js +1 -1
- package/dist/esm/ad-cfb00041.js +16 -0
- package/dist/esm/ad-custom-4a0d4eb2.js +16 -0
- package/dist/esm/animation-video-5215c138.js +16 -0
- package/dist/esm/animation-view-a07c6ea9.js +16 -0
- package/dist/esm/ar-camera-d578c533.js +16 -0
- package/dist/esm/audio-fd0e719f.js +54 -0
- package/dist/esm/aweme-data-2e12d8c9.js +16 -0
- package/dist/esm/block-796aa7d8.js +12 -0
- package/dist/esm/button-cd801674.js +71 -0
- package/dist/esm/camera-1791b404.js +16 -0
- package/dist/esm/canvas-5531b496.js +47 -0
- package/dist/esm/channel-live-b63e080a.js +16 -0
- package/dist/esm/channel-video-d4ee7254.js +16 -0
- package/dist/esm/checkbox-da6b07ea.js +119 -0
- package/dist/esm/comment-detail-02a3e8ee.js +16 -0
- package/dist/esm/comment-list-a62325be.js +16 -0
- package/dist/esm/contact-button-68e95a69.js +16 -0
- package/dist/esm/cover-image-0783b2c1.js +30 -0
- package/dist/esm/cover-view-8330b60d.js +63 -0
- package/dist/esm/custom-wrapper-0bb13a12.js +12 -0
- package/dist/esm/draggable-sheet-67355f70.js +16 -0
- package/dist/esm/editor-743e35d0.js +16 -0
- package/dist/esm/follow-swan-dbdf5cc8.js +16 -0
- package/dist/esm/form-576398ba.js +139 -0
- package/dist/esm/functional-page-navigator-63f675f4.js +16 -0
- package/dist/esm/grid-builder-cf0aa856.js +16 -0
- package/dist/esm/grid-view-353586e4.js +16 -0
- package/dist/esm/icon-88383f2c.js +28 -0
- package/dist/esm/image-d9d8ed01.js +104 -0
- package/dist/esm/index.js +100 -1
- package/dist/esm/inline-payment-panel-73925dd2.js +16 -0
- package/dist/esm/input-4104e3ea.js +211 -0
- package/dist/esm/keyboard-accessory-fd485a31.js +16 -0
- package/dist/esm/label-94ef4b17.js +13 -0
- package/dist/esm/lifestyle-4db11299.js +16 -0
- package/dist/esm/like-d61fe792.js +16 -0
- package/dist/esm/list-builder-e0d9e871.js +16 -0
- package/dist/esm/list-view-84529418.js +16 -0
- package/dist/esm/live-player-e4dbe4cf.js +16 -0
- package/dist/esm/live-pusher-15c48b78.js +16 -0
- package/dist/esm/login-d932daf9.js +16 -0
- package/dist/esm/lottie-2ada69b7.js +16 -0
- package/dist/esm/map-c6cd24f4.js +1332 -0
- package/dist/esm/match-media-2cdc536a.js +16 -0
- package/dist/esm/movable-view-c1358d1e.js +479 -0
- package/dist/esm/native-slot-98020f54.js +16 -0
- package/dist/esm/navigation-bar-eda66236.js +16 -0
- package/dist/esm/navigator-65877bda.js +71 -0
- package/dist/esm/nested-scroll-body-b1053924.js +16 -0
- package/dist/esm/nested-scroll-header-10ba047c.js +16 -0
- package/dist/esm/official-account-75c8fa4e.js +16 -0
- package/dist/esm/open-container-d288ae08.js +16 -0
- package/dist/esm/open-data-9e1673e1.js +16 -0
- package/dist/esm/page-container-b5b82c32.js +16 -0
- package/dist/esm/page-meta-518b39b7.js +16 -0
- package/dist/esm/picker-6a565e02.js +686 -0
- package/dist/esm/picker-view-52390656.js +176 -0
- package/dist/esm/progress-f99ddb18.js +37 -0
- package/dist/esm/pull-to-refresh-e8972159.js +263 -0
- package/dist/esm/radio-9b356d76.js +133 -0
- package/dist/esm/rich-text-287554f4.js +71 -0
- package/dist/esm/root-portal-db801799.js +16 -0
- package/dist/esm/rtc-room-bcf23c91.js +16 -0
- package/dist/esm/rtc-room-item-052b16d2.js +16 -0
- package/dist/esm/script-11e3884a.js +16 -0
- package/dist/esm/script-1b22398f.js +16 -0
- package/dist/esm/script-1c3855bc.js +16 -0
- package/dist/esm/script-4b869172.js +16 -0
- package/dist/esm/script-4d587470.js +16 -0
- package/dist/esm/script-5c55afcb.js +16 -0
- package/dist/esm/script-661db6af.js +16 -0
- package/dist/esm/script-76fc8cf5.js +16 -0
- package/dist/esm/script-8f332177.js +16 -0
- package/dist/esm/scroll-view-43e9acfc.js +168 -0
- package/dist/esm/share-element-4f90ad5b.js +16 -0
- package/dist/esm/slider-47bbf797.js +161 -0
- package/dist/esm/slot-71ad33eb.js +16 -0
- package/dist/esm/snapshot-42feea7d.js +16 -0
- package/dist/esm/span-d4b171da.js +16 -0
- package/dist/esm/sticky-header-a99729bc.js +16 -0
- package/dist/esm/sticky-section-f8d75284.js +16 -0
- package/dist/esm/swiper-20b19ce0.js +420 -0
- package/dist/esm/switch-a538d85e.js +60 -0
- package/dist/esm/tab-item-f58dd1b0.js +16 -0
- package/dist/esm/tabbar-e6342392.js +345 -0
- package/dist/esm/tabs-da838bbd.js +16 -0
- package/dist/esm/taro-ad-core.entry.js +3 -16
- package/dist/esm/taro-ad-custom-core.entry.js +3 -16
- package/dist/esm/taro-animation-video-core.entry.js +3 -16
- package/dist/esm/taro-animation-view-core.entry.js +3 -16
- package/dist/esm/taro-ar-camera-core.entry.js +3 -16
- package/dist/esm/taro-audio-core.entry.js +2 -54
- package/dist/esm/taro-aweme-data-core.entry.js +3 -16
- package/dist/esm/taro-block-core.entry.js +2 -12
- package/dist/esm/taro-button-core.entry.js +3 -71
- package/dist/esm/taro-camera-core.entry.js +3 -16
- package/dist/esm/taro-canvas-core.entry.js +2 -47
- package/dist/esm/taro-channel-live-core.entry.js +3 -16
- package/dist/esm/taro-channel-video-core.entry.js +3 -16
- package/dist/esm/taro-checkbox-core_2.entry.js +2 -119
- package/dist/esm/taro-comment-detail-core.entry.js +3 -16
- package/dist/esm/taro-comment-list-core.entry.js +3 -16
- package/dist/esm/taro-contact-button-core.entry.js +3 -16
- package/dist/esm/taro-cover-image-core.entry.js +2 -30
- package/dist/esm/taro-cover-view-core.entry.js +3 -63
- package/dist/esm/taro-custom-wrapper-core.entry.js +2 -12
- package/dist/esm/taro-double-tap-gesture-handler-core.entry.js +3 -16
- package/dist/esm/taro-draggable-sheet-core.entry.js +3 -16
- package/dist/esm/taro-editor-core.entry.js +3 -16
- package/dist/esm/taro-follow-swan-core.entry.js +3 -16
- package/dist/esm/taro-force-press-gesture-handler-core.entry.js +3 -16
- package/dist/esm/taro-form-core.entry.js +2 -139
- package/dist/esm/taro-functional-page-navigator-core.entry.js +3 -16
- package/dist/esm/taro-grid-builder-core.entry.js +3 -16
- package/dist/esm/taro-grid-view-core.entry.js +3 -16
- package/dist/esm/taro-horizontal-drag-gesture-handler-core.entry.js +3 -16
- package/dist/esm/taro-icon-core.entry.js +3 -28
- package/dist/esm/taro-image-core.entry.js +3 -58
- package/dist/esm/taro-inline-payment-panel-core.entry.js +3 -16
- package/dist/esm/taro-input-core.entry.js +2 -211
- package/dist/esm/taro-keyboard-accessory-core.entry.js +3 -16
- package/dist/esm/taro-label-core.entry.js +2 -13
- package/dist/esm/taro-lifestyle-core.entry.js +3 -16
- package/dist/esm/taro-like-core.entry.js +3 -16
- package/dist/esm/taro-list-builder-core.entry.js +3 -16
- package/dist/esm/taro-list-view-core.entry.js +3 -16
- package/dist/esm/taro-live-player-core.entry.js +3 -16
- package/dist/esm/taro-live-pusher-core.entry.js +3 -16
- package/dist/esm/taro-login-core.entry.js +3 -16
- package/dist/esm/taro-long-press-gesture-handler-core.entry.js +3 -16
- package/dist/esm/taro-lottie-core.entry.js +3 -16
- package/dist/esm/taro-map-core.entry.js +3 -1332
- package/dist/esm/taro-match-media-core.entry.js +3 -16
- package/dist/esm/taro-movable-area-core_2.entry.js +3 -479
- package/dist/esm/taro-native-slot-core.entry.js +3 -16
- package/dist/esm/taro-navigation-bar-core.entry.js +3 -16
- package/dist/esm/taro-navigator-core.entry.js +4 -71
- package/dist/esm/taro-nested-scroll-body-core.entry.js +3 -16
- package/dist/esm/taro-nested-scroll-header-core.entry.js +3 -16
- package/dist/esm/taro-official-account-core.entry.js +3 -16
- package/dist/esm/taro-open-container-core.entry.js +3 -16
- package/dist/esm/taro-open-data-core.entry.js +3 -16
- package/dist/esm/taro-page-container-core.entry.js +3 -16
- package/dist/esm/taro-page-meta-core.entry.js +3 -16
- package/dist/esm/taro-pan-gesture-handler-core.entry.js +3 -16
- package/dist/esm/taro-picker-core_2.entry.js +3 -686
- package/dist/esm/taro-picker-view-column-core_2.entry.js +4 -176
- package/dist/esm/taro-progress-core.entry.js +2 -37
- package/dist/esm/taro-pull-to-refresh-core.entry.js +4 -263
- package/dist/esm/taro-radio-core_2.entry.js +2 -133
- package/dist/esm/taro-rich-text-core.entry.js +2 -71
- package/dist/esm/taro-root-portal-core.entry.js +3 -16
- package/dist/esm/taro-rtc-room-core.entry.js +3 -16
- package/dist/esm/taro-rtc-room-item-core.entry.js +3 -16
- package/dist/esm/taro-scale-gesture-handler-core.entry.js +3 -16
- package/dist/esm/taro-script-core.entry.js +3 -16
- package/dist/esm/taro-scroll-view-core.entry.js +5 -168
- package/dist/esm/taro-share-element-core.entry.js +3 -16
- package/dist/esm/taro-slider-core.entry.js +2 -161
- package/dist/esm/taro-slot-core.entry.js +3 -16
- package/dist/esm/taro-snapshot-core.entry.js +3 -16
- package/dist/esm/taro-span-core.entry.js +3 -16
- package/dist/esm/taro-sticky-header-core.entry.js +3 -16
- package/dist/esm/taro-sticky-section-core.entry.js +3 -16
- package/dist/esm/taro-swiper-core_2.entry.js +6 -420
- package/dist/esm/taro-switch-core.entry.js +2 -60
- package/dist/esm/taro-tab-item-core.entry.js +3 -16
- package/dist/esm/taro-tabbar.entry.js +7 -345
- package/dist/esm/taro-tabs-core.entry.js +3 -16
- package/dist/esm/taro-tap-gesture-handler-core.entry.js +3 -16
- package/dist/esm/taro-text-core.entry.js +2 -23
- package/dist/esm/taro-textarea-core.entry.js +2 -159
- package/dist/esm/taro-vertical-drag-gesture-handler-core.entry.js +3 -16
- package/dist/esm/taro-video-control_3.entry.js +5 -720
- package/dist/esm/taro-view-core.entry.js +4 -68
- package/dist/esm/taro-voip-room-core.entry.js +3 -16
- package/dist/esm/taro-web-view-core.entry.js +2 -25
- package/dist/esm/text-a3b91b23.js +23 -0
- package/dist/esm/textarea-c722fd22.js +159 -0
- package/dist/esm/video-c663f267.js +720 -0
- package/dist/esm/view-965a491b.js +68 -0
- package/dist/esm/voip-room-da8085ad.js +16 -0
- package/dist/esm/web-view-8f780a19.js +25 -0
- package/dist/hydrate/index.js +46 -0
- package/dist/taro-components/index.esm.js +1 -0
- package/dist/taro-components/p-00e72620.entry.js +1 -0
- package/dist/taro-components/p-03b54b0b.entry.js +1 -0
- package/dist/taro-components/p-046319d8.js +1 -0
- package/dist/taro-components/p-052dbbd9.entry.js +1 -0
- package/dist/taro-components/p-0543d7fe.entry.js +1 -0
- package/dist/taro-components/p-06b4ba14.entry.js +1 -0
- package/dist/taro-components/p-0741aa7f.entry.js +1 -0
- package/dist/taro-components/p-0795a339.entry.js +1 -0
- package/dist/taro-components/p-08cfc9f4.js +1 -0
- package/dist/taro-components/p-094ba888.entry.js +1 -0
- package/dist/taro-components/p-0a92117d.entry.js +1 -0
- package/dist/taro-components/p-0ecccbb4.entry.js +1 -0
- package/dist/taro-components/p-0f829f27.entry.js +1 -0
- package/dist/taro-components/p-127391cb.entry.js +1 -0
- package/dist/taro-components/p-137eb06b.js +1 -0
- package/dist/taro-components/p-13d455f5.js +1 -0
- package/dist/taro-components/p-145ba514.entry.js +1 -0
- package/dist/taro-components/p-14795db7.entry.js +1 -0
- package/dist/taro-components/p-150a55a3.js +1 -0
- package/dist/taro-components/p-168a6355.entry.js +1 -0
- package/dist/taro-components/p-1ad94bf6.entry.js +1 -0
- package/dist/taro-components/p-1c19d1dd.js +1 -0
- package/dist/taro-components/{p-5534e4e7.entry.js → p-1c317d71.js} +1 -1
- package/dist/taro-components/p-1d2b2125.entry.js +1 -0
- package/dist/taro-components/p-1d3cfd13.js +1 -0
- package/dist/taro-components/{p-bf7ed5a8.entry.js → p-1f517ad8.js} +1 -1
- package/dist/taro-components/p-24079388.js +1 -0
- package/dist/taro-components/p-245fcd36.js +1 -0
- package/dist/taro-components/{p-826f9f91.entry.js → p-24ef5f8c.js} +1 -1
- package/dist/taro-components/p-2602cd28.entry.js +1 -0
- package/dist/taro-components/p-27622761.js +1 -0
- package/dist/taro-components/p-2884aec2.js +1 -0
- package/dist/taro-components/{p-3b0507ef.entry.js → p-2b1afb2c.js} +1 -1
- package/dist/taro-components/p-2b8fae1c.entry.js +1 -0
- package/dist/taro-components/p-2bf24716.js +1 -0
- package/dist/taro-components/p-2c48f6cb.entry.js +1 -0
- package/dist/taro-components/p-2e5daff6.js +1 -0
- package/dist/taro-components/p-2e841a1d.js +1 -0
- package/dist/taro-components/p-2f7b8388.js +1 -0
- package/dist/taro-components/p-2f9a4db4.js +1 -0
- package/dist/taro-components/p-2ff21d39.entry.js +1 -0
- package/dist/taro-components/p-31c75fd5.js +1 -0
- package/dist/taro-components/p-31f2f332.entry.js +1 -0
- package/dist/taro-components/{p-a5b32f59.entry.js → p-35aac6e0.js} +1 -1
- package/dist/taro-components/p-36e83be9.js +1 -0
- package/dist/taro-components/p-3837f853.entry.js +1 -0
- package/dist/taro-components/p-38598f5b.entry.js +1 -0
- package/dist/taro-components/p-3a6ec908.js +1 -0
- package/dist/taro-components/p-3d450082.js +1 -0
- package/dist/taro-components/p-3f4449b0.entry.js +1 -0
- package/dist/taro-components/p-3f650751.entry.js +1 -0
- package/dist/taro-components/{p-dc6b5615.entry.js → p-45c3b3bf.js} +1 -1
- package/dist/taro-components/p-4818a4aa.js +1 -0
- package/dist/taro-components/p-496a9932.entry.js +1 -0
- package/dist/taro-components/p-49e4d6ae.js +1 -0
- package/dist/taro-components/p-4bb83c7d.js +1 -0
- package/dist/taro-components/p-4cf49968.js +1 -0
- package/dist/taro-components/{p-bd7ab2a5.entry.js → p-4d79a974.js} +1 -1
- package/dist/taro-components/p-4f4b08df.entry.js +1 -0
- package/dist/taro-components/p-50ffadb4.js +1 -0
- package/dist/taro-components/p-52c6b16d.js +1 -0
- package/dist/taro-components/{p-7717e485.entry.js → p-53b69659.js} +1 -1
- package/dist/taro-components/{p-12075d7a.entry.js → p-553b9dc1.js} +1 -1
- package/dist/taro-components/p-5570a53e.entry.js +1 -0
- package/dist/taro-components/p-582a0e0f.entry.js +1 -0
- package/dist/taro-components/p-582cbc31.js +1 -0
- package/dist/taro-components/p-58a709ad.js +1 -0
- package/dist/taro-components/p-5b216b21.entry.js +1 -0
- package/dist/taro-components/p-5bd11f73.entry.js +1 -0
- package/dist/taro-components/p-5bd1aed9.js +1 -0
- package/dist/taro-components/p-5cbc249f.entry.js +1 -0
- package/dist/taro-components/p-5ea030de.entry.js +1 -0
- package/dist/taro-components/p-5fe2d7cb.js +1 -0
- package/dist/taro-components/p-61b23b53.entry.js +1 -0
- package/dist/taro-components/p-6223811d.entry.js +1 -0
- package/dist/taro-components/p-64a5e7a7.js +1 -0
- package/dist/taro-components/p-65c51f07.entry.js +1 -0
- package/dist/taro-components/{p-82d74d01.entry.js → p-67c4cf7e.js} +1 -1
- package/dist/taro-components/p-680d07ac.js +1 -0
- package/dist/taro-components/p-69147844.entry.js +1 -0
- package/dist/taro-components/p-6c93b540.js +1 -0
- package/dist/taro-components/{p-a8d628f8.entry.js → p-6e2f460d.js} +1 -1
- package/dist/taro-components/p-73aae58b.entry.js +1 -0
- package/dist/taro-components/p-74ac6c91.entry.js +1 -0
- package/dist/taro-components/p-773bed49.entry.js +1 -0
- package/dist/taro-components/p-79d3e109.js +1 -0
- package/dist/taro-components/p-7bb097de.js +1 -0
- package/dist/taro-components/p-7c455a65.entry.js +1 -0
- package/dist/taro-components/p-7ea32cac.js +1 -0
- package/dist/taro-components/p-806e3c4f.entry.js +1 -0
- package/dist/taro-components/p-80fa0c7c.entry.js +1 -0
- package/dist/taro-components/p-81abb053.entry.js +1 -0
- package/dist/taro-components/p-88048df9.entry.js +1 -0
- package/dist/taro-components/p-8837c166.entry.js +1 -0
- package/dist/taro-components/p-8b1b513a.js +1 -0
- package/dist/taro-components/p-8bc13e66.entry.js +1 -0
- package/dist/taro-components/p-8c520f1e.entry.js +1 -0
- package/dist/taro-components/p-8d26b600.js +1 -0
- package/dist/taro-components/{p-e62af250.entry.js → p-8d996705.js} +1 -1
- package/dist/taro-components/p-8e3bac82.js +1 -0
- package/dist/taro-components/p-8f2a4c66.entry.js +1 -0
- package/dist/taro-components/p-915aa78c.js +1 -0
- package/dist/taro-components/p-922047dd.entry.js +1 -0
- package/dist/taro-components/p-92a39ad9.entry.js +1 -0
- package/dist/taro-components/p-931bba41.entry.js +1 -0
- package/dist/taro-components/p-93e3cefb.js +1 -0
- package/dist/taro-components/p-956bc9d5.js +1 -0
- package/dist/taro-components/p-9581e63b.entry.js +1 -0
- package/dist/taro-components/p-96f65f1d.js +1 -0
- package/dist/taro-components/p-975f1b0c.entry.js +1 -0
- package/dist/taro-components/p-99383bc2.js +1 -0
- package/dist/taro-components/p-99863698.js +1 -0
- package/dist/taro-components/p-9a0251c5.entry.js +1 -0
- package/dist/taro-components/p-9d4a6732.js +1 -0
- package/dist/taro-components/p-9f953e69.entry.js +1 -0
- package/dist/taro-components/p-a0ff43d9.entry.js +1 -0
- package/dist/taro-components/p-a17695f9.js +1 -0
- package/dist/taro-components/p-a293fa24.js +1 -0
- package/dist/taro-components/p-a2cb2d73.js +1 -0
- package/dist/taro-components/p-a3b266d5.entry.js +1 -0
- package/dist/taro-components/p-a5798672.js +1 -0
- package/dist/taro-components/{p-31998393.entry.js → p-a6c178f3.js} +1 -1
- package/dist/taro-components/p-ab09cecf.entry.js +1 -0
- package/dist/taro-components/p-aca7aea1.entry.js +1 -0
- package/dist/taro-components/p-ad865966.entry.js +1 -0
- package/dist/taro-components/p-ae203a0b.entry.js +1 -0
- package/dist/taro-components/p-af5e0304.js +1 -0
- package/dist/taro-components/p-b19ea38d.entry.js +1 -0
- package/dist/taro-components/{p-bf71dd37.entry.js → p-b2979101.js} +1 -1
- package/dist/taro-components/p-b70027b2.entry.js +1 -0
- package/dist/taro-components/p-b74ad8e4.js +1 -0
- package/dist/taro-components/p-b89414d7.entry.js +1 -0
- package/dist/taro-components/p-b90499e4.entry.js +1 -0
- package/dist/taro-components/p-b9446784.js +1 -0
- package/dist/taro-components/p-baed3510.js +1 -0
- package/dist/taro-components/p-bcceaa84.entry.js +1 -0
- package/dist/taro-components/{p-ee17fc14.entry.js → p-bd7613d0.js} +1 -1
- package/dist/taro-components/{p-f2fb4988.entry.js → p-beae3fe0.js} +1 -1
- package/dist/taro-components/p-c0687b94.js +1 -0
- package/dist/taro-components/p-c09eb36f.entry.js +1 -0
- package/dist/taro-components/p-c3a8af99.js +1 -0
- package/dist/taro-components/p-c3cf4884.js +1 -0
- package/dist/taro-components/p-c3d39813.entry.js +1 -0
- package/dist/taro-components/p-c48b7222.js +1 -0
- package/dist/taro-components/p-c5666cb2.js +1 -0
- package/dist/taro-components/p-c5c71b89.entry.js +1 -0
- package/dist/taro-components/p-c66f2363.entry.js +1 -0
- package/dist/taro-components/{p-27392e58.entry.js → p-c7f9e228.js} +1 -1
- package/dist/taro-components/p-c84153ae.entry.js +1 -0
- package/dist/taro-components/p-c872ed50.js +1 -0
- package/dist/taro-components/p-c9a01a1f.js +1 -0
- package/dist/taro-components/{p-ca3322c9.entry.js → p-cae824d1.js} +1 -1
- package/dist/taro-components/p-cdeebf36.entry.js +1 -0
- package/dist/taro-components/p-d11af89d.js +1 -0
- package/dist/taro-components/{p-07864e09.entry.js → p-d1a1274a.js} +1 -1
- package/dist/taro-components/p-d45a75d9.entry.js +1 -0
- package/dist/taro-components/p-d5773721.js +1 -0
- package/dist/taro-components/p-d5f0d48c.js +1 -0
- package/dist/taro-components/p-d6be1ceb.entry.js +1 -0
- package/dist/taro-components/p-da4fcba5.js +1 -0
- package/dist/taro-components/p-dd0d7e20.js +1 -0
- package/dist/taro-components/p-df86c576.entry.js +1 -0
- package/dist/taro-components/p-e0de8e35.entry.js +1 -0
- package/dist/taro-components/p-e298a2c3.entry.js +1 -0
- package/dist/taro-components/p-e3de8581.js +1 -0
- package/dist/taro-components/p-e6565988.entry.js +1 -0
- package/dist/taro-components/p-e6643dc0.entry.js +1 -0
- package/dist/taro-components/p-e87d4a75.entry.js +1 -0
- package/dist/taro-components/p-ea5d6d41.entry.js +1 -0
- package/dist/taro-components/p-eac9f475.entry.js +1 -0
- package/dist/taro-components/p-edab4852.entry.js +1 -0
- package/dist/taro-components/p-ee9bae70.js +1 -0
- package/dist/taro-components/p-eee2d2f9.entry.js +1 -0
- package/dist/taro-components/p-f441b5e7.js +1 -0
- package/dist/taro-components/p-f52b25aa.entry.js +1 -0
- package/dist/taro-components/p-f57bed55.entry.js +1 -0
- package/dist/taro-components/p-f6e5beeb.js +1 -0
- package/dist/taro-components/p-fa398c76.entry.js +1 -0
- package/dist/taro-components/p-fe1c20a9.entry.js +1 -0
- package/dist/taro-components/p-febc484e.js +1 -0
- package/dist/taro-components/p-ffcacf9a.entry.js +1 -0
- package/dist/taro-components/p-fff1a810.js +1 -0
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/types/components/ad/index.d.ts +1 -0
- package/dist/types/components/ad-custom/index.d.ts +1 -0
- package/dist/types/components/animation-video/index.d.ts +1 -0
- package/dist/types/components/animation-view/index.d.ts +1 -0
- package/dist/types/components/ar-camera/index.d.ts +1 -0
- package/dist/types/components/audio/index.d.ts +1 -0
- package/dist/types/components/aweme-data/index.d.ts +1 -0
- package/dist/types/components/block/index.d.ts +1 -0
- package/dist/types/components/button/index.d.ts +1 -0
- package/dist/types/components/camera/index.d.ts +1 -0
- package/dist/types/components/canvas/index.d.ts +1 -0
- package/dist/types/components/channel-live/index.d.ts +1 -0
- package/dist/types/components/channel-video/index.d.ts +1 -0
- package/dist/types/components/checkbox/index.d.ts +2 -0
- package/dist/types/components/comment/index.d.ts +2 -0
- package/dist/types/components/contact-button/index.d.ts +1 -0
- package/dist/types/components/cover-image/index.d.ts +1 -0
- package/dist/types/components/cover-view/index.d.ts +1 -0
- package/dist/types/components/custom-wrapper/index.d.ts +1 -0
- package/dist/types/components/double-tap-gesture-handler/index.d.ts +1 -0
- package/dist/types/components/draggable-sheet/index.d.ts +1 -0
- package/dist/types/components/editor/index.d.ts +1 -0
- package/dist/types/components/follow-swan/index.d.ts +1 -0
- package/dist/types/components/force-press-gesture-handler/index.d.ts +1 -0
- package/dist/types/components/form/index.d.ts +1 -0
- package/dist/types/components/functional-page-navigator/index.d.ts +1 -0
- package/dist/types/components/grid-builder/index.d.ts +1 -0
- package/dist/types/components/grid-view/index.d.ts +1 -0
- package/dist/types/components/horizontal-drag-gesture-handler/index.d.ts +1 -0
- package/dist/types/components/icon/index.d.ts +1 -0
- package/dist/types/components/image/index.d.ts +1 -0
- package/dist/types/components/index.d.ts +87 -0
- package/dist/types/components/inline-payment-panel/index.d.ts +1 -0
- package/dist/types/components/input/index.d.ts +1 -0
- package/dist/types/components/keyboard-accessory/index.d.ts +1 -0
- package/dist/types/components/label/index.d.ts +1 -0
- package/dist/types/components/lifestyle/index.d.ts +1 -0
- package/dist/types/components/like/index.d.ts +1 -0
- package/dist/types/components/list-builder/index.d.ts +1 -0
- package/dist/types/components/list-view/index.d.ts +1 -0
- package/dist/types/components/live-player/index.d.ts +1 -0
- package/dist/types/components/live-pusher/index.d.ts +1 -0
- package/dist/types/components/login/index.d.ts +1 -0
- package/dist/types/components/long-press-gesture-handler/index.d.ts +1 -0
- package/dist/types/components/lottie/index.d.ts +1 -0
- package/dist/types/components/map/index.d.ts +1 -0
- package/dist/types/components/match-media/index.d.ts +1 -0
- package/dist/types/components/movable-area/index.d.ts +2 -0
- package/dist/types/components/navigation-bar/index.d.ts +1 -0
- package/dist/types/components/navigator/index.d.ts +1 -0
- package/dist/types/components/nested-scroll-body/index.d.ts +1 -0
- package/dist/types/components/nested-scroll-header/index.d.ts +1 -0
- package/dist/types/components/official-account/index.d.ts +1 -0
- package/dist/types/components/open-container/index.d.ts +1 -0
- package/dist/types/components/open-data/index.d.ts +1 -0
- package/dist/types/components/page-container/index.d.ts +1 -0
- package/dist/types/components/page-meta/index.d.ts +1 -0
- package/dist/types/components/pan-gesture-handler/index.d.ts +1 -0
- package/dist/types/components/picker/index.d.ts +2 -0
- package/dist/types/components/picker-view/index.d.ts +2 -0
- package/dist/types/components/progress/index.d.ts +1 -0
- package/dist/types/components/pull-to-refresh/index.d.ts +1 -0
- package/dist/types/components/radio/index.d.ts +2 -0
- package/dist/types/components/rich-text/index.d.ts +1 -0
- package/dist/types/components/root-portal/index.d.ts +1 -0
- package/dist/types/components/rtc-room/index.d.ts +2 -0
- package/dist/types/components/scale-gesture-handler/index.d.ts +1 -0
- package/dist/types/components/script/index.d.ts +1 -0
- package/dist/types/components/scroll-view/index.d.ts +1 -0
- package/dist/types/components/share-element/index.d.ts +1 -0
- package/dist/types/components/slider/index.d.ts +1 -0
- package/dist/types/components/slot/index.d.ts +2 -0
- package/dist/types/components/snapshot/index.d.ts +1 -0
- package/dist/types/components/span/index.d.ts +1 -0
- package/dist/types/components/sticky-header/index.d.ts +1 -0
- package/dist/types/components/sticky-section/index.d.ts +1 -0
- package/dist/types/components/swiper/index.d.ts +2 -0
- package/dist/types/components/switch/index.d.ts +1 -0
- package/dist/types/components/tabbar/index.d.ts +2 -0
- package/dist/types/components/tabs/index.d.ts +2 -0
- package/dist/types/components/tap-gesture-handler/index.d.ts +1 -0
- package/dist/types/components/text/index.d.ts +1 -0
- package/dist/types/components/textarea/index.d.ts +1 -0
- package/dist/types/components/vertical-drag-gesture-handler/index.d.ts +1 -0
- package/dist/types/components/video/index.d.ts +3 -0
- package/dist/types/components/view/index.d.ts +1 -0
- package/dist/types/components/voip-room/index.d.ts +1 -0
- package/dist/types/components/web-view/index.d.ts +1 -0
- package/dist/types/index.d.ts +1 -1
- package/package.json +5 -5
- package/dist/taro-components/p-00ba8330.entry.js +0 -1
- package/dist/taro-components/p-01285c99.entry.js +0 -1
- package/dist/taro-components/p-028a06be.entry.js +0 -1
- package/dist/taro-components/p-02dfd28a.entry.js +0 -1
- package/dist/taro-components/p-041adaea.entry.js +0 -1
- package/dist/taro-components/p-053f9336.entry.js +0 -1
- package/dist/taro-components/p-0adabf61.entry.js +0 -1
- package/dist/taro-components/p-0ea53611.entry.js +0 -1
- package/dist/taro-components/p-1524f0a7.entry.js +0 -1
- package/dist/taro-components/p-1c499e26.entry.js +0 -1
- package/dist/taro-components/p-1ce39dc0.entry.js +0 -1
- package/dist/taro-components/p-1e0c4a2f.entry.js +0 -1
- package/dist/taro-components/p-1e8b1d53.entry.js +0 -1
- package/dist/taro-components/p-262d3cc6.entry.js +0 -1
- package/dist/taro-components/p-27e67e4c.entry.js +0 -1
- package/dist/taro-components/p-2f681c42.entry.js +0 -1
- package/dist/taro-components/p-2f7ecf80.entry.js +0 -1
- package/dist/taro-components/p-349011e5.entry.js +0 -1
- package/dist/taro-components/p-37774f52.entry.js +0 -1
- package/dist/taro-components/p-3a0afbaa.entry.js +0 -1
- package/dist/taro-components/p-3aabc29c.entry.js +0 -1
- package/dist/taro-components/p-3fe35d51.entry.js +0 -1
- package/dist/taro-components/p-41d62a49.entry.js +0 -1
- package/dist/taro-components/p-452f2d23.entry.js +0 -1
- package/dist/taro-components/p-45415f8a.entry.js +0 -1
- package/dist/taro-components/p-4db97a66.entry.js +0 -1
- package/dist/taro-components/p-523197fa.entry.js +0 -1
- package/dist/taro-components/p-53f2859c.entry.js +0 -1
- package/dist/taro-components/p-553ab0f6.entry.js +0 -1
- package/dist/taro-components/p-589e0de6.entry.js +0 -1
- package/dist/taro-components/p-5e4fa085.entry.js +0 -1
- package/dist/taro-components/p-5efcb8c2.entry.js +0 -1
- package/dist/taro-components/p-5efe8af4.entry.js +0 -1
- package/dist/taro-components/p-64476900.entry.js +0 -1
- package/dist/taro-components/p-64eab0b1.entry.js +0 -1
- package/dist/taro-components/p-67c93469.entry.js +0 -1
- package/dist/taro-components/p-6c93f8b0.entry.js +0 -1
- package/dist/taro-components/p-716f9758.entry.js +0 -1
- package/dist/taro-components/p-72dc94f1.entry.js +0 -1
- package/dist/taro-components/p-763b130b.entry.js +0 -1
- package/dist/taro-components/p-79a3916f.entry.js +0 -1
- package/dist/taro-components/p-82699c7b.entry.js +0 -1
- package/dist/taro-components/p-9108e872.entry.js +0 -1
- package/dist/taro-components/p-96054089.entry.js +0 -1
- package/dist/taro-components/p-98ce7aae.entry.js +0 -1
- package/dist/taro-components/p-9b1d4fbc.entry.js +0 -1
- package/dist/taro-components/p-9cfe7bc7.entry.js +0 -1
- package/dist/taro-components/p-a4b9f9b8.entry.js +0 -1
- package/dist/taro-components/p-aabad1f7.entry.js +0 -1
- package/dist/taro-components/p-ac41c34a.entry.js +0 -1
- package/dist/taro-components/p-b4eb9ea9.entry.js +0 -1
- package/dist/taro-components/p-bd725f0c.entry.js +0 -1
- package/dist/taro-components/p-c27955cc.entry.js +0 -1
- package/dist/taro-components/p-c56d7ae1.entry.js +0 -1
- package/dist/taro-components/p-c7457e18.entry.js +0 -1
- package/dist/taro-components/p-c7e2387f.entry.js +0 -1
- package/dist/taro-components/p-c961a230.entry.js +0 -1
- package/dist/taro-components/p-ced965cb.entry.js +0 -1
- package/dist/taro-components/p-d638dd70.entry.js +0 -1
- package/dist/taro-components/p-d8a90cf1.entry.js +0 -1
- package/dist/taro-components/p-e13bf240.entry.js +0 -1
- package/dist/taro-components/p-e1975260.entry.js +0 -1
- package/dist/taro-components/p-e3354af8.entry.js +0 -1
- package/dist/taro-components/p-e5615469.entry.js +0 -1
- package/dist/taro-components/p-e6f1912a.entry.js +0 -1
- package/dist/taro-components/p-ea77d5fe.entry.js +0 -1
- package/dist/taro-components/p-eb1fe297.entry.js +0 -1
- package/dist/taro-components/p-ecd3afe8.entry.js +0 -1
- package/dist/taro-components/p-f3de0aa9.entry.js +0 -1
- package/dist/taro-components/p-f997a7a2.entry.js +0 -1
- package/dist/taro-components/p-fd0a7b45.entry.js +0 -1
- package/dist/taro-components/p-ffab09c1.entry.js +0 -1
|
@@ -0,0 +1,720 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-0004ce39.js';
|
|
2
|
+
import Taro from '@tarojs/taro';
|
|
3
|
+
import { c as classnames } from './index-b9522531.js';
|
|
4
|
+
import { t as throttle } from './index-a00a7418.js';
|
|
5
|
+
|
|
6
|
+
const formatTime = (time) => {
|
|
7
|
+
if (!time)
|
|
8
|
+
return '';
|
|
9
|
+
const sec = Math.round(time % 60);
|
|
10
|
+
const min = Math.round((time - sec) / 60);
|
|
11
|
+
return `${min < 10 ? `0${min}` : min}:${sec < 10 ? `0${sec}` : sec}`;
|
|
12
|
+
};
|
|
13
|
+
const calcDist = (x, y) => {
|
|
14
|
+
return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));
|
|
15
|
+
};
|
|
16
|
+
const normalizeNumber = (number) => {
|
|
17
|
+
return Math.max(-1, Math.min(number, 1));
|
|
18
|
+
};
|
|
19
|
+
let scene = 'default';
|
|
20
|
+
const screenFn = (function () {
|
|
21
|
+
let val;
|
|
22
|
+
const fnMap = [
|
|
23
|
+
[
|
|
24
|
+
'requestFullscreen',
|
|
25
|
+
'exitFullscreen',
|
|
26
|
+
'fullscreenElement',
|
|
27
|
+
'fullscreenEnabled',
|
|
28
|
+
'fullscreenchange',
|
|
29
|
+
'fullscreenerror'
|
|
30
|
+
],
|
|
31
|
+
// New WebKit
|
|
32
|
+
[
|
|
33
|
+
'webkitRequestFullscreen',
|
|
34
|
+
'webkitExitFullscreen',
|
|
35
|
+
'webkitFullscreenElement',
|
|
36
|
+
'webkitFullscreenEnabled',
|
|
37
|
+
'webkitfullscreenchange',
|
|
38
|
+
'webkitfullscreenerror'
|
|
39
|
+
],
|
|
40
|
+
// Old WebKit
|
|
41
|
+
[
|
|
42
|
+
'webkitRequestFullScreen',
|
|
43
|
+
'webkitCancelFullScreen',
|
|
44
|
+
'webkitCurrentFullScreenElement',
|
|
45
|
+
'webkitCancelFullScreen',
|
|
46
|
+
'webkitfullscreenchange',
|
|
47
|
+
'webkitfullscreenerror'
|
|
48
|
+
],
|
|
49
|
+
[
|
|
50
|
+
'mozRequestFullScreen',
|
|
51
|
+
'mozCancelFullScreen',
|
|
52
|
+
'mozFullScreenElement',
|
|
53
|
+
'mozFullScreenEnabled',
|
|
54
|
+
'mozfullscreenchange',
|
|
55
|
+
'mozfullscreenerror'
|
|
56
|
+
],
|
|
57
|
+
[
|
|
58
|
+
'msRequestFullscreen',
|
|
59
|
+
'msExitFullscreen',
|
|
60
|
+
'msFullscreenElement',
|
|
61
|
+
'msFullscreenEnabled',
|
|
62
|
+
'MSFullscreenChange',
|
|
63
|
+
'MSFullscreenError'
|
|
64
|
+
]
|
|
65
|
+
];
|
|
66
|
+
var defaultIOSMap = [
|
|
67
|
+
'webkitEnterFullscreen',
|
|
68
|
+
'webkitExitFullscreen',
|
|
69
|
+
'webkitCurrentFullScreenElement',
|
|
70
|
+
'webkitSupportsFullscreen',
|
|
71
|
+
'fullscreenchange',
|
|
72
|
+
'fullscreenerror'
|
|
73
|
+
];
|
|
74
|
+
let i = 0;
|
|
75
|
+
const l = fnMap.length;
|
|
76
|
+
const ret = {};
|
|
77
|
+
// This for loop essentially checks the current document object for the property/methods above.
|
|
78
|
+
for (; i < l; i++) {
|
|
79
|
+
val = fnMap[i];
|
|
80
|
+
if (val && val[1] in document) {
|
|
81
|
+
for (i = 0; i < val.length; i++) {
|
|
82
|
+
ret[fnMap[0][i]] = val[i];
|
|
83
|
+
}
|
|
84
|
+
return ret;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
if (!ret[fnMap[0][0]]) {
|
|
88
|
+
scene = 'iOS';
|
|
89
|
+
// when there is no any APIs be set.
|
|
90
|
+
// In IOS, there is no 'webkitEnterFullscreen' property `in document` but video can use it for fullscreen.
|
|
91
|
+
// ref: https://developer.apple.com/documentation/webkitjs/htmlvideoelement/1633500-webkitenterfullscreen
|
|
92
|
+
for (i = 0; i < defaultIOSMap.length; i++) {
|
|
93
|
+
ret[fnMap[0][i]] = defaultIOSMap[i];
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
// If it doesn't find any of them, this whole function returns {}
|
|
97
|
+
// and the fn variable is set to this returned value.
|
|
98
|
+
return ret;
|
|
99
|
+
})();
|
|
100
|
+
const isHls = url => /\.(m3u8)($|\?)/i.test(url);
|
|
101
|
+
|
|
102
|
+
const VideoControl = class {
|
|
103
|
+
constructor(hostRef) {
|
|
104
|
+
registerInstance(this, hostRef);
|
|
105
|
+
this.visible = false;
|
|
106
|
+
this.isDraggingProgressBall = false;
|
|
107
|
+
this.percentage = 0;
|
|
108
|
+
this.progressDimensions = {
|
|
109
|
+
left: 0,
|
|
110
|
+
width: 0
|
|
111
|
+
};
|
|
112
|
+
this.calcPercentage = (pageX) => {
|
|
113
|
+
let pos = pageX - this.progressDimensions.left;
|
|
114
|
+
pos = Math.max(pos, 0);
|
|
115
|
+
pos = Math.min(pos, this.progressDimensions.width);
|
|
116
|
+
return pos / this.progressDimensions.width;
|
|
117
|
+
};
|
|
118
|
+
this.onDragProgressBallStart = () => {
|
|
119
|
+
this.isDraggingProgressBall = true;
|
|
120
|
+
this.hideControlsTimer && clearTimeout(this.hideControlsTimer);
|
|
121
|
+
};
|
|
122
|
+
this.onClickProgress = (e) => {
|
|
123
|
+
e.stopPropagation();
|
|
124
|
+
const percentage = this.calcPercentage(e.pageX);
|
|
125
|
+
this.seekFunc(percentage * this.duration);
|
|
126
|
+
this.toggleVisibility(true);
|
|
127
|
+
};
|
|
128
|
+
this.controls = undefined;
|
|
129
|
+
this.currentTime = undefined;
|
|
130
|
+
this.duration = undefined;
|
|
131
|
+
this.isPlaying = undefined;
|
|
132
|
+
this.pauseFunc = undefined;
|
|
133
|
+
this.playFunc = undefined;
|
|
134
|
+
this.seekFunc = undefined;
|
|
135
|
+
this.showPlayBtn = undefined;
|
|
136
|
+
this.showProgress = undefined;
|
|
137
|
+
}
|
|
138
|
+
onDocumentTouchMove(e) {
|
|
139
|
+
if (!this.isDraggingProgressBall)
|
|
140
|
+
return;
|
|
141
|
+
const touchX = e.touches[0].pageX;
|
|
142
|
+
this.percentage = this.calcPercentage(touchX);
|
|
143
|
+
this.setProgressBall(this.percentage);
|
|
144
|
+
this.setCurrentTime(this.percentage * this.duration);
|
|
145
|
+
}
|
|
146
|
+
onDocumentTouchEnd() {
|
|
147
|
+
if (!this.isDraggingProgressBall)
|
|
148
|
+
return;
|
|
149
|
+
this.isDraggingProgressBall = false;
|
|
150
|
+
this.seekFunc(this.percentage * this.duration);
|
|
151
|
+
this.toggleVisibility(true);
|
|
152
|
+
}
|
|
153
|
+
async setProgressBall(percentage) {
|
|
154
|
+
if (this.progressBallRef) {
|
|
155
|
+
this.progressBallRef.style.left = `${percentage * 100}%`;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
async toggleVisibility(nextVisible) {
|
|
159
|
+
const visible = nextVisible === undefined ? !this.visible : nextVisible;
|
|
160
|
+
if (visible) {
|
|
161
|
+
this.hideControlsTimer && clearTimeout(this.hideControlsTimer);
|
|
162
|
+
if (this.isPlaying) {
|
|
163
|
+
this.hideControlsTimer = setTimeout(() => {
|
|
164
|
+
this.toggleVisibility(false);
|
|
165
|
+
}, 2000);
|
|
166
|
+
}
|
|
167
|
+
this.el.style.visibility = 'visible';
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
this.el.style.visibility = 'hidden';
|
|
171
|
+
}
|
|
172
|
+
this.visible = !!visible;
|
|
173
|
+
}
|
|
174
|
+
async getIsDraggingProgressBall() {
|
|
175
|
+
return this.isDraggingProgressBall;
|
|
176
|
+
}
|
|
177
|
+
async setCurrentTime(time) {
|
|
178
|
+
this.currentTimeRef.innerHTML = formatTime(time);
|
|
179
|
+
}
|
|
180
|
+
render() {
|
|
181
|
+
const { controls, currentTime, duration, isPlaying, pauseFunc, playFunc, showPlayBtn, showProgress } = this;
|
|
182
|
+
const formattedDuration = formatTime(duration);
|
|
183
|
+
let playBtn;
|
|
184
|
+
if (!showPlayBtn) {
|
|
185
|
+
playBtn = null;
|
|
186
|
+
}
|
|
187
|
+
else if (isPlaying) {
|
|
188
|
+
playBtn = h("div", { class: 'taro-video-control-button taro-video-control-button-pause', onClick: pauseFunc });
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
playBtn = h("div", { class: 'taro-video-control-button taro-video-control-button-play', onClick: playFunc });
|
|
192
|
+
}
|
|
193
|
+
return (h(Host, { class: 'taro-video-bar taro-video-bar-full' }, controls && (h("div", { class: 'taro-video-controls' }, playBtn, showProgress && (h("div", { class: 'taro-video-current-time', ref: dom => (this.currentTimeRef = dom) }, formatTime(currentTime))), showProgress && (h("div", { class: 'taro-video-progress-container', onClick: this.onClickProgress }, h("div", { class: 'taro-video-progress', ref: ref => {
|
|
194
|
+
if (!ref)
|
|
195
|
+
return;
|
|
196
|
+
const rect = ref.getBoundingClientRect();
|
|
197
|
+
this.progressDimensions.left = rect.left;
|
|
198
|
+
this.progressDimensions.width = rect.width;
|
|
199
|
+
} }, h("div", { class: 'taro-video-progress-buffered', style: { width: '100%' } }), h("div", { class: 'taro-video-ball', ref: dom => (this.progressBallRef = dom), onTouchStart: this.onDragProgressBallStart, style: {
|
|
200
|
+
left: `${formattedDuration ? (this.currentTime / duration) * 100 : 0}%`
|
|
201
|
+
} }, h("div", { class: 'taro-video-inner' }))))), showProgress && h("div", { class: 'taro-video-duration' }, formattedDuration))), h("slot", null)));
|
|
202
|
+
}
|
|
203
|
+
get el() { return getElement(this); }
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
const VideoDanmu = class {
|
|
207
|
+
constructor(hostRef) {
|
|
208
|
+
registerInstance(this, hostRef);
|
|
209
|
+
this.list = [];
|
|
210
|
+
this.danmuElList = [];
|
|
211
|
+
this.currentTime = 0;
|
|
212
|
+
this.enable = false;
|
|
213
|
+
this.danmuList = [];
|
|
214
|
+
}
|
|
215
|
+
ensureProperties(danmu) {
|
|
216
|
+
const clonedDanmu = Object.assign({}, danmu);
|
|
217
|
+
if (!('time' in danmu)) {
|
|
218
|
+
clonedDanmu.time = this.currentTime;
|
|
219
|
+
}
|
|
220
|
+
clonedDanmu.key = Math.random();
|
|
221
|
+
clonedDanmu.bottom = `${Math.random() * 90 + 5}%`;
|
|
222
|
+
return clonedDanmu;
|
|
223
|
+
}
|
|
224
|
+
async sendDanmu(danmuList = []) {
|
|
225
|
+
if (Array.isArray(danmuList)) {
|
|
226
|
+
this.list = [
|
|
227
|
+
...this.list,
|
|
228
|
+
...danmuList.map(danmu => this.ensureProperties(danmu))
|
|
229
|
+
];
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
const danmu = danmuList;
|
|
233
|
+
this.list = [
|
|
234
|
+
...this.list,
|
|
235
|
+
Object.assign({}, this.ensureProperties(danmu))
|
|
236
|
+
];
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
async tick(currentTime) {
|
|
240
|
+
this.currentTime = currentTime;
|
|
241
|
+
if (!this.enable)
|
|
242
|
+
return;
|
|
243
|
+
const danmuList = this.list;
|
|
244
|
+
/**
|
|
245
|
+
* @todo 这个判断对拖拽进度的处理不严谨
|
|
246
|
+
*/
|
|
247
|
+
const newDanmuList = danmuList.filter(({ time }) => {
|
|
248
|
+
return currentTime - time < 4 && currentTime > time;
|
|
249
|
+
});
|
|
250
|
+
let shouldUpdate = false;
|
|
251
|
+
const oldDanmuList = this.danmuList;
|
|
252
|
+
if (newDanmuList.length !== oldDanmuList.length) {
|
|
253
|
+
shouldUpdate = true;
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
shouldUpdate = newDanmuList.some(({ key }) => {
|
|
257
|
+
return oldDanmuList.every((danmu) => {
|
|
258
|
+
return key !== danmu.key;
|
|
259
|
+
});
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
if (shouldUpdate) {
|
|
263
|
+
this.danmuList = newDanmuList;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
componentDidUpdate() {
|
|
267
|
+
requestAnimationFrame(() => {
|
|
268
|
+
setTimeout(() => {
|
|
269
|
+
const danmuElList = this.danmuElList.splice(0);
|
|
270
|
+
danmuElList.forEach(danmu => {
|
|
271
|
+
danmu.style.left = '0';
|
|
272
|
+
danmu.style.webkitTransform = 'translateX(-100%)';
|
|
273
|
+
danmu.style.transform = 'translateX(-100%)';
|
|
274
|
+
});
|
|
275
|
+
});
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
render() {
|
|
279
|
+
if (!this.enable)
|
|
280
|
+
return '';
|
|
281
|
+
return (h(Host, { class: 'taro-video-danmu' }, this.danmuList.map(({ text, color, bottom, key }) => (h("p", { class: 'taro-video-danmu-item', key: key, style: {
|
|
282
|
+
color,
|
|
283
|
+
bottom
|
|
284
|
+
}, ref: ref => {
|
|
285
|
+
if (ref) {
|
|
286
|
+
this.danmuElList.push(ref);
|
|
287
|
+
}
|
|
288
|
+
} }, text)))));
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
const indexCss = ".taro-video{width:100%;height:225px;line-height:0;display:inline-block;position:relative;overflow:hidden}.taro-video[hidden]{display:none}.taro-video-container{object-position:inherit;background-color:#000;width:100%;height:100%;display:inline-block;position:absolute;top:0;left:0}.taro-video-container.taro-video-type-fullscreen{z-index:999;position:fixed;inset:0}.taro-video-container.taro-video-type-fullscreen.taro-video-type-rotate-left{transform:translate(-50%,-50%)rotate(-90deg)}.taro-video-container.taro-video-type-fullscreen.taro-video-type-rotate-right{transform:translate(-50%,-50%)rotate(90deg)}.taro-video-video{object-position:inherit;width:100%;height:100%;display:block}.taro-video-cover{z-index:1;background-color:rgba(1,1,1,.5);-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-align:center;-webkit-box-pack:center;justify-content:center;align-items:center;width:100%;display:flex;position:absolute;top:0;bottom:0;left:0}.taro-video-cover-play-button{background-position:50%;background-repeat:no-repeat;background-size:50%;width:40px;height:40px}.taro-video-cover-duration{color:#fff;margin-top:10px;font-size:16px;line-height:1}.taro-video-bar{visibility:hidden;z-index:1;background-color:rgba(0,0,0,.5);-webkit-box-align:center;align-items:center;height:44px;padding:0 10px;display:flex;position:absolute;bottom:0;right:0;overflow:hidden}.taro-video-bar.taro-video-bar-full{left:0}.taro-video-controls{-webkit-box-flex:1;flex-grow:1;margin:0 8.5px;display:flex}.taro-video-control-button{box-sizing:content-box;width:13px;height:15px;margin-left:-8.5px;padding:14.5px 12.5px}.taro-video-control-button:after{content:\"\";background-position:50%;background-repeat:no-repeat;background-size:100%;width:100%;height:100%;display:block}.taro-video-control-button.taro-video-control-button-play:after,.taro-video-cover-play-button{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAeCAYAAAAy2w7YAAAAAXNSR0IArs4c6QAAAWhJREFUSA1j+P///0cgBoHjQGzCQCsAtgJB/AMy5wCxGNXtQ9iBwvoA5BUCMQvVLEQxHpNzDSjkRhXLMM3GKrIeKKpEkYVYjcUu+AMo3ALE3GRZiN1MvKKPgbIRJFuG10j8koeA0gZEW4jfLIKyf4EqpgOxMEELCRpFnIJ3QGU5QMyM00LizCFa1SWgSkeslhFtBGkKVwGVy6FYSJp+klR/A6quB2JOkIWMIK0oNlOf8xBoZDE9LAI7nYn6HsBq4l96WHQEaLUpAyiOaASeAM2NgvuPBpaACt82IEYtfKls0UagecpwXyAzqGTRdaA57sjmYrAptAjUsCkGYlYMg9EFyLQI1IiZB8Ti6Obh5JNh0QmgHlOcBuKSIMGi50C18UDMiMssvOJEWPQLqKYbiHnxGkRIkoBF24DyaoTMIEoeh0W3geI+RBlArCI0iz4D+RVAzEasfqLVAQ19AcSg5LoYiKWI1kiiQgCMBLnEEcfDSgAAAABJRU5ErkJggg==)}.taro-video-control-button.taro-video-control-button-pause:after{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAgCAYAAAAffCjxAAAAAXNSR0IArs4c6QAAAFlJREFUSA3tksEKACAIQ7X//5zq98wOgQayum8QaGweHhMzG/6OujzKAymn+0LMqivu1XznWmX8/echTIyMyAgTwA72iIwwAexgj8gIE8CO3aMRbDPMaEy5BRGaKcZv8YxRAAAAAElFTkSuQmCC)}.taro-video-current-time,.taro-video-duration{color:#cbcbcb;height:14.5px;margin-top:15px;margin-bottom:14.5px;font-size:12px;line-height:14.5px}.taro-video-progress-container{-webkit-box-flex:2;flex-grow:2;position:relative}.taro-video-progress{background-color:rgba(255,255,255,.4);height:2px;margin:21px 12px;position:relative}.taro-video-progress-buffered{background-color:rgba(255,255,255,.8);width:0;height:100%;transition:width .1s;position:absolute;top:0;left:0}.taro-video-ball{box-sizing:content-box;width:16px;height:16px;margin-left:-22px;padding:14px;position:absolute;top:-21px;left:0}.taro-video-inner{background-color:#fff;border-radius:50%;width:100%;height:100%}.taro-video-danmu-button{color:#fff;white-space:nowrap;border:1px solid #fff;border-radius:5px;margin:0 8.5px;padding:2px 10px;font-size:13px;line-height:1}.taro-video-danmu-button.taro-video-danmu-button-active{color:#48c23d;border-color:#48c23d}.taro-video-fullscreen,.taro-video-mute{box-sizing:content-box;background-position:50%;background-repeat:no-repeat;background-size:50%;width:17px;height:17px;padding:8.5px}.taro-video-fullscreen{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAhUlEQVRYR+2WSwrAMAhEnZO3PfmULLooGEFTiIXJ2s/kRY2wzQeb85sE9CRA8jSzY1YfAFzhJBnU1AVgxH2dSiArCnD9QgGzRNnOech48SRABHoSyFb5in3PSbhyo6yvCPQkEM3u7BsPe/0FIvBfAh/vhKmVbO9SWun1qk/PSVi9TcVPBG6R1YIhgWwNpQAAAABJRU5ErkJggg==)}.taro-video-fullscreen.taro-video-type-fullscreen{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABPUlEQVRYR+2Xu0pDURBF1/ZLxNcHKNiIlfhA7C0UBSEE8RNEBNFPUEQEEbGxFiSSSrCwEHsf5E/ccsSUuWfUhKQ40947+y42Z8+ZK/pcinzf9hhwD1xJ2q/qsb0JHAOzkl5y+lGAGnCWICQtZgAS6DxQk3TeLYA6cAo0JSXxjmW7CcwBdUkJurKiDhSA4kBvHbA9CqwBQx2O7BSw8ssU3ALPFRF4knT3nQLbr8B4LjLBOdAAFgJaLUkjbYC9n+zm+i4kXWbmwCqwnRMCHiXthuZAQOzPrxSA4kBxYDAcsH0EzATCfCLpJjOINoCtgFZabg7bk7AFDAeaGpKWgitZTu5N0kQbYBmYrujo9mX0CVxL+gidAdu9vY5zXhWA4sAgOND3X7NJ4AHYCaxkB8B62gslvecSFpoDOZH/PP8Cnt7hIaM5xCEAAAAASUVORK5CYII=)}.taro-video-mute{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAGAGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDAgNzkuMTYwNDUxLCAyMDE3LzA1LzA2LTAxOjA4OjIxICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoTWFjaW50b3NoKSIgeG1wOkNyZWF0ZURhdGU9IjIwMTktMDQtMTFUMTA6MTg6MjArMDg6MDAiIHhtcDpNb2RpZnlEYXRlPSIyMDE5LTA0LTExVDEwOjIyOjIyKzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDE5LTA0LTExVDEwOjIyOjIyKzA4OjAwIiBkYzpmb3JtYXQ9ImltYWdlL3BuZyIgcGhvdG9zaG9wOkNvbG9yTW9kZT0iMyIgcGhvdG9zaG9wOklDQ1Byb2ZpbGU9InNSR0IgSUVDNjE5NjYtMi4xIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjk3YmE4Yjg0LTFhNTYtNGM1MS04NDVkLTNiZmYyMGI0ZDc0ZiIgeG1wTU06RG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjg1NGQ3MjlkLWUwNjctZjU0OC1hMTlhLTBlZjQ4OGRkYjJiOSIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOjA1ODY3ZDFlLWQ3NGEtNDgyNC04MDU3LTYzYmRmMTdjODk5ZSI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6MDU4NjdkMWUtZDc0YS00ODI0LTgwNTctNjNiZGYxN2M4OTllIiBzdEV2dDp3aGVuPSIyMDE5LTA0LTExVDEwOjE4OjIwKzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoTWFjaW50b3NoKSIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6OTdiYThiODQtMWE1Ni00YzUxLTg0NWQtM2JmZjIwYjRkNzRmIiBzdEV2dDp3aGVuPSIyMDE5LTA0LTExVDEwOjIyOjIyKzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoTWFjaW50b3NoKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz459+FoAAABqElEQVRYhc2XPWsVQRSGnxPjF4oGRfxoRQKGWCU2Ft7CykrQWosEyf/If0hhIPgHDEmbNJZqCFxiQEgTUGxsBUVEHgvnyrjZZJO92V1fGIaZnTPvszPszNlQ6VIjnbr/DwCoDLMNak/dUVfUK0f2rQugnlcX/FevWgFQH6gf3autRgHUC+piiXHzAOmtPx9gXgug8itQx9SXwDpw47AGKXZWvXvQmNFCwE3gCXA2dY0Az4GrRzHONA9cU/vAbERsllEOyh31e8USV2mrMPdG9uyn+rDom2/BHHCm5puWKiKmgdtAnz+rvaxO5mNygEvHaZ5BfADuARvAaWBpP4DGFBHfgBngFzClTrUKkCDeA+9S837rAEnbqb7VFcCpVJ/oCmCw959aB1AfAROpudYqgDoOLKRmPyLelAF8bcD4pPoMeAtcB34AT4uDBqXXwFG8XXUU/72MIuK1OgE8Bs6l7mEvo8up7lN1Ge0n9aK6VHMFZvJTr9S3CiALaCQhqZOSvegMIAvu2UVSWpigLC1fbQ0gm6in7qpfLCQbhwGIYcyPQ53/G3YO8BtUtd35bvKcVwAAAABJRU5ErkJggg==)}.taro-video-mute.taro-video-type-mute{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAgCAYAAAB3j6rJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGAGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDAgNzkuMTYwNDUxLCAyMDE3LzA1LzA2LTAxOjA4OjIxICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoTWFjaW50b3NoKSIgeG1wOkNyZWF0ZURhdGU9IjIwMTktMDQtMTFUMTA6MTk6MDMrMDg6MDAiIHhtcDpNb2RpZnlEYXRlPSIyMDE5LTA0LTExVDEwOjIyOjMzKzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDE5LTA0LTExVDEwOjIyOjMzKzA4OjAwIiBkYzpmb3JtYXQ9ImltYWdlL3BuZyIgcGhvdG9zaG9wOkNvbG9yTW9kZT0iMyIgcGhvdG9zaG9wOklDQ1Byb2ZpbGU9InNSR0IgSUVDNjE5NjYtMi4xIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjAzYjJmNjE2LTZmZTUtNDJjNC1iNTgwLTczNzZjZjI2NzdmNSIgeG1wTU06RG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjYzZjQ2NTYzLWE0ZjktOGQ0Mi1hM2FhLTY3ODJhNDBhYWNjMSIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOjIyYWNjMWFlLTg4ZmMtNDBlZi1iMWM1LTNmODgwY2QzYWI2MiI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6MjJhY2MxYWUtODhmYy00MGVmLWIxYzUtM2Y4ODBjZDNhYjYyIiBzdEV2dDp3aGVuPSIyMDE5LTA0LTExVDEwOjE5OjAzKzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoTWFjaW50b3NoKSIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6MDNiMmY2MTYtNmZlNS00MmM0LWI1ODAtNzM3NmNmMjY3N2Y1IiBzdEV2dDp3aGVuPSIyMDE5LTA0LTExVDEwOjIyOjMzKzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoTWFjaW50b3NoKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5PmxYVAAACLklEQVRYhc2XP2sVQRRHz40hKoqaQgVBCy1EozFlGiVFxMLGh4piYWEh+hkEP4YKAVFEEFTyughaCH6DqIVpAhYWEgIxoJE8cywyi5tNHu/tJmvyg2WZO3dmzt47/zZUtoJ6Nhsg09YDiYhKDzACTAFNYH9lEpUq80TdrT5wpV5n/ZV9KoGoo+pXV2uyKkipOaLuUceAt8DhUvQd1FsCYhR4ChzaSIBMHSOi7lOfsByFWiCgEBH1GHAF2JlMPcBt4GC3HUYEaj9wF3gVEVPtfNVTwAXgWX7CDKq/1piAZTSZBmim8qJ6sQ3EgDqb/L7kU3MH2NHtl3dQX3r3Ak21UYAYAj4A/cl0JB+RF+uMRj4iQ+p8zt7KYFLdXKHuRi0gacBhV6a6pd5bA6KRNagFJPU9qv5u47toLmW1HnoR8Q5oAK1CVQu4FBHj/wUkaXsb+4pzpVaQFPqXrN7Be4Fx9VztIOr1BLEtmX4A94E/qdwHTKjDWYM6lu81dSlnn3V570BtuLxaMs2rZ/IgYxsBovaoPwsQA4VoFWEm8ql5DiysNyURsQTMpOIMcDYiPhd8xoGr/FtNC2G6FKXD6ihwGdiVHMoeeh8jYlA9ANwE3kTEp3bO6vE03qOONzR1r/q4RGrquaFFxFxE3ALOA9+6jExpdb180y55AhirhaRTatq0GXEzL8+ZIuI9cBJ4WKiartJf9nWV/mty7UfUafW7erpqRGI9EBuprffvu9n6C1KOmsqwI5A1AAAAAElFTkSuQmCC)}.taro-video-danmu{width:100%;margin-top:14px;margin-bottom:44px;font-size:14px;line-height:14px;position:absolute;top:0;bottom:0;left:0;overflow:visible}.taro-video-danmu-item{color:#fff;white-space:nowrap;line-height:1;transition-property:left,transform;transition-duration:3s;transition-timing-function:linear;position:absolute;left:100%;transform:translate(0)}.taro-video-toast{visibility:hidden;pointer-events:none;color:#000;background-color:rgba(255,255,255,.8);border-radius:5px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.taro-video-toast.taro-video-toast-volume{width:100px;height:100px;display:block}.taro-video-toast-volume .taro-video-toast-title{text-align:center;width:100%;margin-top:10px;font-size:12px;line-height:16px;display:block}.taro-video-toast-volume .taro-video-toast-icon{fill:#000;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAFhklEQVR4Xu2aeaxfQxTHP1VBES0NIQitWtpaaxeCUkQtaYVa0tiClAq1ExIiQTVppaWxt8RWSa2tWkJQRGgtQaSIpUKEpG0ssbbk28yV2+mZO/e9e3vvu/e98897mZnfzPl+75mZs0wvurn06ub46SGgxwLqZaA3sB/wO/A+8G/V6tS5BU4BJgJbO9DvAMOB36okoQ4CNgAeBEYbQK8Bbm4zAdsBc4EdAyA/APZoKwHHAA8DG2UA/AnYrG0ErAVcD1yXA9gfQJ8c40obsqbPgH7AY8CROTVuFQFD3X7fJid4DWsNAWOAGZ0w58YTsDZwKzChA189PbTRBGwKzAYO6iT4srbAMHfTfAksjulS1iG4JzAH2Dy2YKS/qAVcCdzi1vgZOBZ4PWvNGAG6wgYCW0IwctzNmf06BcEXtYABwOeA4otEfgEOdnGGqV6IAAUopwM6zDYuAVjeKYpYwCjgCWOhH513+b2lhE+Avrj89NPyalzyuCIE6EN9BfQ1dHoPOAD40+9LE6D/5aoqSqtLsgiQC60DTiHzfGCFoaSsQAexZdlTgEuyCDgLuK8u5G7dEAHyKN8CBrtxLwDHAX8Z+l4N3GS0L3db4aN0X5opmc+2XZQAfb2LPd2eciG1lUSRJZ9qYHkZONwiYAjwSc3gs24BXWWWfzEVuMjQez13HljX8v7A28lvEgsInaBVcxLaAvr6sgJLtBWeNTrOB+4w2p8DRvoEnAPcXTVaY70QAbrbXwIONX7zBSAL/tvrk1+iviTllnRry2irr/QSEws4D7izCxMg1XQLLAQGGXpeCkw22kOWI49RMUujCJC+uwAfGtfcImAng4AtAMsBeg04pIkESOfbgQsMsNoGnxrtSrfv7rXrSlwXWN6kLZBgEBiB8iWUUZZPIN/AF1nMoiYSICDfAlt5iB4CxhpAzwXuMtqPBuY1lYB5wFEeqFeAwwyguvIUqvuiQO/xphJwP3Cmhyh0EKrOoGDIF7n+M5pKwEwXrqdBCaQSM77Ig7SSIicDs5pKwIvACA+pzFwZIF9OlKm36QyQV7jEqDDJk5VD58uFgGIGX1Se+6yJFqAKsqI6X84GdDb4Mh0Y5zUqjFYFakUTCXja5QLSmBQHbAL8ahAgT1AeYVreSKLLphGwF/CuAfLJQLldGSTFD75c5d4mNCoWyAqG9gYWGED1AOMKo12ZbiWA/idA++deY2DVTZ0Jh5UJPsFQtD/wDaAHGWl5EzgwaUi2gK4UXS11S0cTIjrMFBtYQdAk4DID0BnAAz4B6wNLgTKKG0VIDBHwqitwpOcW+OOB540FdeipNKbUWFrUtn06o5xOij4KyDuqU0IE3Obl/rLA63pTzm9XA8jKACjdniZAaSKFmUpB1yUhAlTsUEpMh913wEkuTe7rKTzPAHqO44vpKPkFhH3cWWBVV6ogJVYZUgz/tXtIYelzI3Ct0fExIGx6j7iKWBUUveyYBehv1RIjIEsfqziq8Xp4pSBJOYTVJFQcVY3wCFeKUjVGyYfQWB00+5bEVBECrNS+qsOKBpVHNCVWHs+LS7H5PV5pOu9v0+OKEOAXR39w1e1C7wM6AkJ1eLmkRcrpRQiQrqobXO5S3vL3/4kBKMsCknV0k+iasVLUMV3UX5SAPGtED8EOT+L9YENnCasUIXNO2goChFWHqAIRyxXN4qI1BCQg9dJESYq8LnbrCBAR8t50Lig6i0krCRBoVWhVlt45wkBrCRBuRZyPuAguxIPe9lXqhpd9DcZMXOvdkPF0Xu/8dohNUmZ/1QQkuitXr+d4fryuFx3jywQYm6suAqSX8vLTXKJDt4QqO6rtLYspXWZ/nQQkOJTAUJZGIav19q9MvKvN1RUIWKMAY5P3EBBjqO393d4C/gMVHwRQlpx21QAAAABJRU5ErkJggg==);background-position:50%;background-repeat:no-repeat;background-size:50%;width:50%;height:50%;margin-left:25%;display:block}.taro-video-toast-volume .taro-video-toast-value{width:80px;height:5px;margin-top:5px;margin-left:10px}.taro-video-toast-volume .taro-video-toast-value>.taro-video-toast-value-content{overflow:hidden}.taro-video-toast-volume-grids{width:80px;height:5px}.taro-video-toast-volume-grids-item{float:left;background-color:#000;width:7.1px;height:5px}.taro-video-toast-volume-grids-item:not(:first-child){margin-left:1px}.taro-video-toast.taro-video-toast-progress{color:#fff;background-color:rgba(0,0,0,.8);padding:6px;font-size:14px;line-height:18px}";
|
|
293
|
+
|
|
294
|
+
const Video = class {
|
|
295
|
+
constructor(hostRef) {
|
|
296
|
+
registerInstance(this, hostRef);
|
|
297
|
+
this.onPlay = createEvent(this, "play", 7);
|
|
298
|
+
this.onPause = createEvent(this, "pause", 7);
|
|
299
|
+
this.onEnded = createEvent(this, "ended", 7);
|
|
300
|
+
this.onTimeUpdate = createEvent(this, "timeupdate", 7);
|
|
301
|
+
this.onError = createEvent(this, "error", 7);
|
|
302
|
+
this.onFullScreenChange = createEvent(this, "fullscreenchange", 7);
|
|
303
|
+
this.onProgress = createEvent(this, "progress", 7);
|
|
304
|
+
this.onLoadedMetaData = createEvent(this, "loadedmetadata", 7);
|
|
305
|
+
this.currentTime = 0;
|
|
306
|
+
this.isDraggingProgress = false;
|
|
307
|
+
this.gestureType = 'none';
|
|
308
|
+
this.analyzeGesture = (e) => {
|
|
309
|
+
var _a;
|
|
310
|
+
const obj = {
|
|
311
|
+
type: 'none'
|
|
312
|
+
};
|
|
313
|
+
const nowX = e.touches[0].screenX;
|
|
314
|
+
const nowY = e.touches[0].screenY;
|
|
315
|
+
const distX = nowX - this.lastTouchScreenX;
|
|
316
|
+
const distY = nowY - this.lastTouchScreenY;
|
|
317
|
+
const enableVslideGesture = this.isFullScreen ? this.vslideGestureInFullscreen : this.vslideGesture;
|
|
318
|
+
if (this.gestureType === 'none') {
|
|
319
|
+
// 两点间距离
|
|
320
|
+
const dist = calcDist(distX, distY);
|
|
321
|
+
// 没有移动
|
|
322
|
+
if (dist < 10)
|
|
323
|
+
return obj;
|
|
324
|
+
if (Math.abs(distY) >= Math.abs(distX)) {
|
|
325
|
+
// 垂直方向移动:调整音量
|
|
326
|
+
if (enableVslideGesture) {
|
|
327
|
+
this.gestureType = 'adjustVolume';
|
|
328
|
+
this.lastVolume = this.videoRef.volume;
|
|
329
|
+
}
|
|
330
|
+
else {
|
|
331
|
+
return obj;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
else if (Math.abs(distY) < Math.abs(distX)) {
|
|
335
|
+
// 水平方向移动:调整进度
|
|
336
|
+
if (this.enableProgressGesture) {
|
|
337
|
+
this.gestureType = 'adjustProgress';
|
|
338
|
+
this.lastPercentage = this.currentTime / ((_a = this.duration) !== null && _a !== void 0 ? _a : this._duration);
|
|
339
|
+
}
|
|
340
|
+
else {
|
|
341
|
+
return obj;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
obj.type = this.gestureType;
|
|
346
|
+
obj.dataX = normalizeNumber(distX / 200);
|
|
347
|
+
obj.dataY = normalizeNumber(distY / 200);
|
|
348
|
+
return obj;
|
|
349
|
+
};
|
|
350
|
+
this.loadNativePlayer = () => {
|
|
351
|
+
var _a, _b;
|
|
352
|
+
if (this.videoRef) {
|
|
353
|
+
this.videoRef.src = this.src;
|
|
354
|
+
(_b = (_a = this.videoRef).load) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
this.init = () => {
|
|
358
|
+
const { src, videoRef } = this;
|
|
359
|
+
if (isHls(src)) {
|
|
360
|
+
import(
|
|
361
|
+
/* webpackExports: ["default"] */
|
|
362
|
+
'hls.js').then(e => {
|
|
363
|
+
const Hls = e.default;
|
|
364
|
+
this.HLS = Hls;
|
|
365
|
+
if (Hls.isSupported()) {
|
|
366
|
+
if (this.hls) {
|
|
367
|
+
this.hls.destroy();
|
|
368
|
+
}
|
|
369
|
+
this.hls = new Hls();
|
|
370
|
+
this.hls.loadSource(src);
|
|
371
|
+
this.hls.attachMedia(videoRef);
|
|
372
|
+
this.hls.on(Hls.Events.MANIFEST_PARSED, () => {
|
|
373
|
+
this.autoplay && this.play();
|
|
374
|
+
});
|
|
375
|
+
this.hls.on(Hls.Events.ERROR, (_, data) => {
|
|
376
|
+
this.handleError(data);
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
else if (videoRef.canPlayType('application/vnd.apple.mpegurl')) {
|
|
380
|
+
this.loadNativePlayer();
|
|
381
|
+
}
|
|
382
|
+
else {
|
|
383
|
+
console.error('该浏览器不支持 HLS 播放');
|
|
384
|
+
}
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
388
|
+
this.loadNativePlayer();
|
|
389
|
+
}
|
|
390
|
+
};
|
|
391
|
+
this.handlePlay = () => {
|
|
392
|
+
this.isPlaying = true;
|
|
393
|
+
this.isFirst = false;
|
|
394
|
+
this.controlsRef.toggleVisibility(true);
|
|
395
|
+
this.onPlay.emit();
|
|
396
|
+
};
|
|
397
|
+
this.handlePause = () => {
|
|
398
|
+
this.isPlaying = false;
|
|
399
|
+
this.controlsRef.toggleVisibility(true);
|
|
400
|
+
this.onPause.emit();
|
|
401
|
+
};
|
|
402
|
+
this.handleEnded = () => {
|
|
403
|
+
this.isFirst = true;
|
|
404
|
+
this.pause();
|
|
405
|
+
this.controlsRef.toggleVisibility();
|
|
406
|
+
this.onEnded.emit();
|
|
407
|
+
};
|
|
408
|
+
this.handleTimeUpdate = throttle(async (e) => {
|
|
409
|
+
var _a, _b;
|
|
410
|
+
this.currentTime = this.videoRef.currentTime;
|
|
411
|
+
const duration = this.duration || this._duration;
|
|
412
|
+
const isControlDragging = await this.controlsRef.getIsDraggingProgressBall();
|
|
413
|
+
if (this.controls && this.showProgress) {
|
|
414
|
+
if (!isControlDragging && !this.isDraggingProgress) {
|
|
415
|
+
this.controlsRef.setProgressBall(this.currentTime / duration);
|
|
416
|
+
this.controlsRef.setCurrentTime(this.currentTime);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
this.danmuRef.tick(this.currentTime);
|
|
420
|
+
this.onTimeUpdate.emit({
|
|
421
|
+
duration: (_a = e.target) === null || _a === void 0 ? void 0 : _a.duration,
|
|
422
|
+
currentTime: (_b = e.target) === null || _b === void 0 ? void 0 : _b.currentTime
|
|
423
|
+
});
|
|
424
|
+
if (this.duration) {
|
|
425
|
+
if (this.currentTime >= this.duration) {
|
|
426
|
+
this.seek(0);
|
|
427
|
+
this.handleEnded();
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}, 250);
|
|
431
|
+
this.handleError = e => {
|
|
432
|
+
var _a, _b;
|
|
433
|
+
if (this.hls) {
|
|
434
|
+
switch (e.type) {
|
|
435
|
+
case this.HLS.ErrorTypes.NETWORK_ERROR:
|
|
436
|
+
// try to recover network error
|
|
437
|
+
this.onError.emit({ errMsg: e.response });
|
|
438
|
+
this.hls.startLoad();
|
|
439
|
+
break;
|
|
440
|
+
case this.HLS.ErrorTypes.MEDIA_ERROR:
|
|
441
|
+
this.onError.emit({ errMsg: e.reason || '媒体错误,请重试' });
|
|
442
|
+
this.hls.recoverMediaError();
|
|
443
|
+
break;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
else {
|
|
447
|
+
this.onError.emit({
|
|
448
|
+
errMsg: (_b = (_a = e.target) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message,
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
};
|
|
452
|
+
this.handleDurationChange = () => {
|
|
453
|
+
this._duration = this.videoRef.duration;
|
|
454
|
+
};
|
|
455
|
+
this.handleProgress = () => {
|
|
456
|
+
this.onProgress.emit();
|
|
457
|
+
};
|
|
458
|
+
this.handleLoadedMetaData = (e) => {
|
|
459
|
+
const target = e.target;
|
|
460
|
+
this.onLoadedMetaData.emit({
|
|
461
|
+
width: target.videoWidth,
|
|
462
|
+
height: target.videoHeight,
|
|
463
|
+
duration: target.duration
|
|
464
|
+
});
|
|
465
|
+
};
|
|
466
|
+
this._play = () => this.videoRef.play();
|
|
467
|
+
this._pause = () => this.videoRef.pause();
|
|
468
|
+
this._stop = () => {
|
|
469
|
+
this.videoRef.pause();
|
|
470
|
+
this._seek(0);
|
|
471
|
+
};
|
|
472
|
+
this._seek = (position) => {
|
|
473
|
+
this.videoRef.currentTime = position;
|
|
474
|
+
};
|
|
475
|
+
this.onTouchStartContainer = (e) => {
|
|
476
|
+
this.lastTouchScreenX = e.touches[0].screenX;
|
|
477
|
+
this.lastTouchScreenY = e.touches[0].screenY;
|
|
478
|
+
};
|
|
479
|
+
this.onClickContainer = () => {
|
|
480
|
+
if (this.enablePlayGesture) {
|
|
481
|
+
const now = Date.now();
|
|
482
|
+
if (now - this.lastClickedTime < 300) {
|
|
483
|
+
// 双击
|
|
484
|
+
this.isPlaying ? this.pause() : this.play();
|
|
485
|
+
}
|
|
486
|
+
this.lastClickedTime = now;
|
|
487
|
+
}
|
|
488
|
+
this.controlsRef.toggleVisibility();
|
|
489
|
+
};
|
|
490
|
+
this.onClickFullScreenBtn = (e) => {
|
|
491
|
+
e.stopPropagation();
|
|
492
|
+
this.toggleFullScreen();
|
|
493
|
+
};
|
|
494
|
+
this.handleFullScreenChange = e => {
|
|
495
|
+
// 全屏后,"退出"走的是浏览器事件,在此同步状态
|
|
496
|
+
const timestamp = new Date().getTime();
|
|
497
|
+
if (!e.detail && this.isFullScreen && !document[screenFn.fullscreenElement] && timestamp - this.fullScreenTimestamp > 100) {
|
|
498
|
+
this.toggleFullScreen(false, true);
|
|
499
|
+
}
|
|
500
|
+
};
|
|
501
|
+
this.toggleFullScreen = (isFullScreen = !this.isFullScreen, fromBrowser = false) => {
|
|
502
|
+
this.isFullScreen = isFullScreen; // this.videoRef?.['webkitDisplayingFullscreen']
|
|
503
|
+
this.controlsRef.toggleVisibility(true);
|
|
504
|
+
this.fullScreenTimestamp = new Date().getTime();
|
|
505
|
+
this.onFullScreenChange.emit({
|
|
506
|
+
fullScreen: this.isFullScreen,
|
|
507
|
+
direction: 'vertical'
|
|
508
|
+
});
|
|
509
|
+
if (this.isFullScreen && !document[screenFn.fullscreenElement]) {
|
|
510
|
+
setTimeout(() => {
|
|
511
|
+
this.videoRef[screenFn.requestFullscreen]({ navigationUI: 'auto' });
|
|
512
|
+
Taro.eventCenter.trigger('__taroEnterFullScreen', {});
|
|
513
|
+
}, 0);
|
|
514
|
+
}
|
|
515
|
+
else {
|
|
516
|
+
if (!fromBrowser) {
|
|
517
|
+
// Note: 全屏后,"退出全屏"是浏览器按钮是浏览器内部按钮,非html按钮,点击"退出全屏"按钮是浏览器内部实现功能。此时再次调用exitFullscreen反而会报错,因此不再调用
|
|
518
|
+
document[screenFn.exitFullscreen]();
|
|
519
|
+
}
|
|
520
|
+
Taro.eventCenter.trigger('__taroExitFullScreen', {});
|
|
521
|
+
}
|
|
522
|
+
};
|
|
523
|
+
this.toggleMute = (e) => {
|
|
524
|
+
e.stopPropagation();
|
|
525
|
+
this.videoRef.muted = !this.isMute;
|
|
526
|
+
this.controlsRef.toggleVisibility(true);
|
|
527
|
+
this.isMute = !this.isMute;
|
|
528
|
+
};
|
|
529
|
+
this.toggleDanmu = (e) => {
|
|
530
|
+
e.stopPropagation();
|
|
531
|
+
this.controlsRef.toggleVisibility(true);
|
|
532
|
+
this._enableDanmu = !this._enableDanmu;
|
|
533
|
+
};
|
|
534
|
+
this.src = undefined;
|
|
535
|
+
this.duration = undefined;
|
|
536
|
+
this.controls = true;
|
|
537
|
+
this.autoplay = false;
|
|
538
|
+
this.loop = false;
|
|
539
|
+
this.muted = false;
|
|
540
|
+
this.initialTime = 0;
|
|
541
|
+
this.poster = undefined;
|
|
542
|
+
this.objectFit = 'contain';
|
|
543
|
+
this.showProgress = true;
|
|
544
|
+
this.showFullscreenBtn = true;
|
|
545
|
+
this.showPlayBtn = true;
|
|
546
|
+
this.showCenterPlayBtn = true;
|
|
547
|
+
this.showMuteBtn = false;
|
|
548
|
+
this.danmuList = undefined;
|
|
549
|
+
this.danmuBtn = false;
|
|
550
|
+
this.enableDanmu = false;
|
|
551
|
+
this.enablePlayGesture = false;
|
|
552
|
+
this.enableProgressGesture = true;
|
|
553
|
+
this.vslideGesture = false;
|
|
554
|
+
this.vslideGestureInFullscreen = true;
|
|
555
|
+
this.nativeProps = {};
|
|
556
|
+
this._duration = undefined;
|
|
557
|
+
this._enableDanmu = false;
|
|
558
|
+
this.isPlaying = false;
|
|
559
|
+
this.isFirst = true;
|
|
560
|
+
this.isFullScreen = false;
|
|
561
|
+
this.fullScreenTimestamp = new Date().getTime();
|
|
562
|
+
this.isMute = false;
|
|
563
|
+
}
|
|
564
|
+
componentWillLoad() {
|
|
565
|
+
this._enableDanmu = this.enableDanmu;
|
|
566
|
+
this.isMute = this.muted;
|
|
567
|
+
}
|
|
568
|
+
componentDidLoad() {
|
|
569
|
+
var _a, _b;
|
|
570
|
+
this.init();
|
|
571
|
+
if (this.initialTime) {
|
|
572
|
+
this.videoRef.currentTime = this.initialTime;
|
|
573
|
+
}
|
|
574
|
+
// 目前只支持 danmuList 初始化弹幕列表,还未支持更新弹幕列表
|
|
575
|
+
(_b = (_a = this.danmuRef).sendDanmu) === null || _b === void 0 ? void 0 : _b.call(_a, this.danmuList);
|
|
576
|
+
if (document.addEventListener) {
|
|
577
|
+
document.addEventListener(screenFn.fullscreenchange, this.handleFullScreenChange);
|
|
578
|
+
}
|
|
579
|
+
if (this.videoRef && scene === 'iOS') {
|
|
580
|
+
// NOTE: iOS 场景下 fullscreenchange 并不会在退出全屏状态下触发,仅 webkitpresentationmodechanged 与 webkitendfullscreen 可替代
|
|
581
|
+
this.videoRef.addEventListener('webkitendfullscreen', this.handleFullScreenChange);
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
componentDidRender() {
|
|
585
|
+
}
|
|
586
|
+
disconnectedCallback() {
|
|
587
|
+
if (document.removeEventListener) {
|
|
588
|
+
document.removeEventListener(screenFn.fullscreenchange, this.handleFullScreenChange);
|
|
589
|
+
}
|
|
590
|
+
if (this.videoRef && scene === 'iOS') {
|
|
591
|
+
this.videoRef.removeEventListener('webkitendfullscreen', this.handleFullScreenChange);
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
watchEnableDanmu(newVal) {
|
|
595
|
+
this._enableDanmu = newVal;
|
|
596
|
+
}
|
|
597
|
+
watchSrc() {
|
|
598
|
+
this.init();
|
|
599
|
+
}
|
|
600
|
+
async onDocumentTouchMove(e) {
|
|
601
|
+
if (this.lastTouchScreenX === undefined || this.lastTouchScreenY === undefined)
|
|
602
|
+
return;
|
|
603
|
+
if (await this.controlsRef.getIsDraggingProgressBall())
|
|
604
|
+
return;
|
|
605
|
+
const gestureObj = this.analyzeGesture(e);
|
|
606
|
+
if (gestureObj.type === 'adjustVolume') {
|
|
607
|
+
this.toastVolumeRef.style.visibility = 'visible';
|
|
608
|
+
const nextVolume = Math.max(Math.min(this.lastVolume - gestureObj.dataY, 1), 0);
|
|
609
|
+
this.videoRef.volume = nextVolume;
|
|
610
|
+
this.toastVolumeBarRef.style.width = `${nextVolume * 100}%`;
|
|
611
|
+
}
|
|
612
|
+
else if (gestureObj.type === 'adjustProgress') {
|
|
613
|
+
this.isDraggingProgress = true;
|
|
614
|
+
this.nextPercentage = Math.max(Math.min(this.lastPercentage + (gestureObj.dataX || 0), 1), 0);
|
|
615
|
+
if (this.controls && this.showProgress) {
|
|
616
|
+
this.controlsRef.setProgressBall(this.nextPercentage);
|
|
617
|
+
this.controlsRef.toggleVisibility(true);
|
|
618
|
+
}
|
|
619
|
+
const duration = this.duration || this._duration;
|
|
620
|
+
this.toastProgressTitleRef.innerHTML = `${formatTime(this.nextPercentage * duration)} / ${formatTime(duration)}`;
|
|
621
|
+
this.toastProgressRef.style.visibility = 'visible';
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
onDocumentTouchEnd() {
|
|
625
|
+
var _a;
|
|
626
|
+
if (this.gestureType === 'adjustVolume') {
|
|
627
|
+
this.toastVolumeRef.style.visibility = 'hidden';
|
|
628
|
+
}
|
|
629
|
+
else if (this.gestureType === 'adjustProgress') {
|
|
630
|
+
this.toastProgressRef.style.visibility = 'hidden';
|
|
631
|
+
}
|
|
632
|
+
if (this.isDraggingProgress) {
|
|
633
|
+
this.isDraggingProgress = false;
|
|
634
|
+
this.seek(this.nextPercentage * ((_a = this.duration) !== null && _a !== void 0 ? _a : this._duration));
|
|
635
|
+
}
|
|
636
|
+
this.gestureType = 'none';
|
|
637
|
+
this.lastTouchScreenX = undefined;
|
|
638
|
+
this.lastTouchScreenY = undefined;
|
|
639
|
+
}
|
|
640
|
+
async getHlsObject() {
|
|
641
|
+
// Note: H5 端专属方法,获取 HLS 实例 fix #11894
|
|
642
|
+
return this.hls;
|
|
643
|
+
}
|
|
644
|
+
/** 播放视频 */
|
|
645
|
+
async play() {
|
|
646
|
+
this._play();
|
|
647
|
+
}
|
|
648
|
+
/** 暂停视频 */
|
|
649
|
+
async pause() {
|
|
650
|
+
this._pause();
|
|
651
|
+
}
|
|
652
|
+
/** 停止视频 */
|
|
653
|
+
async stop() {
|
|
654
|
+
this._stop();
|
|
655
|
+
}
|
|
656
|
+
/** 跳转到指定位置 */
|
|
657
|
+
async seek(position) {
|
|
658
|
+
this._seek(position);
|
|
659
|
+
}
|
|
660
|
+
/** 进入全屏。若有自定义内容需在全屏时展示,需将内容节点放置到 video 节点内。 */
|
|
661
|
+
async requestFullScreen() {
|
|
662
|
+
this.toggleFullScreen(true);
|
|
663
|
+
}
|
|
664
|
+
/** 退出全屏 */
|
|
665
|
+
async exitFullScreen() {
|
|
666
|
+
this.toggleFullScreen(false);
|
|
667
|
+
}
|
|
668
|
+
render() {
|
|
669
|
+
const { controls, autoplay, loop, muted, poster, objectFit, isFirst, isMute, isFullScreen, showCenterPlayBtn, isPlaying, _enableDanmu, showMuteBtn, danmuBtn, showFullscreenBtn, nativeProps } = this;
|
|
670
|
+
const duration = this.duration || this._duration;
|
|
671
|
+
const durationTime = formatTime(duration);
|
|
672
|
+
return (h(Host, { class: classnames('taro-video-container', {
|
|
673
|
+
'taro-video-type-fullscreen': isFullScreen
|
|
674
|
+
}), onTouchStart: this.onTouchStartContainer, onClick: this.onClickContainer }, h("video", Object.assign({ class: 'taro-video-video', style: {
|
|
675
|
+
'object-fit': objectFit
|
|
676
|
+
}, ref: dom => {
|
|
677
|
+
if (dom) {
|
|
678
|
+
this.videoRef = dom;
|
|
679
|
+
}
|
|
680
|
+
}, 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"), h("taro-video-danmu", { ref: dom => {
|
|
681
|
+
if (dom) {
|
|
682
|
+
this.danmuRef = dom;
|
|
683
|
+
}
|
|
684
|
+
}, enable: _enableDanmu }), isFirst && showCenterPlayBtn && !isPlaying && (h("div", { class: 'taro-video-cover' }, h("div", { class: 'taro-video-cover-play-button', onClick: () => this.play() }), h("p", { class: 'taro-video-cover-duration' }, durationTime))), h("taro-video-control", { ref: dom => {
|
|
685
|
+
if (dom) {
|
|
686
|
+
this.controlsRef = dom;
|
|
687
|
+
}
|
|
688
|
+
}, 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 }, showMuteBtn && (h("div", { class: classnames('taro-video-mute', {
|
|
689
|
+
'taro-video-type-mute': isMute
|
|
690
|
+
}), onClick: this.toggleMute })), danmuBtn && (h("div", { class: classnames('taro-video-danmu-button', {
|
|
691
|
+
'taro-video-danmu-button-active': _enableDanmu
|
|
692
|
+
}), onClick: this.toggleDanmu }, "\u5F39\u5E55")), showFullscreenBtn && (h("div", { class: classnames('taro-video-fullscreen', {
|
|
693
|
+
'taro-video-type-fullscreen': isFullScreen
|
|
694
|
+
}), onClick: this.onClickFullScreenBtn }))), h("div", { class: 'taro-video-toast taro-video-toast-volume', ref: dom => {
|
|
695
|
+
if (dom) {
|
|
696
|
+
this.toastVolumeRef = dom;
|
|
697
|
+
}
|
|
698
|
+
} }, h("div", { class: 'taro-video-toast-title' }, "\u97F3\u91CF"), h("div", { class: 'taro-video-toast-icon' }), h("div", { class: 'taro-video-toast-value' }, h("div", { class: 'taro-video-toast-value-content', ref: dom => {
|
|
699
|
+
if (dom) {
|
|
700
|
+
this.toastVolumeBarRef = dom;
|
|
701
|
+
}
|
|
702
|
+
} }, h("div", { class: 'taro-video-toast-volume-grids' }, Array(10).fill(1).map(() => (h("div", { class: 'taro-video-toast-volume-grids-item' }))))))), h("div", { class: 'taro-video-toast taro-video-toast-progress', ref: dom => {
|
|
703
|
+
if (dom) {
|
|
704
|
+
this.toastProgressRef = dom;
|
|
705
|
+
}
|
|
706
|
+
} }, h("div", { class: 'taro-video-toast-title', ref: dom => {
|
|
707
|
+
if (dom) {
|
|
708
|
+
this.toastProgressTitleRef = dom;
|
|
709
|
+
}
|
|
710
|
+
} }))));
|
|
711
|
+
}
|
|
712
|
+
get el() { return getElement(this); }
|
|
713
|
+
static get watchers() { return {
|
|
714
|
+
"enableDanmu": ["watchEnableDanmu"],
|
|
715
|
+
"src": ["watchSrc"]
|
|
716
|
+
}; }
|
|
717
|
+
};
|
|
718
|
+
Video.style = indexCss;
|
|
719
|
+
|
|
720
|
+
export { VideoControl as V, VideoDanmu as a, Video as b };
|