开发者

movie playback small not full size

开发者 https://www.devze.com 2023-04-01 15:03 出处:网络
I am developing a iphone app and I have a uiwebview which has开发者_StackOverflow中文版 a video on the page. When I press play the video plays in full screen. Is there a way I can make it so when I pr

I am developing a iphone app and I have a uiwebview which has开发者_StackOverflow中文版 a video on the page. When I press play the video plays in full screen. Is there a way I can make it so when I press play the video plays in a custom size and not full screen?


Use MPMoviePlayerController

From Apple:

MPMoviePlayerController *player =
        [[MPMoviePlayerController alloc] initWithContentURL: myURL];
[player prepareToPlay];
[player.view setFrame: myView.bounds];  // player's frame must match parent's
[myView addSubview: player.view];
// ...
[player play];
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号