Bug 78781

Summary: MediaStream API: Need to support MediaStream constructor
Product: WebKit Reporter: William Lin <wei.a.lin>
Component: DOMAssignee: Jeremy Mao <yujie.mao>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, ojan, tommyw, webkit.review.bot, wei.a.lin, yujie.mao
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
UseCase
none
P
none
Patch none

Description William Lin 2012-02-15 23:11:16 PST
Although there is an implementation of MediaStream constructor, web app developer can't call JavaScript api to new a MediaStream
Comment 1 William Lin 2012-02-15 23:16:11 PST
Created attachment 127317 [details]
UseCase

1. click 'add webcam' button to get local MediaStream
2. click 'duplicate mediaStream' button to construct a new MediaStream
Comment 2 William Lin 2012-02-15 23:37:12 PST
Created attachment 127319 [details]
P
Comment 3 Tommy Widenflycht 2012-02-16 06:21:00 PST
Thanks for fixing!
Comment 4 Adam Barth 2012-02-16 08:53:59 PST
Comment on attachment 127319 [details]
P

If you'd like this patch incorporated into trunk, please see these instructions: http://www.webkit.org/coding/contributing.html

In particular, you need to mark the patch review? and include a test that exercises your change.
Comment 5 Adam Barth 2012-02-16 08:54:20 PST
Comment on attachment 127319 [details]
P

View in context: https://bugs.webkit.org/attachment.cgi?id=127319&action=review

> Source/WebCore/ChangeLog:3
> +        Fix bug from r107672.

This line should also match the title of the bug.
Comment 6 Jeremy Mao 2012-03-19 01:27:28 PDT
Created attachment 132557 [details]
Patch
Comment 7 Adam Barth 2012-03-19 10:24:37 PDT
This isn't specific to JSC.
Comment 8 Adam Barth 2012-03-19 10:25:19 PDT
Comment on attachment 132557 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=132557&action=review

Ok.  Ideally we'd have a test that exercises the constructor.

> Source/WebCore/ChangeLog:8
> +        No new tests.

Does this make some of the existing tests pass?
Comment 9 Tommy Widenflycht 2012-03-19 11:02:27 PDT
Just FYI: Creating a MediaStram out of tracks from other MediaStreams isn't tested in Chromium yet.
Comment 10 Jeremy Mao 2012-03-19 17:09:22 PDT
(In reply to comment #7)
> This isn't specific to JSC.
Yes, it's not specific to JSC, thanks for changing the title.
Comment 11 Jeremy Mao 2012-03-19 17:26:43 PDT
(In reply to comment #8)
> (From update of attachment 132557 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=132557&action=review
> Ok.  Ideally we'd have a test that exercises the constructor.
> > Source/WebCore/ChangeLog:8
> > +        No new tests.
> Does this make some of the existing tests pass?
Currently in Webkit there's no tests exercise this media stream constructor, because creating a new media stream need a exsiting media steam which we cannot get from getUserMedia. getUserMedia now has a impelementation only for the chromium port, I have tested this use case on chromium, it works.
Comment 12 WebKit Review Bot 2012-03-21 10:08:41 PDT
Comment on attachment 132557 [details]
Patch

Clearing flags on attachment: 132557

Committed r111558: <http://trac.webkit.org/changeset/111558>
Comment 13 WebKit Review Bot 2012-03-21 10:08:46 PDT
All reviewed patches have been landed.  Closing bug.