Академический Документы
Профессиональный Документы
Культура Документы
Autoplay works already, however tapping the video does not yet work. In
order to fix this, simply create a VideoPlaybackController script, fill it with the
code below, and then attach this to the ARCamera.
selecting the one of the Image Targets in the Hierarchy view (in the Unity
Editor) and explanding it to show the Video game object underneath (i.e. the
child of the image target )
selecting the Video gameobject and change the Path variable in the
Inspector view (under theVideoPlaybackBehaviour component), replacing
the existing filename (e.g. VuforiaSizzleReel_1.m4v) with the URL of the
video you want to play (e.g. http://my.org.com/my_videos/my_video.mp4).
are connecting to must conforms to the http Live Streaming protocol; also, the URL must point
to an actual video file (such as .mp4 or .m4v). Note: Youtube URLs generally do not work "as is"
with the VP sample, as they don't point explicitly to a video file.
To test this functionality, you can use this sample video:
http://oneshot.qualcomm.com/webAR/content/strawberryfields_H264_AAC.mp4
Android (native)
Videos can be played on-texture (i.e. video is rendered as a texture
attached to the trackable in 3D space) on devices running Android
4.0 (ICS) and above.
On Android versions prior to 4.0 (i.e. on all 2.x and 3.X versions),
videos can only be played infullscreen mode; the sample code
already contains logic to automatically detect the Android version and
to select fullscreen automatically if needed
Videos can can also be streamed from a network URL (e.g.
"http://myorg/myvideos/video.m4v"); on Android 4.0 and above, videos
streamed from network can be played on-texture without problems or
limitations (same as for local video files).
For a list of supported video/audio file formats on Android, you can
consult this page:
http://developer.android.com/guide/appendix/media-formats.html
iOS (native)
Videos can be played on-texture on any iOS version supported by
Vuforia (no specific limitations).
However, videos that are streamed from a network URL can only be
played in fullscreen mode on iOS.
For a list of supported video/audio file formats on iOS, you can consult
this page:
http://developer.apple.com/library/ios/#documentation/miscellaneo
us/conceptual/iphoneostechoverview/MediaLayer/MediaLayer.htm
l
Unity
In general, the same constraints as for Android or iOS apply,
depending on the target build platform chosen.
In addition, the fullscreen mode (as implemented in the sample) makes
use of a specific API (Handheld.PlayFullscreenMovie) which is only
available with the Unity PRO license (notavailable on Unity Android
Basic / iOS Basic licenses).