Commit c60f792b authored by Anssi Piirainen's avatar Anssi Piirainen
Browse files

Sanitize cue point parameter key values.

parent 17128c72
......@@ -47,10 +47,7 @@ package org.flowplayer.controller {
}
public function onMetaData(infoObject:Object):void {
log.info("onMetaData, current clip " + _clip);
log.debug("onMetaData, data for clip " + _clip + ":");
log.debug("onMetaData(), data for clip " + _clip + ":");
var metaData:Object = new Object();
for (var key:String in infoObject) {
if (key == "duration" && _clip && _clip.metaData && _clip.metaData.duration) {
......
......@@ -708,16 +708,17 @@ package org.flowplayer.view {
if (name == "onCuePoint") {
var cuepoint:Cuepoint = Cuepoint.createDynamic(infoObj["time"], "embedded");
for (var prop:String in infoObj) {
log.debug(prop + ": " + infoObj[prop]);
// log.debug(prop + ": " + infoObj[prop]);
if (prop == "parameters") {
for (var param:String in infoObj.parameters) {
log.debug(param + ": " + infoObj.parameters[param]);
cuepoint.addParameter(param, infoObj.parameters[param]);
cuepoint.addParameter(param.replace(/[^a-z0-9]+/gi, ""), infoObj.parameters[param]);
}
} else {
cuepoint[prop] = infoObj[prop];
}
}
log.debug("Dispatching cuepoint", cuepoint);
playlist.current.dispatch(ClipEventType.forName(name), cuepoint);
return;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment