Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(496)

Side by Side Diff: media/blink/webmediaplayer_impl.cc

Issue 2403973002: use IsHLSURL() instead of IsHLSPath() (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/blink/webmediaplayer_impl.h" 5 #include "media/blink/webmediaplayer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 #include <string> 10 #include <string>
(...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after
1360 1360
1361 #if defined(OS_ANDROID) 1361 #if defined(OS_ANDROID)
1362 // We can't play HLS URLs with WebMediaPlayerImpl, so in cases where they are 1362 // We can't play HLS URLs with WebMediaPlayerImpl, so in cases where they are
1363 // encountered, instruct the HTML media element to create a new WebMediaPlayer 1363 // encountered, instruct the HTML media element to create a new WebMediaPlayer
1364 // instance with the correct URL to trigger WebMediaPlayerAndroid creation. 1364 // instance with the correct URL to trigger WebMediaPlayerAndroid creation.
1365 // 1365 //
1366 // TODO(tguilbert): Remove this code path once we have the ability to host a 1366 // TODO(tguilbert): Remove this code path once we have the ability to host a
1367 // MediaPlayer within a Mojo media renderer. http://crbug.com/580626 1367 // MediaPlayer within a Mojo media renderer. http://crbug.com/580626
1368 if (data_source_) { 1368 if (data_source_) {
1369 const GURL url_after_redirects = data_source_->GetUrlAfterRedirects(); 1369 const GURL url_after_redirects = data_source_->GetUrlAfterRedirects();
1370 if (MediaCodecUtil::IsHLSPath(url_after_redirects)) { 1370 if (MediaCodecUtil::IsHLSURL(url_after_redirects)) {
1371 client_->requestReload(url_after_redirects); 1371 client_->requestReload(url_after_redirects);
1372 // |this| may be destructed, do nothing after this. 1372 // |this| may be destructed, do nothing after this.
1373 return; 1373 return;
1374 } 1374 }
1375 } 1375 }
1376 #endif 1376 #endif
1377 1377
1378 if (!success) { 1378 if (!success) {
1379 SetNetworkState(WebMediaPlayer::NetworkStateFormatError); 1379 SetNetworkState(WebMediaPlayer::NetworkStateFormatError);
1380 1380
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
1815 pipeline_metadata_.natural_size, 1815 pipeline_metadata_.natural_size,
1816 base::Bind(&GetCurrentTimeInternal, this))); 1816 base::Bind(&GetCurrentTimeInternal, this)));
1817 watch_time_reporter_->OnVolumeChange(volume_); 1817 watch_time_reporter_->OnVolumeChange(volume_);
1818 if (delegate_ && delegate_->IsHidden()) 1818 if (delegate_ && delegate_->IsHidden())
1819 watch_time_reporter_->OnHidden(); 1819 watch_time_reporter_->OnHidden();
1820 else 1820 else
1821 watch_time_reporter_->OnShown(); 1821 watch_time_reporter_->OnShown();
1822 } 1822 }
1823 1823
1824 } // namespace media 1824 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698