Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Doubts regarding the subsequent steps.

34 views
Skip to first unread message

Srivatsan Narasimhan

unread,
Apr 26, 2019, 1:38:03 AM4/26/19
to jo...@joshmatthews.net, dev-...@lists.mozilla.org
Hi Josh,
This is Srivatsan Narasimhan from NCSU currently working on this issue
https://github.com/servo/servo/issues/22898 along with my team mates
akhilesh, balaji and arjun as a part of the course OODD. I uncommented the
methods in the AudioListener.webidl and currently i am having some issues
on writing the methods. I am getting problems with making the two
functions a member of the trait AudioListener methods.Is there any
reference or a guide that could help me with this?
Thanks
Srivatsan Narasimhan

Cheng You Bai

unread,
Apr 26, 2019, 5:28:33 AM4/26/19
to dev-...@lists.mozilla.org, jo...@joshmatthews.net
Hi Srivatsan,

This is CYBAI who is a Servo contributor.

I think you can try to read this blogpost
<http://jeenalee.com/2016/10/03/implementing-doge-for-servo.html>.
It explains how to add a new DOM API for Servo from scratch and also
includes the uncomment methods part.

Hope it help!

Cheers,
CYBAI

On Fri, Apr 26, 2019 at 2:38 PM Srivatsan Narasimhan <snar...@ncsu.edu>
wrote:
> _______________________________________________
> dev-servo mailing list
> dev-...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-servo
>

Akhilesh Venkatasubramanian

unread,
Apr 26, 2019, 6:50:29 AM4/26/19
to dev-...@lists.mozilla.org
HI CYBAI,

1. We are trying to implement the SetOrientation and the SetPosition
methods as here
<https://webaudio.github.io/web-audio-api/#AudioListener-methods>. We tried
quite a few variations, but not able to store the passed function value
into forwardX
<https://webaudio.github.io/web-audio-api/#dom-audiolistener-forwardx>.value
<https://webaudio.github.io/web-audio-api/#dom-audioparam-value>, forwardY
<https://webaudio.github.io/web-audio-api/#dom-audiolistener-forwardy>.value
<https://webaudio.github.io/web-audio-api/#dom-audioparam-value> etc. Can
you probably give us some pointers as to how we can proceed? I'm guessing
we should call the from the function as shown here
<https://github.com/servo/servo/blob/master/components/script/dom/audiolistener.rs#L147-L152>
.

2. Also, is there any example that I can refer to for rising the
NotSupportedError <https://heycam.github.io/webidl/#notsupportederror>?
Because we didn't clearly understand how we can check whether there is an
automation curve set using SetValueCurve for forwardX
<https://webaudio.github.io/web-audio-api/#dom-audiolistener-forwardx>,
forwardY
<https://webaudio.github.io/web-audio-api/#dom-audiolistener-forwardy>,
forwardZ
<https://webaudio.github.io/web-audio-api/#dom-audiolistener-forwardz> etc.

Thanks.

Josh Bowman-Matthews

unread,
Apr 26, 2019, 9:56:34 AM4/26/19
to dev-...@lists.mozilla.org
To throw a NotSupportedError, you can use
https://dxr.mozilla.org/servo/source/components/script/dom/audionode.rs#280
as an example, and see that the WebIDL contains either [Throws] (for a
method) or [SetterThrows]/[GetterThrows] for an attribute
(https://dxr.mozilla.org/servo/rev/56c2e85cab5b01ad31be3c69f0fcc2c992960e5c/components/script/dom/webidls/AudioNode.webidl#58)

For SetOrientation/SetPosition, you will need to access each appropriate
AudioParam member of AudioListener and invoke the SetValue method
(https://github.com/servo/servo/blob/56c2e85cab5b01ad31be3c69f0fcc2c992960e5c/components/script/dom/audioparam.rs#L123).

Srivatsan Narasimhan

unread,
Apr 26, 2019, 6:01:53 PM4/26/19
to jo...@joshmatthews.net, dev-...@lists.mozilla.org
Hi Josh,
I wrote the two methods with the help of the links you gave before and it
is building without anu errors. Now i have some doubts regarding the
NotSupportedError message. I am not sure when to call that because in the
method description it says that it should be thrown if any of the
attributes have any automation curve set using setValueCurveAtTime() and i
am not sure how to handle that. Can you help me with that?
Thanks
Srivatsan Narasimhan

On Fri, Apr 26, 2019 at 1:37 AM Srivatsan Narasimhan <snar...@ncsu.edu>

Josh Bowman-Matthews

unread,
Apr 27, 2019, 9:52:24 AM4/27/19
to dev-...@lists.mozilla.org
It's not clear to me how to obtain the information about whether a value
curve is active. I recommend making a pull request with the rest of the
changes and adding a TODO comment about the missing check.

Manish Goregaokar

unread,
Apr 27, 2019, 4:07:05 PM4/27/19
to dev-servo
Yeah, please leave a todo comment. Currently there's no way to validate
this, in the future the DOM side will also have a timeline struct so that
it can do this.

Thanks,
-Manish Goregaokar


On Sat, Apr 27, 2019 at 6:52 AM Josh Bowman-Matthews <jo...@joshmatthews.net>
wrote:

> It's not clear to me how to obtain the information about whether a value
> curve is active. I recommend making a pull request with the rest of the
> changes and adding a TODO comment about the missing check.
>
> On 4/26/19 6:01 PM, Srivatsan Narasimhan wrote:
0 new messages