wildside96 / bst-player

Automatically exported from code.google.com/p/bst-player
0 stars 0 forks source link

Negative loopCount does not work with WinMediaPlayer #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a WinMediaPlayer instance and set loopCount to negative value

What is the expected output? What do you see instead?
Expected Output: The player should play continuously.
Actual Output: The player plays ONCE and stop.

Original issue reported on code.google.com by sbrah...@gmail.com on 16 Jun 2010 at 8:42

GoogleCodeExporter commented 9 years ago
Try for IE:
player.setLoopCount(0); //should play continuously in InternetExplorer

Try for FireFox: 
player.setLoopCount(-1); //should play continuously in FireFox

Original comment by ricardo.maring@gmail.com on 16 Jun 2010 at 4:29

GoogleCodeExporter commented 9 years ago
setLoopCount method uses WMP's 'playCount' property which requires a minimum of 
1 and an unspecified maximum value 
(http://msdn.microsoft.com/en-us/library/dd564339%28v=VS.85%29.aspx).  Any 
value outside of the range resets the 'playCount' property to 1, hence this bug.

It is now implemented by enabling loop mode in IE and using a rather high value 
(Short.MAX_VALUE) in non-IE (which does not support loop mode),  Can't imagine 
anyone prepared to watch the same media for that long anyway :-)

Original comment by sbrah...@gmail.com on 17 Jun 2010 at 4:58

GoogleCodeExporter commented 9 years ago

Original comment by sbrah...@gmail.com on 17 Jun 2010 at 5:09