Video canPlayType() Yöntemi
Örnek
Tarayıcınızın farklı video türlerini oynatıp oynatamadığını kontrol edin:
var x = document.createElement("VIDEO");
isSupp = x.canPlayType(vidType+';codecs="'+codType+'"');
Tanım ve Kullanım
canPlayType() yöntemi, tarayıcının belirtilen video türünü oynatıp oynatamadığını kontrol eder.
canPlayType() yöntemi, aşağıdaki değerlerden birini döndürebilir:
- "muhtemelen" - tarayıcı büyük olasılıkla bu video türünü destekliyor
- "belki" - tarayıcı bu video türünü destekleyebilir
- "" - (boş dize) tarayıcı bu video türünü desteklemiyor
Tarayıcı Desteği
Method | |||||
---|---|---|---|---|---|
canPlayType() | Yes | 9.0 | Yes | Yes | Yes |
Sözdizimi
videoObject.canPlayType(type)
Parametre Değerleri
Value | Description |
---|---|
type | Specifies the video type (and optional codecs) to test support for. Common values:
Common values, including codecs:
Note: This method can only return "probably" if codecs are included. |
Teknik detaylar
Geri dönüş değeri: | Destek düzeyini temsil eden bir Dize. Olası dönüş değerleri:
|
---|
❮ Video Nesnesi