Set the Media Source codec string based on the stream types.

Change-Id: I1b10c5b1227a63981935887272c22e4adaf72739
diff --git a/adaptive/dash_player.js b/adaptive/dash_player.js
index bbee233..ffcf156 100644
--- a/adaptive/dash_player.js
+++ b/adaptive/dash_player.js
@@ -609,7 +609,7 @@
  * @return {string} version.
  */
 DashPlayer.version = function() {
-  return '0.2.0.1';
+  return '0.2.0.2';
 };
 
 /**
@@ -838,11 +838,6 @@
     return new ErrorStatus(errorStr);
   }
 
-  if (this.mediaSourceVersion_ == 0.5) {
-    this.videoElement.webkitSourceAddId(this.mediaSourceIDString_,
-                                        'video/webm; codecs="vp8, vorbis"');
-  }
-
   if (this.dashParser == null) {
     var res = this.parseManifest(function() {
       setupStreamsFunction();
@@ -1174,6 +1169,16 @@
     this.adaptiveStreams_['audio'] = aud;
   }
 
+  if (this.mediaSourceVersion_ == 0.5) {
+    var codecStr = 'video/webm; codecs="vp8"';
+    if (this.adaptiveStreams_['video'] && this.adaptiveStreams_['audio']) {
+      codecStr = 'video/webm; codecs="vp8, vorbis"';
+    } else if (this.adaptiveStreams_['audio']) {
+      codecStr = 'video/webm; codecs="vorbis"';
+    }
+    this.videoElement.webkitSourceAddId(this.mediaSourceIDString_, codecStr);
+  }
+
   return new OKStatus();
 };