| |||||||
| Plugins Plugins developed and maintained by users. Want to create your own plugin? Start a thread in here. |
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Portal Member Join Date: Aug 2007
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
| Hi, I'm writing my first plugin at the moment. I have information about movies in a mySQL database (movieinfo, where and how much files belong to the movie and so on). this plugin simply shows a list of movies which can be generated throug an SQL statement. after clicking on a movieentry, the plugin generates a videoplaylist with all the files belonging to that one movie and starts playing (it's like the myvideo plugin). and there's my problem: I can create the playlist, but if i playback the list, it stops after the first file and won't continue with the next on in the list. Here's what I got so far: Code: PlayListPlayer player = new PlayListPlayer() ;
DataTable files = new DataTable();
player.Reset();
player.CurrentPlaylistType = PlayListType.PLAYLIST_VIDEO_TEMP;
PlayList playlist = player.GetPlaylist(PlayListType.PLAYLIST_VIDEO_TEMP);
playlist.Clear();
files = SqlQuery("SELECT * FROM dateien WHERE movie_id = " + data.Rows[curListSelection]["id"].ToString(), files);
for (int i = 0; i < files.Rows.Count; i++)
{
PlayListItem item = new PlayListItem();
item.FileName = files.Rows[i]["gspot_file_name_with_path"].ToString();
item.Type = PlayListItem.PlayListItemType.Video;
playlist.Add(item);
}
playlist.Sort();
player.Play(0);
any idea how to solve that? greez JunkiXL Ok, I found a quick and dirty fix, but I'm still searching for a more straight forward solution. for everyone who has the same trouble, just add an g_Player eventhandler as shown below Code: protected override void OnPageLoad()
{
.....
g_Player.PlayBackEnded += new g_Player.EndedHandler(g_Player_PlayBackEnded);
}
void g_Player_PlayBackEnded(g_Player.MediaType type, string filename)
{
player.PlayNext();
}
JunkiXL Last edited by junkixl; 2008-02-23 at 01:38. Reason: Automerged Doublepost |
| | |
![]() |
| Bookmarks |
| Tags |
| playback, playlist, stops |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Playlist error from Syntax M3U playlist file | Luccio | Support | 9 | 2008-10-07 00:38 |
| TV playback freezes, stops | B_J | General Support | 0 | 2007-12-06 21:35 |
| Video playback stops after a few seconds | kgprodigy | Support | 0 | 2007-05-21 11:52 |
| Removing a track, occuring double in playlist, removes both and stops music | idioteque | 0.2.0.0 Final and SVN Builds | 2 | 2006-12-11 21:22 |
| Playback stops on DVD | NorthernJohn | Codecs, External Players | 4 | 2006-03-21 00:34 |