...
Code Block | ||||
---|---|---|---|---|
| ||||
... @property (strong,nonatomic) AVPlayerViewController *player; ... player = [[AVPlayerViewController alloc] init]; player.player = [AVPlayer playerWithURL:url]; self.player.view.frame = self.videoPlaceholder.frame; [self.view addSubview:self.player.view]; KMA_MediaPlayerAdapter *adapter = [[KMA_MediaPlayerAdapter alloc] adapter:self.player]; //Call track to track the video player NSMutableDictionary * atts = [[NSMutableDictionary alloc] init]; [atts setObject:@"live/iOS/teststream" forKey:@"stream"]; //mandatory // [atts setObject:@"test" forKey:@"cq"]; //optional see implementation guideline // [atts setObject:@"1369" forKey:@"vt"]; //optional see implementation guideline // [atts setObject:@"testSiteName" forKey:@"sitename="]; //optional see implementation guideline Stream *stream = [self.spring track:adapter atts:atts]; [selfatts createAttributes]release]; ... |
First, the player and the object needs to be instantiated, that is able to deliver the current position on a stream in seconds. In the second step the adapters must be produced, which implements this requirement accurately.
...