在我的应用程序中,我正在实现视频跟踪。我使用了以下代码
public static void Videotracking (String AppState,String Mappingevent1,String Mappingevent2,String Mappingevent3)
{
ADMS_MediaMeasurement mediaMeasure = ADMS_MediaMeasurement.sharedInstance();
Hashtable<String, Object> milestoneMapping = new Hashtable<String, Object>();
milestoneMapping.put(Mappingevent1, "event9");
milestoneMapping.put(Mappingevent2, "event10");
milestoneMapping.put(Mappingevent3, "event11");
Hashtable<String, Object> contextDataMapping= new Hashtable<String, Object>();
contextDataMapping.put("a.media.milestones", milestoneMapping);
contextDataMapping.put("a.media.name", "eVar29,prop29");
contextDataMapping.put("a.media.segment", "eVar55");
contextDataMapping.put("a.contentType", "eVar5"); //note that this is not in the .media namespace
contextDataMapping.put("a.media.timePlayed", "event26");
contextDataMapping.put("a.media.view", "event8");
contextDataMapping.put("a.media.segmentView", "event25");
contextDataMapping.put("a.media.complete", "event12");
mediaMeasure.contextDataMapping =contextDataMapping;
mediaMeasure.trackVars="evar57,evar58,evar59";
mediaMeasure.trackMilestones=Mappingevent1+","+Mappingevent2+","+Mappingevent3;
}
但我无法找到在视频开始或完成时将这些 dat 发送到服务器的时间,当我调用此方法时它发送两个请求而不是一个请求;
如果有任何实施视频跟踪,请提供帮助。