Index: TXM/trunk/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/player/HTMLPlayer.java
===================================================================
--- TXM/trunk/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/player/HTMLPlayer.java	(revision 3416)
+++ TXM/trunk/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/player/HTMLPlayer.java	(revision 3417)
@@ -8,6 +8,8 @@
 import org.eclipse.swt.browser.Browser;
 import org.eclipse.swt.browser.ProgressEvent;
 import org.eclipse.swt.browser.ProgressListener;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.layout.GridData;
@@ -15,6 +17,8 @@
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
 import org.eclipse.swt.widgets.Scale;
 import org.txm.backtomedia.commands.function.OpenMediaPlayer;
 import org.txm.backtomedia.commands.function.SimpleFileDialog;
@@ -46,7 +50,7 @@
 		
 		browser = new Browser(this, SWT.NONE);
 		browser.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
-		browser.setText("<!DOCTYPE html><html><head><meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\"></head><body><video id=\"video\" width=\"100%\" height=\"100%\" controls></video></body></html>");
+		browser.setText("<!DOCTYPE html><html><head><meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\"></head><body><video style=\"height:100%;\"id=\"video\" controls></video></body></html>");
 		//browser.setText("<video id=\"video\" width=\"100%\" height=\"100%\" controls><source id=\"source\" src=\"\"></source></video>");
 		
 		browser.addProgressListener(new ProgressListener() {
@@ -69,6 +73,34 @@
 			public void changed(ProgressEvent event) { }
 		});
 		
+		Menu menu = new Menu(browser);
+		MenuItem playStopItem = new MenuItem(menu, SWT.PUSH);
+		playStopItem.setText("Play");
+		playStopItem.addSelectionListener(new SelectionListener() {
+			
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				resume();
+			}
+			
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) { }
+		});
+		MenuItem pauseItem = new MenuItem(menu, SWT.PUSH);
+		pauseItem.setText("Pause");
+		pauseItem.addSelectionListener(new SelectionListener() {
+			
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				pause();
+			}
+			
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) { }
+		});
+				
+		browser.setMenu(menu);
+				
 		GLComposite controls = new GLComposite(this, SWT.NONE, "controls");
 		controls.getLayout().numColumns = 20;
 		controls.getLayout().horizontalSpacing = 2;
@@ -185,29 +217,29 @@
 //			gdata.minimumWidth = gdata.widthHint = 150;
 //			volumneSpinner.setLayoutData(gdata);
 			
+			rateLabel = new Label(controls, SWT.NONE);
+			rateLabel.setText("Rate (1.0)");
 			
+			Scale rateSpinner = new Scale(controls, SWT.NONE);
+			rateSpinner.setMinimum(10);
+			rateSpinner.setMaximum(300);
+			rateSpinner.setSelection(100);
+			rateSpinner.addSelectionListener(new SelectionListener() {
+				
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					setRate(((float)rateSpinner.getSelection())/100.0f);
+				}
+				
+				@Override
+				public void widgetDefaultSelected(SelectionEvent e) { }
+			});
+			GridData gdata2 = new GridData(GridData.CENTER, GridData.CENTER, false, false);
+			gdata2.minimumWidth = gdata2.widthHint = 150;
+			rateSpinner.setLayoutData(gdata2);
 		}
 		
-		rateLabel = new Label(controls, SWT.NONE);
-		rateLabel.setText("Rate (1.0)");
 		
-		Scale rateSpinner = new Scale(controls, SWT.NONE);
-		rateSpinner.setMinimum(10);
-		rateSpinner.setMaximum(300);
-		rateSpinner.setSelection(100);
-		rateSpinner.addSelectionListener(new SelectionListener() {
-			
-			@Override
-			public void widgetSelected(SelectionEvent e) {
-				setRate(((float)rateSpinner.getSelection())/100.0f);
-			}
-			
-			@Override
-			public void widgetDefaultSelected(SelectionEvent e) { }
-		});
-		GridData gdata2 = new GridData(GridData.CENTER, GridData.CENTER, false, false);
-		gdata2.minimumWidth = gdata2.widthHint = 150;
-		rateSpinner.setLayoutData(gdata2);
 		
 		//		new Label(controls, SWT.NONE).setText("Progression");
 		//		
@@ -350,6 +382,14 @@
 		
 	}
 	
+	public void togglePlayPause() {
+		if (isPlaying()) {
+			pause();
+		} else {
+			resume();
+		}
+	}
+	
 	@Override
 	public boolean isMediaLoaded() {
 		
@@ -422,7 +462,7 @@
 	
 	@Override
 	public boolean isPlaying() {
-		Object o = browser.evaluate("return !document.getElementById('video').played;");
+		Object o = browser.evaluate("return !document.getElementById('video').playing;");
 		if (o == null) return false;
 		if (o instanceof Boolean) {
 			return (Boolean)o;
