Merge pull request #4425 from vkay94/enqueue-stream
Replace specific enqueue options with one
This commit is contained in:
commit
44e82217c1
61 changed files with 134 additions and 160 deletions
|
|
@ -2094,6 +2094,10 @@ public class VideoPlayerImpl extends VideoPlayer
|
|||
return popupLayoutParams;
|
||||
}
|
||||
|
||||
public MainPlayer.PlayerType getPlayerType() {
|
||||
return playerType;
|
||||
}
|
||||
|
||||
public float getScreenWidth() {
|
||||
return screenWidth;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,8 +6,12 @@ import android.content.Intent;
|
|||
import android.content.ServiceConnection;
|
||||
import android.os.IBinder;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.google.android.exoplayer2.ExoPlaybackException;
|
||||
import com.google.android.exoplayer2.PlaybackParameters;
|
||||
|
||||
import org.schabi.newpipe.App;
|
||||
import org.schabi.newpipe.MainActivity;
|
||||
import org.schabi.newpipe.extractor.stream.StreamInfo;
|
||||
|
|
@ -31,6 +35,20 @@ public final class PlayerHolder {
|
|||
private static MainPlayer playerService;
|
||||
private static VideoPlayerImpl player;
|
||||
|
||||
/**
|
||||
* Returns the current {@link MainPlayer.PlayerType} of the {@link MainPlayer} service,
|
||||
* otherwise `null` if no service running.
|
||||
*
|
||||
* @return Current PlayerType
|
||||
*/
|
||||
@Nullable
|
||||
public static MainPlayer.PlayerType getType() {
|
||||
if (player == null) {
|
||||
return null;
|
||||
}
|
||||
return player.getPlayerType();
|
||||
}
|
||||
|
||||
public static void setListener(final PlayerServiceExtendedEventListener newListener) {
|
||||
listener = newListener;
|
||||
// Force reload data from service
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue