File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
packages/taro-h5/src/api/media/video Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 11import Taro from '@tarojs/api'
22import { isMobile } from 'is-mobile'
33
4+ import { getDeviceInfo } from '../../../api/base/system'
45import { showActionSheet } from '../../../api/ui'
56import { getParameterError , shouldBeObject } from '../../../utils'
67import { MethodHandler } from '../../../utils/handler'
@@ -136,6 +137,7 @@ export const chooseMedia = async function (
136137
137138 if ( / ^ v i d e o \/ / . test ( res . fileType ) ) {
138139 // Video
140+ const isIOS = getDeviceInfo ( ) . system . toLowerCase ( ) . includes ( 'ios' )
139141 const video = document . createElement ( 'video' )
140142 const reader = new FileReader ( )
141143 video . crossOrigin = 'Anonymous'
@@ -160,6 +162,7 @@ export const chooseMedia = async function (
160162 resolve ( res )
161163 }
162164 video . onerror = e => reject ( e )
165+ isIOS && video . load ( )
163166 } )
164167 } else {
165168 // Image
You can’t perform that action at this time.
0 commit comments