You can monitor QoS statistics by using an NSTimer (or other methods) to scan the information provided by PTQOSProvider.
qosProvider = [[PTQOSProvider alloc]initWithPlayer:self.player];
PTDeviceInformation *devInfo = qosProvider.deviceInformation;
if (devInfo) {
[consoleView logMessage:@"=== qosDeviceInfo:==\n os =%@\n model =
%@\n id =%@\n\n", devInfo.os, devInfo.model, devInfo.id];
}
[NSTimer scheduledTimerWithTimeInterval:2.0 target:self
selector:@selector(printPlaybackInfoLog) userInfo:nil repeats:YES];
- (void)printPlaybackInfoLog {
PTPlaybackInformation *playbackInfo = qosProvider.playbackInformation;
if (playbackInfo) {
// For example:
NSString *infoLog = [NSString stringWithFormat:@"observedBitrate :
%f\n",playbackInfo.observedBitrate];
[consoleView logMessage:@"====%@\n\n",infoLog];
}
}