當前位置: 首頁>>代碼示例>>Java>>正文


Java Timeline.Period方法代碼示例

本文整理匯總了Java中com.google.android.exoplayer2.Timeline.Period方法的典型用法代碼示例。如果您正苦於以下問題:Java Timeline.Period方法的具體用法?Java Timeline.Period怎麽用?Java Timeline.Period使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.android.exoplayer2.Timeline的用法示例。


在下文中一共展示了Timeline.Period方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: ImaAdsLoader

import com.google.android.exoplayer2.Timeline; //導入方法依賴的package包/類
/**
 * Creates a new IMA ads loader.
 *
 * @param context The context.
 * @param adTagUri The {@link Uri} of an ad tag compatible with the Android IMA SDK. See
 *     https://developers.google.com/interactive-media-ads/docs/sdks/android/compatibility for
 *     more information.
 * @param imaSdkSettings {@link ImaSdkSettings} used to configure the IMA SDK, or {@code null} to
 *     use the default settings. If set, the player type and version fields may be overwritten.
 */
public ImaAdsLoader(Context context, Uri adTagUri, ImaSdkSettings imaSdkSettings) {
  this.adTagUri = adTagUri;
  period = new Timeline.Period();
  adCallbacks = new ArrayList<>(1);
  imaSdkFactory = ImaSdkFactory.getInstance();
  adDisplayContainer = imaSdkFactory.createAdDisplayContainer();
  adDisplayContainer.setPlayer(this);
  if (imaSdkSettings == null) {
    imaSdkSettings = imaSdkFactory.createImaSdkSettings();
  }
  imaSdkSettings.setPlayerType(IMA_SDK_SETTINGS_PLAYER_TYPE);
  imaSdkSettings.setPlayerVersion(IMA_SDK_SETTINGS_PLAYER_VERSION);
  adsLoader = imaSdkFactory.createAdsLoader(context, imaSdkSettings);
  adsLoader.addAdErrorListener(this);
  adsLoader.addAdsLoadedListener(this);
  fakeContentProgressElapsedRealtimeMs = C.TIME_UNSET;
  fakeContentProgressOffsetMs = C.TIME_UNSET;
  pendingContentPositionMs = C.TIME_UNSET;
  adGroupIndex = C.INDEX_UNSET;
  contentDurationMs = C.TIME_UNSET;
}
 
開發者ID:yangchaojiang,項目名稱:yjPlay,代碼行數:32,代碼來源:ImaAdsLoader.java

示例2: ExtractorMediaSource

import com.google.android.exoplayer2.Timeline; //導入方法依賴的package包/類
/**
 * @param uri The {@link Uri} of the media stream.
 * @param dataSourceFactory A factory for {@link DataSource}s to read the media.
 * @param extractorsFactory A factory for {@link Extractor}s to process the media stream. If the
 *     possible formats are known, pass a factory that instantiates extractors for those formats.
 *     Otherwise, pass a {@link DefaultExtractorsFactory} to use default extractors.
 * @param minLoadableRetryCount The minimum number of times to retry if a loading error occurs.
 * @param eventHandler A handler for events. May be null if delivery of events is not required.
 * @param eventListener A listener of events. May be null if delivery of events is not required.
 * @param customCacheKey A custom key that uniquely identifies the original stream. Used for cache
 *     indexing. May be null.
 */
public ExtractorMediaSource(Uri uri, DataSource.Factory dataSourceFactory,
    ExtractorsFactory extractorsFactory, int minLoadableRetryCount, Handler eventHandler,
    EventListener eventListener, String customCacheKey) {
  this.uri = uri;
  this.dataSourceFactory = dataSourceFactory;
  this.extractorsFactory = extractorsFactory;
  this.minLoadableRetryCount = minLoadableRetryCount;
  this.eventHandler = eventHandler;
  this.eventListener = eventListener;
  this.customCacheKey = customCacheKey;
  period = new Timeline.Period();
}
 
開發者ID:sanjaysingh1990,項目名稱:Exoplayer2Radio,代碼行數:25,代碼來源:ExtractorMediaSource.java

示例3: ExtractorMediaSource

import com.google.android.exoplayer2.Timeline; //導入方法依賴的package包/類
/**
 * @param uri The {@link Uri} of the media stream.
 * @param dataSourceFactory A factory for {@link DataSource}s to read the media.
 * @param extractorsFactory A factory for {@link Extractor}s to process the media stream. If the
 *     possible formats are known, pass a factory that instantiates extractors for those formats.
 *     Otherwise, pass a {@link DefaultExtractorsFactory} to use default extractors.
 * @param minLoadableRetryCount The minimum number of times to retry if a loading error occurs.
 * @param eventHandler A handler for events. May be null if delivery of events is not required.
 * @param eventListener A listener of events. May be null if delivery of events is not required.
 */
public ExtractorMediaSource(Uri uri, DataSource.Factory dataSourceFactory,
    ExtractorsFactory extractorsFactory, int minLoadableRetryCount, Handler eventHandler,
    EventListener eventListener) {
  this.uri = uri;
  this.dataSourceFactory = dataSourceFactory;
  this.extractorsFactory = extractorsFactory;
  this.minLoadableRetryCount = minLoadableRetryCount;
  this.eventHandler = eventHandler;
  this.eventListener = eventListener;
  period = new Timeline.Period();
}
 
開發者ID:zhanglibin123488,項目名稱:videoPickPlayer,代碼行數:22,代碼來源:ExtractorMediaSource.java

示例4: EventLogger

import com.google.android.exoplayer2.Timeline; //導入方法依賴的package包/類
public EventLogger(@Nullable MappingTrackSelector trackSelector) {
  this.trackSelector = trackSelector;
  window = new Timeline.Window();
  period = new Timeline.Period();
  startTimeMs = SystemClock.elapsedRealtime();
}
 
開發者ID:Tubitv,項目名稱:TubiPlayer,代碼行數:7,代碼來源:EventLogger.java

示例5: EventLogger

import com.google.android.exoplayer2.Timeline; //導入方法依賴的package包/類
public EventLogger(MappingTrackSelector trackSelector) {
  this.trackSelector = trackSelector;
  window = new Timeline.Window();
  period = new Timeline.Period();
  startTimeMs = SystemClock.elapsedRealtime();
}
 
開發者ID:ashwanijanghu,項目名稱:ExoPlayer-Offline,代碼行數:7,代碼來源:EventLogger.java

示例6: EventLogger

import com.google.android.exoplayer2.Timeline; //導入方法依賴的package包/類
public EventLogger(MappingTrackSelector trackSelector) {
    this.trackSelector = trackSelector;
    window = new Timeline.Window();
    period = new Timeline.Period();
    startTimeMs = SystemClock.elapsedRealtime();
}
 
開發者ID:huyongli,項目名稱:TigerVideo,代碼行數:7,代碼來源:EventLogger.java

示例7: EventLogger

import com.google.android.exoplayer2.Timeline; //導入方法依賴的package包/類
public EventLogger() {
  window = new Timeline.Window();
  period = new Timeline.Period();
  startTimeMs = SystemClock.elapsedRealtime();
}
 
開發者ID:jcodeing,項目名稱:K-Sonic,代碼行數:6,代碼來源:EventLogger.java

示例8: EventLogger

import com.google.android.exoplayer2.Timeline; //導入方法依賴的package包/類
public EventLogger() {
    window = new Timeline.Window();
    period = new Timeline.Period();
    startTimeMs = SystemClock.elapsedRealtime();
}
 
開發者ID:AndroidTips,項目名稱:MDVideo,代碼行數:6,代碼來源:EventLogger.java


注:本文中的com.google.android.exoplayer2.Timeline.Period方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。