我运行此脚本,AppleScript可以很好地检测设备
tell application "QuickTime Player"
video recording devices
end tell
它给出了下面的回复
{screen compression preset "FaceTime HD Camera" of application "QuickTime Player", screen compression preset "Gangzheng's iPhone" of application "QuickTime Player"}
但是当我运行我的实际脚本时
tell application "QuickTime Player"
video recording devices
set newMovieRecording to new movie recording
tell newMovieRecording
set current camera of newMovieRecording to "Gangzheng's iPhone"
set current microphone of newMovieRecording to "Gangzheng's iPhone"
start
end tell
end tell
它说QuickTime Player got an error: Can’t make "Gangzheng's iPhone" into type video recording device.
有没有办法让iPhone上记录任何东西?
答案 0 :(得分:1)
我已经完成了你想做的事情,但是以不同的方式,因为我也试过
ReWriteCond %{SERVER_PORT} 80
Or
RewriteCond %{HTTP:X-Forwarded-Proto} !https
Or
RewriteCond %{HTTPS} off
Or
RewriteCond %{HTTPS} !on
Or
RewriteCond %{HTTP:X-Forwarded-SSL} =off
但没有运气....所以这是我设置相机的脚本
_SERVER["https_proxy"]
我的脚本有点长,因为我想在我的MAC上录制我的iphone屏幕......所以我必须将QuickTime Player设置为全屏,将鼠标指针移到屏幕外等等......
set current camera of newMovieRecording to "Gangzheng's iPhone"
希望它对某人有帮助。
答案 1 :(得分:0)
tell application "QuickTime Player"
get video recording device "Gangzheng's iPhone"
set newMovieRecording to new movie recording
tell newMovieRecording
start
delay 10
do shell script "env"
pause
save newMovieRecording in "/Users/pmlg673f/Movies/test.mov"
stop
close newMovieRecording
end tell
end tell
答案 2 :(得分:0)
我遇到了这个确切的问题,并撰写了以下博客文章,其中介绍了我是如何解决它的 https://kevinjalbert.com/applescript-that-mirrors-iphone-to-quicktime/。当我四处寻找通过 AppleScript 设置视频/音频输入的方法时,我从这篇文章和其他文章中获得了一些灵感。
AppleScript 的源代码在这里:https://gist.github.com/kevinjalbert/d7661a6a34c1d66dccf701f64eb09be4#file-mirror-scpt。