CHAPTER 11: Digital Video: Streaming Video, MediaPlayer, and MediaController classes 417
This sets the planetFlyOverUri Uri object to the result of the Uri.parse( ) method call. Inside of this
method call is a concatenation using the + operator, which is used in Java to “concatenate” things
together. What this concatenation inside of the Uri.parse( ) method parameter area does is create
the URI path to the video data asset, referenced using this URI: android.resource://absolute.
beginners.hellouniverse/R.raw.flyover.
- Now that your planetFlyOverUri Uri object is loaded with the correct URI
data path reference, you can “wire” this planetFlyOverUri Uri object to the
videoPlayer VideoView object using the .setVideoURI( ) method call, using
the compact line of Java code shown in Figure 11-14.
Figure 11-13. Load the planetFlyOver Uri object using a Uri.parse( ) method and a data path to /res/raw/flyover
Figure 11-14. Configure the videoPlayer VideoView object to reference the planetFlyOverUri object with .setVideoURI( )
This sets the VideoURI for the VideoView to the planetFlyOverUri object containing the URI reference
to the digital video asset which needs to be played. This is fairly obvious, but I had to state it overtly!
Next, let’s go over some of the core concepts regarding digital video optimization before I get
into showing you how to create and optimize your video assets using Terragen 3, VirtualDub, and
Sorenson Squeeze Professional.