Commit d2850da6 authored by Greg Rutz's avatar Greg Rutz

Updates to inband event processing

parent f6548b99
......@@ -696,14 +696,14 @@ app.controller('DashController', function($scope, Sources, Notes, Contributors,
console.log("Cues changed!");
var datacue = event;
datacue.onenter = function() {
console.log("CUE ENTERED...")
console.log("CUE ENTERED...");
printCue(datacue);
console.log("DATA = " + atob(datacue.data));
}
};
datacue.onexit = function() {
console.log("CUE EXITED...");
printCue(datacue);
}
};
};
}
......
......@@ -246,6 +246,7 @@ Dash.dependencies.DashAdapter = function () {
event.id = id;
event.presentationTime = presentationTime;
event.messageData = messageData;
event.boxSize = eventBox.size;
event.presentationTimeDelta = presentationTimeDelta;
return event;
......
......@@ -100,6 +100,7 @@ MediaPlayer.dependencies.EventController = function(){
for(var i = 0; i < values.length; i++) {
var event = values[i];
if (!(event.id in inbandEvents)) {
var data = new Uint8Array(event.messageData.buffer.slice(event.messageData.byteOffset, event.boxSize));
inbandEvents[event.id] = event;
self.log("Add inband event with id " + event.id);
......@@ -110,7 +111,7 @@ MediaPlayer.dependencies.EventController = function(){
addCue(new DataCue(event.id,
event.presentationTime / event.eventStream.timescale,
(event.presentationTime + event.duration) / event.eventStream.timescale,
btoa((new X2JS(null, "")).json2xml_str(event.messageData))));
String.fromCharCode.apply(null, data)));
} else {
self.log("Repeated event with id " + event.id);
}
......
......@@ -59,7 +59,8 @@ MediaPlayer.utils.IsoFile = function () {
scheme_id_uri: "scheme_id_uri",
presentation_time_delta: "presentation_time_delta",
event_duration: "event_duration",
message_data: "message_data"
message_data: "message_data",
size: "size"
},
mdhdProps = {
......
Markdown is supported
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