Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following code block shows an example for the use of the library.

Code Block
cpp
cpp
...
MPMoviePlayerController@property (strong,nonatomic) AVPlayerViewController *player = [[[MPMoviePlayerController alloc] initWithContentURL: theURL] autorelease];
...

adapterplayer = [[MediaPlayerAdapterAVPlayerViewController alloc] adapter:playerinit];

NSMutableDictionary * attsplayer.player = [[NSMutableDictionary alloc] init];
[atts setObject:@"iOS/teststream" forKey:@"stream"]; // mandatory
// [atts setObject:@"4711" forKey:@"cq"]; //optional see implementation guideline
// [atts setObject:@"mobile" forKey:@"ct"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];
//optionalCall seetrack implementationto guidelinetrack Streamthe *streamvideo =player
[self.spring track:adapter atts:atts];
[attsself releasecreateAttributes]];
...

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.

...