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

Unified Diff: ppapi/examples/media_stream_audio/media_stream_audio.html

Issue 140783004: [PPAPI] Pepper MediaStream API audio track implementation and example. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix review issues. Created 6 years, 11 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: ppapi/examples/media_stream_audio/media_stream_audio.html
diff --git a/ppapi/examples/media_stream_video/media_stream_video.html b/ppapi/examples/media_stream_audio/media_stream_audio.html
similarity index 59%
copy from ppapi/examples/media_stream_video/media_stream_video.html
copy to ppapi/examples/media_stream_audio/media_stream_audio.html
index a20c284cc25572453902e32bd24b4121b05b16b0..6513ccdfa10c6b8918a4d696255010092bd895e6 100644
--- a/ppapi/examples/media_stream_video/media_stream_video.html
+++ b/ppapi/examples/media_stream_audio/media_stream_audio.html
@@ -6,7 +6,7 @@
found in the LICENSE file.
-->
<head>
- <title>Media Stream Video Example</title>
+ <title>Media Stream Audio Example</title>
<script type="text/javascript">
var plugin;
var stream;
@@ -17,7 +17,7 @@
function success(s) {
stream = s;
- plugin.postMessage({track: stream.getVideoTracks()[0]});
+ plugin.postMessage({track: stream.getAudioTracks()[0]});
}
function failure(e) {
@@ -27,18 +27,7 @@
function initialize() {
plugin = document.getElementById('plugin');
plugin.addEventListener('message', handleMessage, false);
- var constraints = {
- "audio": false,
- "video": {
- "mandatory": {
- "minWidth": "1280",
- "minHeight": "720",
- "minFrameRate": "30"
- },
- "optional": []
- }
- };
- navigator.webkitGetUserMedia(constraints, success, failure);
+ navigator.webkitGetUserMedia({ 'audio': true }, success, failure);
}
document.addEventListener('DOMContentLoaded', initialize, false);
@@ -46,10 +35,10 @@
</head>
<body>
- <h1>Pepper MediaStream Video API Example</h1><br>
- This example demonstrates receiving frames from a video MediaStreamTrack and
+ <h1>Pepper MediaStream Audio API Example</h1><br>
+ This example demonstrates receiving frames from an audio MediaStreamTrack and
rendering them in a plugin.<br>
- <embed id="plugin" type="application/x-ppapi-example-media-stream-video"
+ <embed id="plugin" type="application/x-ppapi-example-media-stream-audio"
width="320" height="240"/>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698