Skip to content

Commit

Permalink
Add constraints for PannerNode
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Aug 24, 2018
1 parent 3578ab0 commit e7ed310
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions components/script/dom/audionode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@ impl AudioNodeMethods for AudioNode {
return Err(Error::IndexSize);
}
},
EventTargetTypeId::AudioNode(AudioNodeTypeId::PannerNode) => {
if value > 2 {
return Err(Error:NotSupported)
}
}
// XXX We do not support any of the other AudioNodes with
// constraints yet. Add more cases here as we add support
// for new AudioNodes.
Expand Down Expand Up @@ -246,6 +251,11 @@ impl AudioNodeMethods for AudioNode {
return Err(Error::InvalidState);
}
},
EventTargetTypeId::AudioNode(AudioNodeTypeId::PannerNode) => {
if value == ChannelCountMode::Max {
return Err(Error:NotSupported)
}
}
// XXX We do not support any of the other AudioNodes with
// constraints yet. Add more cases here as we add support
// for new AudioNodes.
Expand Down

0 comments on commit e7ed310

Please sign in to comment.