如何设置上设置fullscreenmode时QUOT&使用本地视频播放器RECT; exactFit"在Live code? [英] How to set rect on using a native video player when set fullscreenmode to "exactFit" in Livecode?

查看:202
本文介绍了如何设置上设置fullscreenmode时QUOT&使用本地视频播放器RECT; exactFit"在Live code?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目有视频播放器。

My project have video player.

第一步:
我创建堆栈和输入code:

First step: I create stack and input code:

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

第二步骤:
我创建播放视频画面。当我触摸画面。画面上有隐藏和创造本地视频播放器

Second step: I create picture for play video. When I touch picture. The picture has hide and create native video player

在这里code:

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上进行测试。玩家正确size.But当我在iPhone上测试。玩家不正确的大小。

This stack size 1024*768. I tested on iPad. The player correct size.But when I tested on iPhone. The player incorrect size.

这图片是之前触摸图片:

This picture is before touch image:

这图片是后触摸图片:

我该如何解决这个问题?

How do I fix this problem?

推荐答案

也许这就是你以后...

Maybe this is what you're after...

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

这是第二个想法 - 它看起来像一个已经在code - 也许尝试...

on second thoughts - it looks like that's already in your code - maybe try...

set the lockLoc of img "poster" to true

它可以得到调整到图像原始尺寸在某些点

it could be getting resized to the images original dimensions at some point

这篇关于如何设置上设置fullscreenmode时QUOT&使用本地视频播放器RECT; exactFit"在Live code?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆