@
brucedone 下面是初始的代码段
auto start_type = media::Pipeline::StartType::kNormal;
if ((GetDemuxerType() != media::DemuxerType::kChunkDemuxer) &&
preload_ == media::DataSource::METADATA &&
!client_->CouldPlayIfEnoughData() && !IsStreaming()) {
start_type =
(has_poster_ ||
base::FeatureList::IsEnabled(media::kPreloadMetadataLazyLoad))
? media::Pipeline::StartType::kSuspendAfterMetadata
: media::Pipeline::StartType::kSuspendAfterMetadataForAudioOnly;
attempting_suspended_start_ = true;
}
这是我修改后的
auto start_type = media::Pipeline::StartType::kNormal;
if ((GetDemuxerType() != media::DemuxerType::kChunkDemuxer) &&
preload_ == media::DataSource::METADATA &&
!client_->CouldPlayIfEnoughData() && !IsStreaming()) {
start_type =
(has_poster_
? media::Pipeline::StartType::kSuspendAfterMetadata
: media::Pipeline::StartType::kSuspendAfterMetadataForAudioOnly);
attempting_suspended_start_ = true;
}
我现在要将 base::FeatureList::IsEnabled(media::kPreloadMetadataLazyLoad)删去,但删去后好像发现会存在其他问题,这是 Chromium 工程师给的回复,我暂时还没有其他的修改思路。
The original code was: start_type = (has_poster_ || true) ? kSuspendAfterMetadata : kSuspendAfterMetadataForAudioOnly;
Patchset 9 changed it to: start_type = (has_poster_) ? kSuspendAfterMetadata : kSuspendAfterMetadataForAudioOnly;
Patchset 11 changed it to: start_type = (has_poster_ ? kSuspendAfterMetadata : kSuspendAfterMetadataForAudioOnly);
Shouldn't the code be: start_type = kSuspendAfterMetadata; ?
There may be some additional cleanup of kSuspendAfterMetadataForAudioOnly.