收藏
回答

IOS下requestFullScreen有bug,安卓端没问题?

choseVideo() {
        wx.chooseMedia({
            count: 1,
            mediaType: ['video'],
            sourceType: ['album', 'camera'],
            maxDuration: 20,
            success: (res) => {
                this.setData({
                    videoSrc: res.tempFiles[0].tempFilePath,
                    videoImageurl: res.tempFiles[0].thumbTempFilePath
                })
                console.log(res)
                this.uploadFile(res.tempFiles[0].tempFilePath).then((info) => {
                    const res = JSON.parse(info.data)

                    this.setData({
                        videoUrl: res.data.fids
                    })
                })

                this.videoOverView()
            }
        })
    },

    videoOverView() {
        const videoContext = wx.createVideoContext('my_video', this)

        videoContext.requestFullScreen({
            direction: 0
        })
        videoContext.play()
    },

回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容