mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-09-10 11:54:40 +00:00
28 lines
832 B
JavaScript
28 lines
832 B
JavaScript
function check_wave(v, enabled) {
|
|
function check(type, expected) {
|
|
is(v.canPlayType(type), enabled ? expected : "", type);
|
|
}
|
|
|
|
// Wave types
|
|
check("audio/wave", "maybe");
|
|
check("audio/wav", "maybe");
|
|
check("audio/x-wav", "maybe");
|
|
check("audio/x-pn-wav", "maybe");
|
|
|
|
// Supported Wave codecs
|
|
check("audio/wave; codecs=1", "probably");
|
|
// "no codecs" should be supported, I guess
|
|
check("audio/wave; codecs=", "probably");
|
|
check("audio/wave; codecs=\"\"", "probably");
|
|
|
|
// Unsupported Wave codecs
|
|
check("audio/wave; codecs=0", "");
|
|
check("audio/wave; codecs=2", "");
|
|
check("audio/wave; codecs=xyz,1", "");
|
|
check("audio/wave; codecs=1,xyz", "");
|
|
check("audio/wave; codecs=\"xyz, 1\"", "");
|
|
// empty codec names
|
|
check("audio/wave; codecs=,", "");
|
|
check("audio/wave; codecs=\"0, 1,\"", "");
|
|
}
|