为什么MPMovieLoadState有州5? [英] why does MPMovieLoadState have state 5?
本文介绍了为什么MPMovieLoadState有州5?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我找到MPMoviePlayerController.h,有
I find MPMoviePlayerController.h,there is
enum {
MPMovieLoadStateUnknown = 0,
MPMovieLoadStatePlayable = 1 << 0,
MPMovieLoadStatePlaythroughOK = 1 << 1, // Playback will be automatically started in this state when shouldAutoplay is YES
MPMovieLoadStateStalled = 1 << 2, // Playback will be automatically paused in this state, if started
};
typedef NSInteger MPMovieLoadState;
但是当我做的时候
NSLog(@%d,player.loadState)
打印出5或有时3,它是如何发生的?我知道loadstate的值为0,1,2,4,请参阅开发人员文档。
谢谢!
it prints out 5 or sometimes 3,how did it happen?As i know the loadstate has value of 0,1,2,4 refer to developer documentation. Thank you!
推荐答案
playState是一个位掩码。可以设置任意数量的位,例如
The playState is a bitmask. Any number of bits can be set, such as
MPMovieLoadStatePlaythroughOK | MPMovieLoadStatePlayable
检查这样的州:
MPMovieLoadState state = [playerController loadState];
if( state & MPMovieLoadStatePlaythroughOK ) {
NSLog(@"State is Playthrough OK");
}
这篇关于为什么MPMovieLoadState有州5?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文