Index: tmp/org.txm.backtomedia.rcp/src/vlcplayerrcp/messages.properties
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/vlcplayerrcp/messages.properties	(revision 2431)
+++ tmp/org.txm.backtomedia.rcp/src/vlcplayerrcp/messages.properties	(revision 2432)
@@ -1,6 +1,6 @@
 
 BackToMediaPreferencePage_1 = Open the player with the repeat option enable
-BackToMediaPreferencePage_2 = Use word property to get time
+BackToMediaPreferencePage_2 = Media span build strategy
 BackToMediaPreferencePage_3 = Span to play
 BackToMediaPreferencePage_4 = Word time property
 BackToMediaPreferencePage_5 = Structure
@@ -37,7 +37,7 @@
 
 playing = Playing {0} from {1} ms to {2} ms ...
 
-rate = Speed
+rate = Spd
 
 repeat = Repeat
 
Index: tmp/org.txm.backtomedia.rcp/src/vlcplayerrcp/messages_fr.properties
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/vlcplayerrcp/messages_fr.properties	(revision 2431)
+++ tmp/org.txm.backtomedia.rcp/src/vlcplayerrcp/messages_fr.properties	(revision 2432)
@@ -1,6 +1,6 @@
 
 BackToMediaPreferencePage_1 = Répéter le média
-BackToMediaPreferencePage_2 = Récupérer le temps à partir d''une propriété de mot
+BackToMediaPreferencePage_2 = Stratégie de construction de l''empan à jouer
 BackToMediaPreferencePage_3 = Empan à jouer
 BackToMediaPreferencePage_4 = Propriété de mot de temps
 BackToMediaPreferencePage_5 = Structure
@@ -37,7 +37,7 @@
 
 playing = Joue {0} depuis {1} ms à {2} ms ...
 
-rate = Vitesse
+rate = Vit
 
 repeat = Répéter
 
Index: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/vlcplayer/VLCPlayer.java
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/vlcplayer/VLCPlayer.java	(revision 2431)
+++ tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/vlcplayer/VLCPlayer.java	(revision 2432)
@@ -48,22 +48,28 @@
 			
 			@Override
 			protected void onFound(String path, NativeDiscoveryStrategy strategy) {
-				Log.finer("VLC NativeDiscovery: Found " + path + " " + strategy);
+				Log.finer("VLC NativeDiscovery: onFound " + path + " " + strategy);
 			}
 			
 			@Override
 			protected void onNotFound() {
-				Log.finer("VLC NativeDiscovery: Not found");
+				Log.finer("VLC NativeDiscovery: Not found.");
 			}
 		};
 		boolean found = discovery.discover();
-		Log.finer("VLC NativeDiscovery: " + found);
-		libvlc_instance_t instance = libvlc_new(0, new StringArray(new String[0]));
-		Log.finer("VLC NativeDiscovery: instance " + instance);
-		if (instance != null) {
-			libvlc_release(instance);
+		Log.finer("VLC NativeDiscovery: the discovery was succesfull ? " + found);
+		if (found) {
+			libvlc_instance_t instance = libvlc_new(0, new StringArray(new String[0]));
+			Log.finer("VLC NativeDiscovery: VLC instance is " + instance);
+			if (instance != null) {
+				libvlc_release(instance);
+			} else {
+				Log.warning(NLS.bind("** Impossible to use your VLC [{0}] (please check that you have at least VLC version 3.0).", instance));
+			}
+			Log.finer("VLC NativeDiscovery: VLC version is " + new LibVlcVersion().getVersion());
+		} else {
+			Log.warning("** Impossible to find VLC (please check that you have at least VLC version 3.0).");
 		}
-		Log.finer("VLC NativeDiscovery: " + new LibVlcVersion().getVersion());
 	}
 	
 	protected static final String NOMEDIA = ""; //$NON-NLS-1$
@@ -340,11 +346,12 @@
 			
 			@Override
 			public void opening(MediaPlayer mediaPlayer) {
-				Log.info("Opening media...");
+				Log.finer("Opening media...");
 			}
 			
 			@Override
 			public void finished(MediaPlayer mediaPlayer) {
+				Log.finer("Finished playing media...");
 				mediaPlayer.submit(new Runnable() {
 					
 					@Override
@@ -357,7 +364,6 @@
 						}
 					}
 				});
-				
 			}
 		});
 		
@@ -539,23 +545,26 @@
 		
 		// if (start == end) end = -1;
 		
-		Log.fine(MessagesMP.bind(MessagesMP.playing, new Object[] { mrl, startTime, endTime }));
+		Log.finer(MessagesMP.bind(MessagesMP.playing, new Object[] { mrl, startTime, endTime }));
 		// vlcPlayer.submit(new Runnable() {
 		//
 		// @Override
 		// public void run() {
 		String[] options = { " :live-caching=200" }; // reduce video stream cache duration to 200ms
 		
-		System.out.println("Preparing media...");
+		Log.finer("Preparing media...");
 		if (!vlcPlayer.media().prepare(mrl, options)) {
+			Log.finer("** Impossible to prepare media.");
 			return false;
 		}
 		
-		System.out.println("Is media valid ?");
+		Log.finer("Is media valid ?");
 		if (!vlcPlayer.media().isValid()) {
+			Log.finer("** Invalid media.");
 			return false;
 		}
-		System.out.println("Playing media...");
+		
+		Log.info("Playing media...");
 		vlcPlayer.controls().play();
 		vlcPlayer.audio().setVolume(volume);
 		vlcPlayer.controls().setTime(start);
Index: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/MediaPreferencesDialog.java
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/MediaPreferencesDialog.java	(revision 2431)
+++ tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/MediaPreferencesDialog.java	(revision 2432)
@@ -24,7 +24,8 @@
 
 public class MediaPreferencesDialog extends Dialog {
 	
-	public static String[] properties = { BackToMediaPreferences.STRUCTURE_START_PROPERTY,
+	public static String[] properties = { BackToMediaPreferences.REPEAT, 
+			BackToMediaPreferences.STRUCTURE_START_PROPERTY,
 			BackToMediaPreferences.STRUCTURE_END_PROPERTY,
 			BackToMediaPreferences.STRUCTURE,
 			BackToMediaPreferences.WORD_PROPERTY,
Index: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/BackToMedia.java
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/BackToMedia.java	(revision 2431)
+++ tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/BackToMedia.java	(revision 2432)
@@ -504,13 +504,10 @@
 			if (editor != null) {
 				vlcEditor = associatedEditors.get(editor);
 			}
-			if (vlcEditor != null && !vlcEditor.getPlayer().isDisposed()) {
-				vlcEditor.getPlayer().play(path, sStartTime, sEndTime);
-				vlcEditor.getPlayer().setRepeat(true);
-			}
-			else {
+			
+			if (vlcEditor == null) {
 				// System.out.println("new editor linked to "+ce);
-				vlcEditor = OpenVLCPlayer.openEditor(path, sStartTime, sEndTime);
+				vlcEditor = OpenVLCPlayer.openEditor();
 				
 				// editor.getPlayer().setRepeat(true);
 				if (vlcEditor == null) {
@@ -518,19 +515,6 @@
 					return null;
 				}
 				
-				if (!vlcEditor.isMediaLoaded()) {
-					
-					vlcEditor.getSite().getPage().closeEditor(vlcEditor, false);
-					if (media_auth) {
-						Log.warning("The MediaPlayer could not open the media: " + media_directory); // don't show credentials
-						System.clearProperty(BackToMediaPreferences.MEDIA_AUTH_PASSWORD);
-						System.clearProperty(BackToMediaPreferences.MEDIA_AUTH_LOGIN);
-					}
-					else {
-						Log.warning("The MediaPlayer could not open the media: " + path);
-					}
-				}
-				
 				// move the editor in the window
 				int position = BackToMediaPreferences.getInstance().getInt(BackToMediaPreferences.BACKTOMEDIA_POSITION);
 				if (editor != null) {
@@ -544,6 +528,22 @@
 				}
 			}
 			
+			vlcEditor.getPlayer().play(path, sStartTime, sEndTime);
+			vlcEditor.getPlayer().setRepeat(true);
+			
+			if (!vlcEditor.isMediaLoaded()) {
+				
+				vlcEditor.getSite().getPage().closeEditor(vlcEditor, false);
+				if (media_auth) {
+					Log.warning("The MediaPlayer could not open the media: " + media_directory); // don't show credentials
+					System.clearProperty(BackToMediaPreferences.MEDIA_AUTH_PASSWORD);
+					System.clearProperty(BackToMediaPreferences.MEDIA_AUTH_LOGIN);
+				}
+				else {
+					Log.warning("The MediaPlayer could not open the media: " + path);
+				}
+			}
+			
 			if (path != null) {
 				vlcEditor.setPartName(textid);
 			}
Index: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/OpenVLCPlayer.java
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/OpenVLCPlayer.java	(revision 2431)
+++ tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/OpenVLCPlayer.java	(revision 2432)
@@ -97,6 +97,26 @@
 		return null;
 	}
 	
+	public static VLCPlayerEditor openEditor() {
+		IWorkbenchPage page = TXMWindows.getActiveWindow().getActivePage();
+		VLCPlayerEditorInput editorInput = new VLCPlayerEditorInput();
+		StatusLine.setMessage(MessagesMP.opening_media);
+		try {
+			IEditorPart editor = page.openEditor(editorInput, VLCPlayerEditor.ID);
+			if (editor != null && editor instanceof VLCPlayerEditor) {
+				return (VLCPlayerEditor) editor;
+			}
+			else {
+				return null;
+			}
+			
+		}
+		catch (PartInitException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
 	public static void openEditor(String mrl, int time) {
 		IWorkbenchPage page = TXMWindows.getActiveWindow().getActivePage();
 		VLCPlayerEditorInput editorInput = new VLCPlayerEditorInput();
Index: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/preferences/BackToMediaPreferencePage.java
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/preferences/BackToMediaPreferencePage.java	(revision 2431)
+++ tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/preferences/BackToMediaPreferencePage.java	(revision 2432)
@@ -30,6 +30,7 @@
 import org.eclipse.e4.ui.workbench.modeling.EModelService;
 import org.eclipse.jface.preference.BooleanFieldEditor;
 import org.eclipse.jface.preference.FieldEditor;
+import org.eclipse.jface.preference.IntegerFieldEditor;
 import org.eclipse.jface.preference.StringFieldEditor;
 import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.swt.SWT;
@@ -76,6 +77,10 @@
 	
 	private StringFieldEditor defaultWordTimeProperty;
 	
+	private IntegerFieldEditor wordLeftContextSizeProperty;
+	
+	private IntegerFieldEditor wordRightContextSizeProperty;
+	
 	private Group spanGroup;
 	
 	/**
@@ -107,6 +112,10 @@
 		loopProperty = new BooleanFieldEditor(BackToMediaPreferences.REPEAT, MessagesMP.BackToMediaPreferencePage_1, getFieldEditorParent());
 		addField(loopProperty);
 		
+		String[][] values = { { "ABOVE", "" + EModelService.ABOVE }, { "BELOW", "" + EModelService.BELOW }, { "LEFT_OF", "" + EModelService.LEFT_OF }, { "RIGHT_OF", "" + EModelService.RIGHT_OF } };
+		backtotext_position = new ComboFieldEditor(BackToMediaPreferences.BACKTOMEDIA_POSITION, "BackToMedia position", values, getFieldEditorParent());
+		addField(backtotext_position);
+		
 		String[][] choices = { { BackToMediaPreferences.WORDMODE, BackToMediaPreferences.WORDMODE },
 				{ BackToMediaPreferences.STRUCTUREMODE, BackToMediaPreferences.STRUCTUREMODE },
 				{ BackToMediaPreferences.MILESTONEMODE, BackToMediaPreferences.MILESTONEMODE }
@@ -115,10 +124,6 @@
 		
 		addField(useWordProperty);
 		
-		String[][] values = { { "ABOVE", "" + EModelService.ABOVE }, { "BELOW", "" + EModelService.BELOW }, { "LEFT_OF", "" + EModelService.LEFT_OF }, { "RIGHT_OF", "" + EModelService.RIGHT_OF } };
-		backtotext_position = new ComboFieldEditor(BackToMediaPreferences.BACKTOMEDIA_POSITION, "BackToMedia position", values, getFieldEditorParent());
-		addField(backtotext_position);
-		
 		spanGroup = new Group(getFieldEditorParent(), SWT.NONE);
 		spanGroup.setText(MessagesMP.BackToMediaPreferencePage_3);
 		GridData gridData2 = new GridData(SWT.FILL, SWT.FILL, true, false);
@@ -132,6 +137,12 @@
 		defaultWordTimeProperty = new StringFieldEditor(BackToMediaPreferences.WORD_PROPERTY, MessagesMP.BackToMediaPreferencePage_4, spanGroup);
 		addField(defaultWordTimeProperty);
 		
+		wordLeftContextSizeProperty = new IntegerFieldEditor(BackToMediaPreferences.WORD_CONTEXT_LEFT_DISTANCE, "Left length", spanGroup);
+		addField(wordLeftContextSizeProperty);
+		
+		wordRightContextSizeProperty = new IntegerFieldEditor(BackToMediaPreferences.WORD_CONTEXT_RIGHT_DISTANCE, "Right length", spanGroup);
+		addField(wordRightContextSizeProperty);
+		
 		defaultStructure = new StringFieldEditor(BackToMediaPreferences.STRUCTURE, MessagesMP.BackToMediaPreferencePage_5, spanGroup);
 		addField(defaultStructure);
 		
@@ -145,23 +156,33 @@
 	}
 	
 	public void updateEnables(String sync_mode) {
+		
 		if (BackToMediaPreferences.WORDMODE.equals(sync_mode)) {
+			defaultWordTimeProperty.setEnabled(true, spanGroup);
+			wordLeftContextSizeProperty.setEnabled(true, spanGroup);
+			wordRightContextSizeProperty.setEnabled(true, spanGroup);
+			
 			defaultStructure.setEnabled(false, spanGroup);
 			defaultStructureStartProperty.setEnabled(false, spanGroup);
 			defaultStructureEndProperty.setEnabled(false, spanGroup);
-			defaultWordTimeProperty.setEnabled(true, spanGroup);
 		}
 		else if (BackToMediaPreferences.STRUCTUREMODE.equals(sync_mode)) {
+			defaultWordTimeProperty.setEnabled(false, spanGroup);
+			wordLeftContextSizeProperty.setEnabled(false, spanGroup);
+			wordRightContextSizeProperty.setEnabled(false, spanGroup);
+			
 			defaultStructure.setEnabled(true, spanGroup);
 			defaultStructureStartProperty.setEnabled(true, spanGroup);
 			defaultStructureEndProperty.setEnabled(true, spanGroup);
-			defaultWordTimeProperty.setEnabled(false, spanGroup);
 		}
 		else { // milestones
+			defaultWordTimeProperty.setEnabled(false, spanGroup);
+			wordLeftContextSizeProperty.setEnabled(false, spanGroup);
+			wordRightContextSizeProperty.setEnabled(false, spanGroup);
+			
 			defaultStructure.setEnabled(true, spanGroup);
 			defaultStructureStartProperty.setEnabled(true, spanGroup);
 			defaultStructureEndProperty.setEnabled(false, spanGroup);
-			defaultWordTimeProperty.setEnabled(false, spanGroup);
 		}
 	}
 	
Index: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/preferences/BackToMediaPreferences.java
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/preferences/BackToMediaPreferences.java	(revision 2431)
+++ tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/preferences/BackToMediaPreferences.java	(revision 2432)
@@ -31,9 +31,7 @@
 	
 	// the sync modes
 	public static final String WORDMODE = "Word";
-	
 	public static final String STRUCTUREMODE = "Structure";
-	
 	public static final String MILESTONEMODE = "Milestone";
 	
 	public static final String MEDIA_PATH_PREFIX = "media_path_prefix";
