Bonjour a tous,

Je cree une application Hybride a l'aide d'Apache Cordova.
Pour mon application utilise le plugin : Cordova Streaming Media plugin
Voici l'URL : https://github.com/nchutchind/Stream...Cordova-Plugin

En fouillant un peu le code source, j'ai reussi a trouve ou est cree la view qui lance la video.
Il s'agit du fichier: StreamingMedia.m

Voici l'URL:
https://github.com/nchutchind/Stream...reamingMedia.m

Sauf erreur, la fonction qui m'interesse est startPlayer()

Afin de bien commencer, j'ai essaye d'inserer un texte avec marque "Hello World!" et de l'afficher sur la video, mais rien ne se passe.
La video se lance sans aucun probleme, mais je ne vois pas mon "Hello World!"

Comme je suis nouveau dans le developpement Objective C, j'essaie de trouver une communaute de personnes pouvant m'aider a progresser.
Voici mon code :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
 
-(void)startPlayer:(NSString*)uri {
	NSURL *url = [NSURL URLWithString:uri];
 
	moviePlayer =  [[MPMoviePlayerController alloc] initWithContentURL:url];
 
	// Listen for playback finishing
	[[NSNotificationCenter defaultCenter] addObserver:self
											 selector:@selector(moviePlayBackDidFinish:)
												 name:MPMoviePlayerPlaybackDidFinishNotification
											   object:moviePlayer];
	// Listen for click on the "Done" button
	[[NSNotificationCenter defaultCenter] addObserver:self
											 selector:@selector(doneButtonClick:)
												 name:MPMoviePlayerWillExitFullscreenNotification
											   object:nil];
	// Listen for orientation change
	[[NSNotificationCenter defaultCenter] addObserver:self
											 selector:@selector(orientationChanged:)
												 name:UIDeviceOrientationDidChangeNotification
											   object:nil];
 
	moviePlayer.controlStyle = MPMovieControlStyleDefault;
 
	moviePlayer.shouldAutoplay = YES;
	if (imageView != nil) {
		[moviePlayer.backgroundView setAutoresizesSubviews:YES];
		[moviePlayer.backgroundView addSubview:imageView];
	}
 
	moviePlayer.backgroundView.backgroundColor = backgroundColor;
 
	[self.viewController.view addSubview:moviePlayer.view];
 
	// Note: animating does a fade to black, which may not match background color
	[moviePlayer setFullscreen:YES animated:NO];
 
 
 
	// Voici mon code :
 
	UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 100, 0, 0)];
	label.text = @"Hello World!";
 
	CGRect frame = label.frame;
 
	// pour l'exemple
	frame.origin.x = 100; 
	frame.origin.y = 50;
 
	label.frame = frame;
 
	[self.viewController.view addSubview:label];
}

Ou est mon erreur ?
Est ce une question de zIndex (par exemple: la video se trouve devant le texte donc, mon texte est bien affiche mais on ne le voit pas) ?
Est ce un probleme d'incompatibilite (par exemple : on ne peut rien n'affiche sur une video) ?

J'avoue etre un peu perdu et je ne trouve pas d'aide malgre mes differentes recherche.

Ce que je souhaite realise au final, c'est ceci :

Nom : ????????? 2015-08-13 14.38.01.png
Affichages : 120
Taille : 212,8 Ko

=> Ajouter une barre de controle permettant de jouer sur la vitesse de lecture.
Je ne pense pas que ce soit un projet ambitieux, mais si je n'arrive pas a afficher un simple "Hello World!" inutile de m'aventurer la dedans.

Pour info, j'ai essaye d'inserer une barre de control en suivant les explications de ce site :
http://www.raywenderlich.com/36288/h...custom-control

Mais comme pour le "Hello World!" ca ne fonctionne pas (je n'ai pas d'erreur), donc je me focalise sur le "Hello World!" avant d'aller plus loin.
Si ca vous interesse, voici mon code :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
 
-(void)startPlayer:(NSString*)uri {
	NSURL *url = [NSURL URLWithString:uri];
 
	moviePlayer =  [[MPMoviePlayerController alloc] initWithContentURL:url];
 
	// Listen for playback finishing
	[[NSNotificationCenter defaultCenter] addObserver:self
											 selector:@selector(moviePlayBackDidFinish:)
												 name:MPMoviePlayerPlaybackDidFinishNotification
											   object:moviePlayer];
	// Listen for click on the "Done" button
	[[NSNotificationCenter defaultCenter] addObserver:self
											 selector:@selector(doneButtonClick:)
												 name:MPMoviePlayerWillExitFullscreenNotification
											   object:nil];
	// Listen for orientation change
	[[NSNotificationCenter defaultCenter] addObserver:self
											 selector:@selector(orientationChanged:)
												 name:UIDeviceOrientationDidChangeNotification
											   object:nil];
 
	moviePlayer.controlStyle = MPMovieControlStyleDefault;
 
	moviePlayer.shouldAutoplay = YES;
	if (imageView != nil) {
		[moviePlayer.backgroundView setAutoresizesSubviews:YES];
		[moviePlayer.backgroundView addSubview:imageView];
	}
 
	moviePlayer.backgroundView.backgroundColor = backgroundColor;
 
	[self.viewController.view addSubview:moviePlayer.view];
 
	// Note: animating does a fade to black, which may not match background color
	[moviePlayer setFullscreen:YES animated:NO];
 
 
 
 
	// mon code
	NSUInteger margin = 20;
 	CGRect sliderFrame = CGRectMake(margin, margin, self.viewController.view.frame.size.width - margin * 2, 30);
 	_rangeSlider.backgroundColor = [UIColor redColor];
 
 	[self.viewController.view addSubview:_rangeSlider];
 	/// [self.viewController.view sendSubviewToBack:_rangeSlider];
 
}

Merci