gpt4 book ai didi

android - 在 Livecode 中将全屏模式设置为 "exactFit"时,如何使用原生视频播放器设置 rect?

转载 作者:行者123 更新时间:2023-11-29 12:43:18 25 4
gpt4 key购买 nike

我的项目有视频播放器。

第一步:我创建堆栈并输入代码:

on preOpenstack
set the fullScreenMode of this stack to "exactFit"
end preOpenstack

第二步:我为播放视频创建图片。当我触摸图片时。图片有隐藏和创建原生视频播放器

此处代码:

on mouseUp
lock screen
set the visible of img "poster" to false
mobileControlCreate "player", "vdoplayer"
put the result into pID
mobileControlSet pID,"filename" , specialFolderpath("engine") & "/vdo.mp4"
mobileControlSet pID,"preserveAspect" , true
mobileControlSet pID,"showController" , true
mobileControlSet pID,"looping" , loop
mobileControlSet pID,"rect" , the rect of img "poster"
mobileControlSet pID,"visible" , true
mobileControlDo pID,"play"
unlock screen
end mouseUp

这个堆栈大小为 1024*768。我在 iPad 上测试过。播放器尺寸正确。但是当我在 iPhone 上测试时。播放器尺寸不正确。

这张图片是触摸前的图片:

enter image description here

此图为触摸后图片:

enter image description here

我该如何解决这个问题?

最佳答案

也许这就是你想要的......

mobileControlSet pID, "rect" , the rect of img "poster"

再三考虑 - 看起来这已经在你的代码中 - 也许试试......

set the lockLoc of img "poster" to true

它可能会在某个时候调整到图像的原始尺寸

关于android - 在 Livecode 中将全屏模式设置为 "exactFit"时,如何使用原生视频播放器设置 rect?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24324546/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com