[Webkit-unassigned] [Bug 51457] New: [EFL] Return 'null' instead of 'application/octet-stream' in getMIMETypeForExtension()
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Dec 22 02:47:03 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=51457
Summary: [EFL] Return 'null' instead of
'application/octet-stream' in
getMIMETypeForExtension()
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: P2
Component: WebKit EFL
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: gyuyoung.kim at samsung.com
WebKit EFL can't play html5 audio now. I look into WebCore in order to find the reason. When MediaPlayer loads content via url, it checks mediaType with file extension. But, if getMIMETypeForExtension() of MIMETypeRegistryEfl.cpp cannot find same mime type with the extension, it returns "application/octet-stream".
String MIMETypeRegistry::getMIMETypeForExtension(const String &ext)
{
String s = ext.lower();
const ExtensionMap *e = extensionMap;
while (e->extension) {
if (s == e->extension)
return e->mimeType;
++e;
}
return "application/octet-stream";
}
But, if the getMIMETypeForExtension() of MIMETypeRegistryEfl.cpp cannot find appropriate mime type, getMIMETypeForExtension() of MIMETypeRegistry.cpp tries to find mime type in mediaMIMETypeMap() of MIMETypeRegistry.cpp.
Unfortunately, HTML5 Audio doesn't be played in WebKit EFL because getMIMETypeForExtension() of MIMETypeRegistryEfl.cpp returns "application/octet-stream".
String MIMETypeRegistry::getMediaMIMETypeForExtension(const String& ext)
{
// Look in the system-specific registry first.
String type = getMIMETypeForExtension(ext);
if (!type.isEmpty())
return type;
Vector<String>* typeList = mediaMIMETypeMap().get(ext);
if (typeList)
return (*typeList)[0];
return String();
}
So, I change the "application/octet-stream" with "String()". Below demo sites can be worked based on this patch.
- http://moztw.org/demo/audioplayer/
- http://www.scottandrew.com/pub/html5audioplayer/
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list