Player.currentPlaylist.appendItem
WMPTalk.com Forum Index WMPTalk.com
Discuss Windows Media Player
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web wmptalk.com
Player.currentPlaylist.appendItem

 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> Windows Media on Web
Author Message
Juri
Guest





Posted: Thu Sep 29, 2005 8:30 am    Post subject: Player.currentPlaylist.appendItem Reply with quote

Why is there a delay before the next song begins to play ?
This happens always when a new song is appended.

Code:

<script>
function Play_10_random()
{
  var library = Player.MediaCollection;
  var media = library.getByAttribute("MediaType", "Audio");
  var intCount = media.count - 1;
  var playlist = Player.currentPlaylist;
 
    for (i = 0; i < 10; i++)
    {
      var randomnumber = Math.floor(Math.random()*intCount);
      var objSong = media.Item(randomnumber);
      playlist.appendItem(objSong);
    }
   
  Player.controls.play();
}
</script>
<OBJECT ID="Player" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
</OBJECT>
<br>
<input type=button value="Click me" onclick = "Play_10_random()">
<br>
Why is there a delay (blocking the visualization) when a new song starts to
play ???
<br>
Also the PlayStateChange event fires with a delay.


Back to top
 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> Windows Media on Web All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Microsoft Office Forum New Topics
Powered by phpBB