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

Unified Diff: content/test/data/android/multiple_audio_test.html

Issue 1131793004: Migrate AudioFocusChangeListener to browser and always send GAIN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: webview suggestions from boliu Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/test/data/android/multiple_audio_test.html
diff --git a/content/test/data/android/multiple_audio_test.html b/content/test/data/android/multiple_audio_test.html
new file mode 100644
index 0000000000000000000000000000000000000000..c3620b73bf9189b648c076c7f5c7ad444058c998
--- /dev/null
+++ b/content/test/data/android/multiple_audio_test.html
@@ -0,0 +1,49 @@
+<!-- NOTE: The ids in this file must be kept in sync with AudioFocusManagerTest.java -->
+
+<html>
+<head>
+<script>
+ function playFirstAudio() {
+ document.getElementById('firstAudio').play();
+ }
+
+ function playSecondAudio() {
+ document.getElementById('secondAudio').play();
+ }
+
+ function pauseFirstAudio() {
+ document.getElementById('firstAudio').pause();
+ }
+
+ function pauseSecondAudio() {
+ document.getElementById('secondAudio').pause();
+ }
+
+ function reduceFirstVolume() {
+ document.getElementById('firstAudio').volume = 0.5;
+ }
+
+ function resetFirstVolume() {
+ document.getElementById('firstAudio').volume = 1.0;
+ }
+</script>
+</head>
+<body>
+
+<button id="playFirstButton" style='padding:10px 10px;' onclick="playFirstAudio(); return false">Play first</button>
+<button id="playSecondButton" style='padding:10px 10px;' onclick="playSecondAudio(); return false">Play second</button>
+<button id="pauseFirstButton" style='padding:10px 10px;' onclick="pauseFirstAudio(); return false">Pause first</button>
+<button id="pauseSecondButton" style='padding:10px 10px;' onclick="pauseSecondAudio(); return false">Pause second</button>
+<button id="reduceFirstVolumeButton" style='padding:10px 10px;' onclick="reduceFirstVolume(); return false">Reduce First Volume</button>
+<button id="resetFirstVolumeButton" style='padding:10px 10px;' onclick="resetFirstVolume(); return false">Reset First Volume</button>
+
+<audio id='firstAudio' controls>
+ <source src="audio.ogg" type="audio/ogg">
+</audio>
+
+<audio id='secondAudio' controls>
+ <source src="audio.ogg" type="audio/ogg">
+</audio>
+
+</body>
+</html>
« no previous file with comments | « content/test/data/android/audio.ogg ('k') | media/base/android/java/src/org/chromium/media/MediaPlayerListener.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698