Re: MediaStreams and canPlayType

On 17/10/14 21:53, Martin Thomson wrote:
> On 17 October 2014 04:56, Stefan Håkansson LK
> <stefan.lk.hakansson@ericsson.com> wrote:
>> Yes, and I was only talking about the media-element.canPlayType, nothing
>> on MediaStream(Track).
>
> The moral equivalent of canPlayType is encapsulated in the
> RTCPeerConnection API.  You can elicit this information (if you really
> care) by creating an offer.

This is where I personally end up too. But I think we should add a note 
or a sentence saying that "media-element.canPlayType can not be used to 
determine if a MediaStream can be played or not" to help web authors.

I found a site that uses

document.createElement("video").canPlayType('video/webm; codecs="vp8", 
vorbis')

to determine if the browser is compatible with their service. Somewhere 
we should document that this is not the right way.



Received on Sunday, 19 October 2014 06:31:04 UTC