Java Code Examples for com.google.android.exoplayer2.source.MediaSource#MediaPeriodId

The following examples show how to use com.google.android.exoplayer2.source.MediaSource#MediaPeriodId . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MediaSourceEventForwarder.java    From no-player with Apache License 2.0 5 votes vote down vote up
@Override
public void onLoadStarted(int windowIndex,
                          @Nullable MediaSource.MediaPeriodId mediaPeriodId,
                          LoadEventInfo loadEventInfo,
                          MediaLoadData mediaLoadData) {
    HashMap<String, String> callingMethodParameters = new HashMap<>();

    callingMethodParameters.put(Parameters.WINDOW_INDEX, String.valueOf(windowIndex));
    callingMethodParameters.put(Parameters.MEDIA_PERIOD_ID, mediaPeriodId == null ? NO_MEDIA_PERIOD_ID : mediaPeriodId.toString());
    callingMethodParameters.put(Parameters.LOAD_EVENT_INFO, loadEventInfo.toString());
    callingMethodParameters.put(Parameters.MEDIA_LOAD_DATA, mediaLoadData.toString());

    infoListener.onNewInfo(Methods.ON_LOAD_STARTED, callingMethodParameters);
}
 
Example 2
Source File: BitrateForwarder.java    From no-player with Apache License 2.0 5 votes vote down vote up
@Override
public void onLoadCompleted(int windowIndex,
                            @Nullable MediaSource.MediaPeriodId mediaPeriodId,
                            LoadEventInfo loadEventInfo,
                            MediaLoadData mediaLoadData) {
    // TODO: should we send?
}
 
Example 3
Source File: MediaSourceEventForwarder.java    From no-player with Apache License 2.0 5 votes vote down vote up
@Override
public void onDownstreamFormatChanged(int windowIndex,
                                      @Nullable MediaSource.MediaPeriodId mediaPeriodId,
                                      MediaLoadData mediaLoadData) {
    HashMap<String, String> callingMethodParameters = new HashMap<>();

    callingMethodParameters.put(Parameters.WINDOW_INDEX, String.valueOf(windowIndex));
    callingMethodParameters.put(Parameters.MEDIA_PERIOD_ID, mediaPeriodId == null ? NO_MEDIA_PERIOD_ID : mediaPeriodId.toString());
    callingMethodParameters.put(Parameters.MEDIA_LOAD_DATA,  mediaLoadData.toString());

    infoListener.onNewInfo(Methods.ON_DOWNSTREAM_FORMAT_CHANGED, callingMethodParameters);
}
 
Example 4
Source File: NoPlayerMediaSourceEventListener.java    From no-player with Apache License 2.0 4 votes vote down vote up
@Override
public void onReadingStarted(int windowIndex, MediaSource.MediaPeriodId mediaPeriodId) {
    for (MediaSourceEventListener listener : listeners) {
        listener.onReadingStarted(windowIndex, mediaPeriodId);
    }
}
 
Example 5
Source File: ExoMediaPlayer.java    From DKVideoPlayer with Apache License 2.0 4 votes vote down vote up
@Override
public void onReadingStarted(int windowIndex, MediaSource.MediaPeriodId mediaPeriodId) {
    if (mPlayerEventListener != null && mIsPreparing) {
        mPlayerEventListener.onPrepared();
    }
}
 
Example 6
Source File: BitrateForwarder.java    From no-player with Apache License 2.0 4 votes vote down vote up
@Override
public void onReadingStarted(int windowIndex, MediaSource.MediaPeriodId mediaPeriodId) {
    // TODO: should we send?
}
 
Example 7
Source File: NoPlayerMediaSourceEventListener.java    From no-player with Apache License 2.0 4 votes vote down vote up
@Override
public void onMediaPeriodReleased(int windowIndex, MediaSource.MediaPeriodId mediaPeriodId) {
    for (MediaSourceEventListener listener : listeners) {
        listener.onMediaPeriodReleased(windowIndex, mediaPeriodId);
    }
}
 
Example 8
Source File: EventLogger.java    From TubiPlayer with MIT License 4 votes vote down vote up
@Override
public void onDownstreamFormatChanged(final int windowIndex,
        @Nullable final MediaSource.MediaPeriodId mediaPeriodId,
        final MediaLoadData mediaLoadData) {

}
 
Example 9
Source File: EventLogger.java    From ExoVideoView with Apache License 2.0 2 votes vote down vote up
@Override
public void onMediaPeriodCreated(int windowIndex, MediaSource.MediaPeriodId mediaPeriodId) {

}
 
Example 10
Source File: EventLogger.java    From mimi-reader with Apache License 2.0 2 votes vote down vote up
@Override
public void onUpstreamDiscarded(int windowIndex, MediaSource.MediaPeriodId mediaPeriodId, MediaLoadData mediaLoadData) {

}
 
Example 11
Source File: EventLogger.java    From mimi-reader with Apache License 2.0 2 votes vote down vote up
@Override
public void onReadingStarted(int windowIndex, MediaSource.MediaPeriodId mediaPeriodId) {

}
 
Example 12
Source File: EventLogger.java    From mimi-reader with Apache License 2.0 2 votes vote down vote up
@Override
public void onLoadCanceled(int windowIndex, @Nullable MediaSource.MediaPeriodId mediaPeriodId, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {

}
 
Example 13
Source File: EventLogger.java    From GSYVideoPlayer with Apache License 2.0 2 votes vote down vote up
@Override
public void onLoadStarted(int windowIndex, @Nullable MediaSource.MediaPeriodId mediaPeriodId, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {

}
 
Example 14
Source File: EventLogger.java    From mimi-reader with Apache License 2.0 2 votes vote down vote up
@Override
public void onLoadStarted(int windowIndex, @Nullable MediaSource.MediaPeriodId mediaPeriodId, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {

}
 
Example 15
Source File: EventLogger.java    From ExoVideoView with Apache License 2.0 2 votes vote down vote up
@Override
public void onLoadStarted(int windowIndex, @Nullable MediaSource.MediaPeriodId mediaPeriodId, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {

}
 
Example 16
Source File: EventLogger.java    From mimi-reader with Apache License 2.0 2 votes vote down vote up
@Override
public void onMediaPeriodCreated(int windowIndex, MediaSource.MediaPeriodId mediaPeriodId) {

}
 
Example 17
Source File: EventLogger.java    From ExoVideoView with Apache License 2.0 2 votes vote down vote up
@Override
public void onLoadCanceled(int windowIndex, @Nullable MediaSource.MediaPeriodId mediaPeriodId, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {

}
 
Example 18
Source File: EventLogger.java    From GSYVideoPlayer with Apache License 2.0 2 votes vote down vote up
@Override
public void onUpstreamDiscarded(int windowIndex, MediaSource.MediaPeriodId mediaPeriodId, MediaLoadData mediaLoadData) {

}
 
Example 19
Source File: EventLogger.java    From GSYVideoPlayer with Apache License 2.0 2 votes vote down vote up
@Override
public void onLoadCanceled(int windowIndex, @Nullable MediaSource.MediaPeriodId mediaPeriodId, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {

}
 
Example 20
Source File: EventLogger.java    From ExoVideoView with Apache License 2.0 2 votes vote down vote up
@Override
public void onMediaPeriodReleased(int windowIndex, MediaSource.MediaPeriodId mediaPeriodId) {

}