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

Side by Side Diff: content/renderer/media/web_media_element_source_utils.cc

Issue 1815033003: Add srcObject attribute of type MediaStream to HTMLMediaElement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: philipj's comments Created 4 years, 8 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/renderer/media/web_media_element_source_utils.h"
6
7 #include "third_party/WebKit/public/platform/WebMediaPlayerSource.h"
8 #include "third_party/WebKit/public/platform/WebMediaStream.h"
9 #include "third_party/WebKit/public/web/WebMediaStreamRegistry.h"
10
11 namespace content {
12
13 blink::WebMediaStream GetWebMediaStreamFromWebMediaPlayerSource(
14 const blink::WebMediaPlayerSource& source) {
15 if (source.isMediaStream())
16 return source.getAsMediaStream();
17
18 if (source.isURL()) {
19 return blink::WebMediaStreamRegistry::lookupMediaStreamDescriptor(
20 source.getAsURL());
21 }
22
23 return blink::WebMediaStream();
24 }
25
26 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698