|
|
|
@ -1,7 +1,5 @@ |
|
|
|
package com.fongmi.android.tv.player; |
|
|
|
package com.fongmi.android.tv.player; |
|
|
|
|
|
|
|
|
|
|
|
import android.util.Size; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import androidx.annotation.NonNull; |
|
|
|
import androidx.annotation.NonNull; |
|
|
|
|
|
|
|
|
|
|
|
import com.fongmi.android.tv.App; |
|
|
|
import com.fongmi.android.tv.App; |
|
|
|
@ -114,13 +112,16 @@ public class Players implements Player.Listener, IMediaPlayer.OnInfoListener, IM |
|
|
|
return isExo() ? exoPlayer.isPlaying() : ijkPlayer.isPlaying(); |
|
|
|
return isExo() ? exoPlayer.isPlaying() : ijkPlayer.isPlaying(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public Size getSize() { |
|
|
|
private int getVideoWidth() { |
|
|
|
return isExo() ? new Size(exoPlayer.getVideoSize().width, exoPlayer.getVideoSize().height) : ijkPlayer.getSize(); |
|
|
|
return isExo() ? exoPlayer.getVideoSize().width : ijkPlayer.getVideoWidth(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private int getVideoHeight() { |
|
|
|
|
|
|
|
return isExo() ? exoPlayer.getVideoSize().height : ijkPlayer.getVideoHeight(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String getSizeText() { |
|
|
|
public String getSizeText() { |
|
|
|
Size size = getSize(); |
|
|
|
return getVideoWidth() + " x " + getVideoHeight(); |
|
|
|
return size.getWidth() + " x " + size.getHeight(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String getSpeedText() { |
|
|
|
public String getSpeedText() { |
|
|
|
|