类型不匹配
error: 类型不匹配: 推断类型是uts.sdk.modules.uniVideo.Danmu,但预期的是uts.sdk.modules.DCloudUniVideo.Danmu。
11:45:39.460 at uni_modules/uni-video/utssdk/app-android/index.uts:44:30
11:45:39.460 42 |
11:45:39.460 43 | sendDanmu(danmu : Danmu) {
11:45:39.460 44 | this.videoElement.sendDanmu(danmu);
11:45:39.460 | ^
11:45:39.460 45 | }
11:45:39.460 46 |
11:45:39.460 error: 类型不匹配: 推断类型是uts.sdk.modules.uniVideo.RequestFullScreenOptions?(可为空的uts.sdk.modules.uniVideo.RequestFullScreenOptions),但预期的是uts.sdk.modules.DCloudUniVideo.RequestFullScreenOptions?(可为空的uts.sdk.modules.DCloudUniVideo.RequestFullScreenOptions)。
11:45:39.461 at uni_modules/uni-video/utssdk/app-android/index.uts:52:38
11:45:39.461 50 |
11:45:39.461 51 | requestFullScreen(direction ?: RequestFullScreenOptions | null) {
11:45:39.461 52 | this.videoElement.requestFullScreen(direction);
11:45:39.461 | ^
11:45:39.461 53 | }
11:45:39.461 54 |
11:45:39.581 检测到编译缓存部分失效,开始差量编译。详见:https://uniapp.dcloud.net.cn/uni-app-x/compiler/#cache
11:45:39.581 请在杀毒软件中设置扫描排除名单,减少系统资源消耗。详情
11:45:39.591 uni_module [uni-video] 三方依赖文件已存在,跳过下载
11:45:40.096 当前工程1个页面,正在编译为android class,此过程耗时较长...
11:45:42.427 [plugin:uni:app-uts] 编译失败
11:45:42.427 error: Unresolved reference: VideoViewElement
11:45:42.427 at pages/index/index.uvue:21:10
11:45:42.427 19 | */
11:45:42.427 20 | //Todo: 临时解决方案,新版本将无需import
11:45:42.427 21 | import { VideoViewElement } from "uts.sdk.modules.DCloudUniVideo"
11:45:42.427 | ^
11:45:42.427 22 |
11:45:42.427 23 | export default {
11:45:42.427 error: Unresolved reference: uniVideo
11:45:42.427 at pages/index/index.uvue:4:10
11:45:42.427 2 |
11:45:42.427 3 |
11:45:42.427 4 |
11:45:42.427 | ^
11:45:42.427 5 | <button class="button" @click="play" type="primary">播放
11:45:42.427 6 | 注意:
11:45:42.427 error: Unresolved reference: VideoViewElement
11:45:42.427 at pages/index/index.uvue:35:36
11:45:42.427 33 | //uni-app x 项目 uvue 页面中的调用方式(以下方式二选一)
11:45:42.427 34 | // (this.$refs['video'] as VideoViewElement).play();
11:45:42.427 35 | (uni.getElementById('video') as VideoViewElement).play();
11:45:42.427 | ^
11:45:42.427 36 | }
11:45:42.427 37 | }