iphone> Can I avoid the native fullscreen video player with HTML5 on iPhone or android?
找到官方的一力证,我实际试验证明的结果也是如此,需webkit-playsinline
和 allowsInlineMediaPlayback 配合使用,缺一不可。
Properties
allowsInlineMediaPlayback
A Boolean value that determines whether HTML5 videos play inline or use the native full-screen controller.
@property(nonatomic) BOOL allowsInlineMediaPlayback
Discussion
The default value on iPhone is NO
.
In order for video to play inline, not only does this property need to be set on the view, but the video
element in the HTML document must also include the webkit-playsinline
attribute.
Availability
- Available in iOS 4.0 and later.
Declared In
UIWebView.h
如果想用纯html的方式写代码,目前木有搞定,搞了一下午了,不搞了。