This commit is contained in:
2025-02-19 10:05:27 +08:00
parent c85477a45b
commit cdc8a3ed8d
494 changed files with 48626 additions and 7248 deletions

View File

@@ -53,10 +53,10 @@
<div @tap="renderScript.emitDispose" ref="videoContent6" v-show="false">
监听第一次初始播放时长,开始进行接口存储时间
</div>
<!-- v-if="platform != 'ios'" -->
<!-- 全屏按钮 start -->
<!-- 注意主要用于安卓端因为ios手机会被劫持 -->
<div class="fullScreenButton-container" v-if="platform != 'ios'">
<div class="fullScreenButton-container">
<div
:class="`prism-fullscreen-btn ${isFullScreen ? 'fullscreen' : ''}`"
@tap="renderScript.changeVideoScreen"
@@ -299,12 +299,12 @@ export default {
x: 10,
y: 7,
},
{
name: "fullScreenButton",
align: "tr",
x: 10,
y: 12,
},
// {
// name: "fullScreenButton",
// align: "tr",
// x: 5,
// y: 12,
// },
{
name: "prism-speed-selector",
align: "tr",
@@ -444,7 +444,7 @@ export default {
},
];
if (this.platform != "ios") {
// if (this.platform != "ios") {
var fullScreenButtonComponent = Aliplayer.Component({
init: function (status, toAddress) {
this.fullScreenStatus = status;
@@ -468,7 +468,7 @@ export default {
];
}
// }
//设置播放基本配置
var playerOptions = {
@@ -563,26 +563,37 @@ export default {
ownerInstance.callMethod("handleEnd");
},
//调用 screenChange + 设置全屏
changeVideoScreen(event, ownerInstance) {
var status = this.player.fullscreenService.getIsFullScreen();
ownerInstance.callMethod("screenChange", {
status: status,
primary: status ? "portrait" : "landscape",
});
var that = this;
// this.$emit('changeScreenLoading',true)
var status = this.player.fullscreenService.getIsFullScreen();
console.log('this.$platform--------', this.platform);
if (this.platform != 'ios') { // 改变按钮形态
ownerInstance.callMethod('screenChange', {
status: status,
primary: status ? 'portrait' : 'landscape'
})
}
if (status) {
if (this.platform != 'ios') {
console.log('恢复竖版');
setTimeout(() => {
plus.screen.lockOrientation("portrait-primary"); //锁死屏幕方向为竖屏
this.player.fullscreenService.cancelFullScreen();
}, 100);
}
} else {
this.player.fullscreenService.requestFullScreen();
if (this.platform != 'ios') {
setTimeout(() => {
plus.screen.lockOrientation("landscape-primary");
}, 100);
} else {
console.log('不要旋转, 使用原生全屏');
}
if (status) {
setTimeout(() => {
plus.screen.lockOrientation("portrait-primary"); //锁死屏幕方向为竖屏
this.player.fullscreenService.cancelFullScreen();
}, 100);
} else {
this.player.fullscreenService.requestFullScreen();
setTimeout(() => {
plus.screen.lockOrientation("landscape-primary");
}, 100);
}
},
}
},
//调用 changeVideoData 切换播放源
changeVideoData(event, ownerInstance) {

View File

@@ -59,6 +59,7 @@
</template>
<view v-else style="height: 200px"> </view>
</view>
</view>
</template>