Comments (5)
Hey @daonb mind trying at the global level also?
pion/webrtc does that here
It might be nice to add AttributeRecursive
? This would be useful for ice as well!
from sdp.
fp,ok:=s.MediaDescriptions[0].Attribute("fingerprint")
from sdp.
fp,ok:=s.MediaDescriptions[0].Attribute("fingerprint")
Thanks!
I've tried using it instead of the regex I have now but I keep getting a !ok
. Here's my code
func GetFingerprint(sd *webrtc.SessionDescription) (string, error) {
s, err := sd.Unmarshal()
if err != nil {
return "", fmt.Errorf("Failed to unmarshal sdp: %w", err)
}
fp, ok := s.MediaDescriptions[0].Attribute("fingerprint")
if !ok {
return "", fmt.Errorf("Failed to get fingerprint from sdp")
}
...
from sdp.
Hey @daonb mind trying at the global level also?
pion/webrtc does that here
It works! Thanks. I've ended up using the global level Attribute
as terminal7 has no media.
It might be nice to add
AttributeRecursive
? This would be useful for ice as well!
I'd be happy to help, but I think we should find a better name as it's not really recursive. How about CollectAttribute
?
from sdp.
Closing as 'Not Planned'.
This would be a useful helper, but I think it has some ambiguity that will make it harder to land
- What is the behavior if the attributes differ?
- Should we notify the user if was found at global or media level?
- ?
If someone is passionate about this issue I am here to help though!
from sdp.
Related Issues (20)
- Support unmarshalling SDP containing unknown attributes or values HOT 3
- Dependency Dashboard
- Add MSRP support HOT 1
- SDP Unmarshal (lexer) syntax errors are unwieldy and difficult to work with HOT 1
- Port old fuzzing code to Go's new fuzzing tools HOT 4
- Migrate entire library to a version with attribute broken down HOT 1
- payload type not found error HOT 2
- SDP session part orders HOT 1
- Please add a new release tag HOT 1
- Parser can not read attributes with wildcards HOT 2
- sdp support transport-cc HOT 1
- Any interest in a direct RFC ABNF generated Go parser??? HOT 3
- sdp file parsing failed HOT 7
- Support non-canonical SDP for RTSP HOT 2
- Validate UnicastAddress properly HOT 1
- NewJSEPMediaDescription doesn't process codecPrefs HOT 2
- define the RTP port range HOT 4
- Action Required: Fix Renovate Configuration
- Support more values for the bandwidth types when parsing `b=` attributes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdp.