feat: add new removeLineByKey method as a PoC #20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello, team. I would like to share my Proof of Concept (PoC) regarding the use of the
MediaDescription
method. Currently, the method only allows adding lines to the Session Description Protocol (SDP). However, I encountered a situation where I needed to delete certain lines from the SDP. To address this, I propose a new method allowing deleting lines from the SDP. My idea is to use specific key strings to avoid any typos or errors. This method will ideally be used in TypeScript projects, but it will also be able to handle strange key values. I would appreciate your thoughts and feedback on this. Let's discuss if this can potentially be useful for our project.Here's an example of how we are currently working in WCME with deleting properties:
with this PoC:
Some additional thoughts on why it may potentially be a better option:
Using
mediaDescription.bandwidth = undefined
does not seem the best option because we have a library that manipulates with SDP, and here, when using the previous option, we disregard the abstraction and directly manipulate the object. If, in the future, theMediaDescription
class is no longer an object, then we will have to find all the places that work directly with the object and update them. However, usingmediaDescription.removeLineByKey("bandwidth")
will only change the implementation of ats-sdp
method.I also noticed that we have an
AvMediaDescription
class with some extra properties that have been deleted in the same way. Additionally, we can a similar handling method which could also be placed inside theAvMediaDescription
class. This would allow for the handling of deletion keys, such asmediaDescription.simulcast = undefined
, from within theAvMediaDescription
class.