| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |