Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement HTMLMediaElement.volume attribute #22292
Comments
|
Hi! If you have any questions regarding this issue, feel free to make a comment here, or ask it in the If you intend to work on this issue, then add |
|
Hi, I'm very new to the open source world. |
|
As I could see, I have to change the HTMLMediaElement struct (in file : servo/components/script/dom/htmlmediaelement.rs) by adding this new volume field. Probably, I'll have to change either the HTMLMediaElement::new_inherited() function that build this object. Will I have to handle how to retrieve this value? 'Cause in the specification says that : "If the new value is outside the range 0.0 to 1.0 inclusive, then, on setting, an "IndexSizeError" DOMException must be thrown instead." |
|
@highfive: assign me |
|
Hey @lucasfantacuci! Thanks for your interest in working on this issue. It's now assigned to you! |
|
There will be six parts to this:
@ferjm will likely need to provide a bit more guidance on the final two steps. |
|
Oh, thx Sir. I'm following the guides, and as soon as possible, I gonna create a PR. |
You'll need to add a new For the gstreamer implementation, we have the
The |
|
Sirs, should I create any kind of test for it? |
|
There are already some Web Platform Tests for this:
You will likely need to update the tests expectations since hopefuly all or at least some of these tests will start passing. |
|
Hi Sirs, I'm stucked trying to realize how to deal with that: I changed the .webidl file, so it will execute a script, that enforces me to implement two methods into HTMLMediaElementMethods. The getter one and the setter one. Here is what the command ./mach check throws me: Since it says that the SetVolume must return the unit type "()". How should I check the provided value in this setter? I was expecting to return something like Err("IndexSizeError"), but I can't return anything. Therefore, at the player trait I can return a kind of error, so, Should I code this provided value checking at the interface realization? |
|
You will need to aadd the |
…lume_attribute, r=<try> Implementing HTMLMediaElement.volume attribute <!-- Please describe your changes on the following line: --> Work In Progress. Do not Accept. This P.R. is going to implement the volume attribute to the HTMLMediaElement --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #22292. <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22324) <!-- Reviewable:end -->
…lume_attribute, r=<try> Implementing HTMLMediaElement.volume attribute <!-- Please describe your changes on the following line: --> Work In Progress. Do not Accept. This P.R. is going to implement the volume attribute to the HTMLMediaElement --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #22292. <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22324) <!-- Reviewable:end -->
…lume_attribute, r=ferjm Implementing HTMLMediaElement.volume attribute <!-- Please describe your changes on the following line: --> This P.R. is going to implement the volume attribute to the HTMLMediaElement --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #22292. <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22324) <!-- Reviewable:end -->
…lume_attribute, r=ferjm Implementing HTMLMediaElement.volume attribute <!-- Please describe your changes on the following line: --> This P.R. is going to implement the volume attribute to the HTMLMediaElement --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #22292. <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22324) <!-- Reviewable:end -->

Spec: https://html.spec.whatwg.org/multipage/media.html#dom-media-volume