Index: /plugins/qualitymonitor/v5/test/settings.js
===================================================================
--- /plugins/qualitymonitor/v5/test/settings.js	(revision 1205)
+++ /plugins/qualitymonitor/v5/test/settings.js	(revision 1260)
@@ -2,4 +2,5 @@
 	/** Player versions to test. **/
 	players: {
+		'trunk':'/player/trunk/fl5/player.swf',
 		'5.2':'/player/tags/mediaplayer-5.2/player.swf',
 		'5.1':'/player/tags/mediaplayer-5.1/player.swf',
@@ -25,12 +26,12 @@
 	examples: {
 		'': {},
-		'Single HTTP stream': {
+		'HTTP bitrate switching video': {
 		    controlbar:'over',
-			file:'http://content.bitsontherun.com/jwp/LJSVMnCF.xml',
+			file:'/player/testing/files/bitrates.xml',
 			height:270,
 			width:480,
 			plugins:'qualitymonitor'
 		},
-		'Single RTMP stream': {
+		'RTMP dynamic streaming video': {
 		    controlbar:'over',
 			file:'/player/testing/files/dynamic.xml',
Index: /plugins/qualitymonitor/v5/doc/guides/reference.rst
===================================================================
--- /plugins/qualitymonitor/v5/doc/guides/reference.rst	(revision 1260)
+++ /plugins/qualitymonitor/v5/doc/guides/reference.rst	(revision 1260)
@@ -0,0 +1,85 @@
+Introduction
+============
+
+The Qualitymonitor plugin for the JW Player is used to monitor the status of the bitrate switching / dynamic streaming functionalty of the player. This functionality is triggered by loading multiple quality levels of one video into the player. It will then monitor certain quality metrics and play the  optimal stream is served for every viewer.
+
+For more info about this functionality, please refer to the dedicated sections in the HTTP resp. RTMP streaming guides:
+
+*  `HTTP bitrate switching <http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/12534/video-delivery-http-pseudo-streaming#bitrateswitching>`_ 
+* `RTMP dynamic streaming <http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/12535/video-delivery-rtmp-streaming#dynamicstreaming>`_ functionality of the player.
+
+Screenshot
+==========
+
+Here's a screenshot of a JW Player with the qualitymonitor plugin:
+
+ .. image:: ../assets/qualitymonitor.png
+    :alt: Skinning examples.
+    
+
+The plugin consists of two sections. The biggest one is the overlay at the top of the video that lists and charts the current quality metrics. Additionally, the plugin contains a small messaging area in the middle of the screen, for printing player messages that relate to the video quality.
+
+
+Metrics
+=======
+
+The Qualitymonitor plugin monitors the following metrics:
+
+* The **bandwidth** of the current connection, in kilobits per second (green).
+* The number of **frames dropped** per second (red).
+* The **width** of the video screen (blue).
+* The currently playing **quality level** (white). The required width and bandwidth of this level is shown between parentheses.
+
+Messages
+--------
+
+In addition to these four metrics, the plugin displays two quality level related messages in the middle of the screen:
+
+* The completion of a smooth transition for `RTMP dynamic streaming <http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/12535/video-delivery-rtmp-streaming#dynamicstreaming>`_ (in green text).
+* The blacklisting and un-blacklisting of a quality level as a result of too many framedrops (in red text).
+
+.. note::
+
+  The framedrop detection and resulting (un)blacklisting of levels is only supported in JW Player 5.3+. For JW Player 5.0, 5.1 and 5.2, the framedrop chart will simply remain at 0.
+
+
+Configuration Options
+=====================
+
+Embedding the qualitymonitor plugin is a matter of setting amending its name to the **plugins** player option. The  plugin contains no configuration options itself.
+
+Here is a basic embed code example of a player using the qualitymonitor plugin. This example uses the SWFObject 2.0 embedding script:
+
+.. code-block:: html
+
+   <p id="container">The player will be placed here</p>
+   
+   <script type="text/javascript">
+     swfobject.embedSWF("player.swf","container","480","270","9.0.115","false",{
+       file: "/static/dynamic_stream.xml",
+       plugins: "qualitymonitor"
+     });
+   </script>
+
+
+
+Skinning
+========
+
+This plugin cannot be skinned.
+
+
+
+Changelog
+=========
+
+Version 2.0
+-----------
+
+* Switched from the 4.x to the 5.x plugin API. As of now, the plugin cannot be loaded in the JW Player v4.
+* Added support for monitoring framedrops in the chart, and level (un)blacklisting events in the center message.
+* Colored the various quality metrics in the chart, to easily distinct between them.
+* Made the chart stop drawing when the video is paused or stopped.
+
+
+
Index: /plugins/qualitymonitor/v5/doc/guides/conf.py
===================================================================
--- /plugins/qualitymonitor/v5/doc/guides/conf.py	(revision 1260)
+++ /plugins/qualitymonitor/v5/doc/guides/conf.py	(revision 1260)
@@ -0,0 +1,87 @@
+# -*- coding: utf-8 -*-
+#
+# JW Player documentation build configuration file, created by
+# sphinx-quickstart on Thu Apr 22 14:04:18 2010.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.append(os.path.abspath('.'))
+
+# -- General configuration -----------------------------------------------------
+
+# Add any paths that contain templates here, relative to this directory.
+# templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = 'JW Player Qualitymonitor Plugin'
+copyright = 'LongTail Video'
+
+# The full version, including alpha/beta/rc tags.
+release = '2.0'
+
+# List of documents that shouldn't be included in the build.
+#unused_docs = []
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  Major themes that come with
+# Sphinx are currently 'default' and 'sphinxdoc'.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['../assets']
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'Qualitymonitor'
+
+
+# -- Options for LaTeX output --------------------------------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+#latex_font_size = '10pt'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+  ('index','Qualitymonitor.tex','JW Player Qualitymonitor Plugin','www.longtailvideo.com','howto',False)
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+latex_logo = '../assets/longtail.png'
+
+# If false, no module index is generated.
+latex_use_modindex = False
Index: /plugins/qualitymonitor/v5/doc/guides/Makefile
===================================================================
--- /plugins/qualitymonitor/v5/doc/guides/Makefile	(revision 1260)
+++ /plugins/qualitymonitor/v5/doc/guides/Makefile	(revision 1260)
@@ -0,0 +1,89 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS    =
+SPHINXBUILD   = sphinx-build
+PAPER         =
+BUILDDIR      = ..
+
+# Internal variables.
+PAPEROPT_a4     = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
+
+help:
+	@echo "Please use \`make <target>' where <target> is one of"
+	@echo "  html      to make standalone HTML files"
+	@echo "  dirhtml   to make HTML files named index.html in directories"
+	@echo "  pickle    to make pickle files"
+	@echo "  json      to make JSON files"
+	@echo "  htmlhelp  to make HTML files and a HTML help project"
+	@echo "  qthelp    to make HTML files and a qthelp project"
+	@echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+	@echo "  changes   to make an overview of all changed/added/deprecated items"
+	@echo "  linkcheck to check all external links for integrity"
+	@echo "  doctest   to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+	-rm -rf $(BUILDDIR)/*
+
+html:
+	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+pickle:
+	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+	@echo
+	@echo "Build finished; now you can process the pickle files."
+
+json:
+	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+	@echo
+	@echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+	@echo
+	@echo "Build finished; now you can run HTML Help Workshop with the" \
+	      ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+	@echo
+	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
+	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/JWPlayerforHTML5.qhcp"
+	@echo "To view the help file:"
+	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/JWPlayerforHTML5.qhc"
+
+latex:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/
+	@echo
+	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
+	      "run these through (pdf)latex."
+
+changes:
+	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+	@echo
+	@echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+	@echo
+	@echo "Link check complete; look for any errors in the above output " \
+	      "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+	@echo "Testing of doctests in the sources finished, look at the " \
+	      "results in $(BUILDDIR)/doctest/output.txt."
Index: /plugins/qualitymonitor/v5/doc/guides/index.rst
===================================================================
--- /plugins/qualitymonitor/v5/doc/guides/index.rst	(revision 1260)
+++ /plugins/qualitymonitor/v5/doc/guides/index.rst	(revision 1260)
@@ -0,0 +1,8 @@
+Qualitymonitor plugin
+=====================
+
+.. toctree::
+   :maxdepth: 2
+
+   reference
+
Index: /plugins/qualitymonitor/v5/src/com/longtailvideo/plugins/qualitymonitor/QualityMonitor.as
===================================================================
--- /plugins/qualitymonitor/v5/src/com/longtailvideo/plugins/qualitymonitor/QualityMonitor.as	(revision 1248)
+++ /plugins/qualitymonitor/v5/src/com/longtailvideo/plugins/qualitymonitor/QualityMonitor.as	(revision 1260)
@@ -140,5 +140,9 @@
 		}
 		if(event.metadata.type == 'blacklist') {
-			setMessage("Blacklisted level " + (event.metadata.level+1),0xff0000);
+			if(event.metadata.state === false) {
+				setMessage("Un-blacklisted level " + (event.metadata.level+1),0xff0000);
+			} else {
+				setMessage("Blacklisted level " + (event.metadata.level+1),0xff0000);
+			}
 		}
 	};
@@ -162,5 +166,5 @@
 		_message.textColor = clr;
 		_message.visible = true;
-		setTimeout(setMessageTimeout,4000);
+		setTimeout(setMessageTimeout,6000);
 	};
 
