Comments (10)
This is a side-effect of not using interfaces to represent platform codecs #2845 (comment)
Following that decision, it seems we need to support JS constructing the inputs to setCodecPreferences out of whole cloth, and we'd need to support case-insensitive mimeType matching here as RFC 2045 says.
from webrtc-pc.
WPTs that conjure up inputs to test browser tolerance need to use case-insensitive match.
WPTs that solely operate on codecs emitted by the browser itself are probably fine checking that case matches IMHO.
from webrtc-pc.
A WPT should never depend on anything that is not written in the specs.
The fact that all implementations today are consistent about the case of their self-generated media types doesn't mean that a WPT can depend on that being so forever.
from webrtc-pc.
I didn't mean WPTs relying on all browsers being consistent, only that they're self-consistent.
But sure, if @docfaraday can provide a list of the WPTs in question we can fix them to be case-insensitive.
Just seems a pity to allow some browser to return vIdEo/Vp8
. I'm curious how other specs deal with this, if at all.
from webrtc-pc.
The SDP specs say that if a browser gets vIdEo/Vp8, it has to behave exactly as if it got ViDeO/vP8.
It is good if we test this.
from webrtc-pc.
I did notice that and added some proper comparison in a few newer tests like in https://github.com/web-platform-tests/wpt/blob/master/webrtc-extensions/RTCRtpParameters-codec.html#L28
It would be interesting to clarify which method should be used in JS. Can the mimeType also contain UTF-8 characters?
from webrtc-pc.
RTCRtpCodec's mimeType must be:
- "listed in [IANA-RTP-2]."
- which states "Both type and subtype names are case-insensitive as defined in RFC4288."
- it further says its "registration procedures ... can be found in [RFC4855]"
- which says "RFC 4288 [1] defines media type specification and registration
procedures that use the Internet Assigned Numbers Authority (IANA) as
a central registry."- which is "Obsoleted by: 6838", where section 4.2 says
- "Both top-level type and subtype names are case-insensitive."
- and also
Type and subtype names MUST conform to the following ABNF: type-name = restricted-name subtype-name = restricted-name restricted-name = restricted-name-first *126restricted-name-chars restricted-name-first = ALPHA / DIGIT restricted-name-chars = ALPHA / DIGIT / "!" / "#" / "$" / "&" / "-" / "^" / "_""_
- where
ALPHA
is defined in core rules asALPHA = %x41-5A / %x61-7A ; A-Z / a-z
- where
- which is "Obsoleted by: 6838", where section 4.2 says
- which says "RFC 4288 [1] defines media type specification and registration
This seems clear enough to me: case-insensitive, and no UTF. Can we close?
from webrtc-pc.
Sorry my bad we need to update the codec dictionary match. I'll do a PR.
from webrtc-pc.
It would be interesting to clarify which method should be used in JS. Can the mimeType also contain UTF-8 characters?
This is a good question. Since we take DOMString as an input, we need to lower-case JS input in order to compare it. While we could UTF-8 encode it to bytes and use byte-lowercasing, we can probably just use ascii-lowercase.
from webrtc-pc.
note - quote from 6886 is missing two lines:
restricted-name-chars =/ "." ; Characters before first dot always
; specify a facet name
restricted-name-chars =/ "+" ; Characters after last plus always
; specify a structured syntax suffix
- and . are permitted in names, and have special meaning (facet and structured syntax respectively).
from webrtc-pc.
Related Issues (20)
- setCodecPreferences, sendonly codecs and dummy codecs HOT 21
- If a preferred codec is filtered out, does it still get assigned a PT? HOT 16
- Proposing setCodecPreferences to deal with both send and recv codecs HOT 6
- RTCSessionDescriptionInit vs "local" RTCLocalSessionDescriptionInit HOT 2
- Review mute/unmute/ended and constraints on RTCRtpReceiver's track. HOT 2
- Alternative storage for RTCCertificates needed HOT 6
- simple webrtc connection and manual signaling (QR, JSON, Carrier pigeon) - consent time out prevents connection HOT 3
- RTCIceCandidate's relayProtocol and url members can be null but not absent
- Missing tests for candidate amendments
- Incorporate jitterBufferTarget
- Confusion over duplicates in setCodecPreferences? Why allow them? HOT 10
- receiver.getParameters().codecs is broken (regression) HOT 4
- setCodecPreferences should take sequence<RTCRtpCodec>
- setCodecPreferences should trigger negotiationneeded HOT 3
- Implementations only update getParameters().codecs when negotiation has finished HOT 3
- Promises on the operations chain may never settle HOT 3
- RTCRtpCodecCapability is superfluous and should be deleted from the spec. HOT 3
- PC.local_description and friends - snapshot views or dynamic views? HOT 4
- Write WPT to check RTCIceCandidatePair is now an interface 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 webrtc-pc.