@@ -77,7 +77,7 @@ public void setStreams(VideoInfo.VideoStream[] videoStreams, VideoInfo.AudioStre
7777 int defaultResolutionPos = 0 ;
7878
7979 for (int i = 0 ; i < videoStreams .length ; i ++) {
80- itemArray [i ] = VideoInfo .getNameById (videoStreams [i ].format ) + " " + videoStreams [i ].resolution ;
80+ itemArray [i ] = MediaFormat .getNameById (videoStreams [i ].format ) + " " + videoStreams [i ].resolution ;
8181 if (defaultResolution .equals (videoStreams [i ].resolution )) {
8282 defaultResolutionPos = i ;
8383 }
@@ -98,14 +98,14 @@ public void setStreams(VideoInfo.VideoStream[] videoStreams, VideoInfo.AudioStre
9898 .getString (activity .getString (R .string .defaultAudioFormatPreference ), "webm" );
9999 if (preferedFormat .equals ("webm" )) {
100100 for (VideoInfo .AudioStream s : audioStreams ) {
101- if (s .format == VideoInfo . I_WEBMA ) {
101+ if (s .format == MediaFormat . WEBMA . id ) {
102102 audioStream = s ;
103103 }
104104 }
105105 } else if (preferedFormat .equals ("m4a" )){
106106 for (VideoInfo .AudioStream s : audioStreams ) {
107- Log .d (TAG , VideoInfo .getMimeById (s .format ) + " : " + Integer .toString (s .bandwidth ));
108- if (s .format == VideoInfo . I_M4A &&
107+ Log .d (TAG , MediaFormat .getMimeById (s .format ) + " : " + Integer .toString (s .bandwidth ));
108+ if (s .format == MediaFormat . M4A . id &&
109109 (audioStream == null || audioStream .bandwidth > s .bandwidth )) {
110110 audioStream = s ;
111111 Log .d (TAG , "last choosen" );
@@ -196,7 +196,7 @@ public void playVideo() {
196196 intent .setAction (Intent .ACTION_VIEW );
197197
198198 intent .setDataAndType (Uri .parse (videoStreams [selectedStream ].url ),
199- VideoInfo .getMimeById (videoStreams [selectedStream ].format ));
199+ MediaFormat .getMimeById (videoStreams [selectedStream ].format ));
200200 intent .putExtra (Intent .EXTRA_TITLE , videoTitle );
201201 intent .putExtra ("title" , videoTitle );
202202
@@ -237,8 +237,8 @@ public void onClick(DialogInterface dialog, int which) {
237237 public void downloadVideo () {
238238 Log .d (TAG , "bla" );
239239 if (!videoTitle .isEmpty ()) {
240- String videoSuffix = "." + VideoInfo .getSuffixById (videoStreams [selectedStream ].format );
241- String audioSuffix = "." + VideoInfo .getSuffixById (audioStream .format );
240+ String videoSuffix = "." + MediaFormat .getSuffixById (videoStreams [selectedStream ].format );
241+ String audioSuffix = "." + MediaFormat .getSuffixById (audioStream .format );
242242 Bundle args = new Bundle ();
243243 args .putString (DownloadDialog .FILE_SUFFIX_VIDEO , videoSuffix );
244244 args .putString (DownloadDialog .FILE_SUFFIX_AUDIO , audioSuffix );
@@ -297,7 +297,7 @@ public void playAudio() {
297297 try {
298298 intent .setAction (Intent .ACTION_VIEW );
299299 intent .setDataAndType (Uri .parse (audioStream .url ),
300- VideoInfo .getMimeById (audioStream .format ));
300+ MediaFormat .getMimeById (audioStream .format ));
301301 intent .putExtra (Intent .EXTRA_TITLE , videoTitle );
302302 intent .putExtra ("title" , videoTitle );
303303 activity .startActivity (intent ); // HERE !!!
0 commit comments