[英]iPad video in portrait mode
我已經以portrait mode
制作了一個iPad video
,即768*1024
。 現在,當我將其轉換為mp4
格式時,轉換器會將其轉換為1024*768
即landscape mode
。是否有任何方法可以以縱向模式顯示縱向視頻,或者是否可以通過任何軟件以mp4縱向模式轉換縱向視頻?
還是我必須再次以橫向模式制作視頻?
我正在使用MPMoviePlayerController
。
提前致謝。
默認情況下, MPMoviePlayerController不再在橫向中運行 ,因此要使其在橫向中運行,您需要對視圖應用轉換。
UIView * playerView = [moviePlayerController view];
[playerView setFrame: CGRectMake(0, 0, 480, 320)];//iPhone
CGAffineTransform landscapeTransform;
landscapeTransform = CGAffineTransformMakeRotation(90*M_PI/180.0f);
landscapeTransform = CGAffineTransformTranslate(landscapeTransform, 80, 80);
[playerView setTransform: landscapeTransform];
In addition, if you want the regular full screen controls, use the following sample.
moviePlayerController.fullscreen = TRUE;
moviePlayerController.controlStyle = MPMovieControlStyleFullscreen;
這是供您參考的信息,“ 在不使用Private API的情況下在MPMoviePlayerController中播放視頻,這將被Apple拒絕。 ”祝您好運,編碼愉快:-)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.