Dynamic rich media component for ASP.Net Flash, Video and Audio controls for C# and VB.Net
Welcome Guest Search | Active Topics | Members | Log In | Register

Selected Track issue Options · View
ionafi
Posted: Friday, February 06, 2009 12:38:38 PM
Rank: Member
Groups: Member

Joined: 11/13/2008
Posts: 26
Points: 78
Location: New York
If i play a track clicking on the buttonlink and then stop and press play, the selected track goes back to initial setup, first track, and that one is played. I have an event handler for the trackchangeEvent since i need to change the cover art for each track and i even tried to setup the selected track from there, but still, same problem.
This is my even handler:

protected void PlayList1_TrackChangeEvent(object sender, ASPNetMediaGUI.TrackChangeEventArgs e)
{

int trackIndex = e.NewTrackNumber - 1;
string urlToPlay = PlayList1.PlayListTracks[trackIndex].URL.ToString();
DataTable dtPL = (DataTable)Cache["playlist"];
DataRow dr = dtPL.Rows[a];
Image img = (Image)UpdatePanel1.ContentTemplateContainer.FindControl("coverart");
img.ImageUrl = dr["imgURL"].ToString();
MediaPlayer1.AudioURL = urlToPlay;
MediaPlayer1.AutoPlay = true;
// PlayList1.SelectedTrack = e.NewTrackNumber;
txtbactivetrack.Text = dr["artist"].ToString().Trim() + " - " + dr["trackname"].ToString().Trim();

}
Is SelectedTrack a readonly property or something? Looks like it doenst change when i select a track.
Thanks.

Jake
Posted: Saturday, February 07, 2009 12:59:19 AM
Rank: Administration
Groups: Administration

Joined: 7/26/2007
Posts: 676
Points: 1,728
Location: USA
You should use the function PlayList1.PlayTrack()

Sorry - documentation is weak.

Functions for PlayList are:
PlayTrack
StopPlayList
PreviousTrack
NextTrack


http://www.aspnetmedia.com
ionafi
Posted: Monday, February 09, 2009 9:48:32 AM
Rank: Member
Groups: Member

Joined: 11/13/2008
Posts: 26
Points: 78
Location: New York
It's not documentation it's what IntelliSense is giving me. I needed an event to catch the change of track and that was the only one i got. What you gave me are javascript functions, they are not listed as events for playslist object and that's what i have to handle.
Please be a little more explicit.
Thanks.
ionafi
Posted: Monday, February 09, 2009 10:02:26 AM
Rank: Member
Groups: Member

Joined: 11/13/2008
Posts: 26
Points: 78
Location: New York
I have to use PlayList1.PlayTrack(e.NewTrackNumber) instead of PlayList1.SelectedTrack(e.NewTrackNumber).
Got it. Thanks. Maybe this will solve the mistery with stop button not working well too. I'll let you know.
Jake
Posted: Saturday, February 14, 2009 10:38:04 PM
Rank: Administration
Groups: Administration

Joined: 7/26/2007
Posts: 676
Points: 1,728
Location: USA
Users browsing this topic
Guest


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