I was working on the backend of my highslide plugin, which has never came out of beta yet, and I found that the code was very difficult to manage. So I decided to take all that i’ve learned and start over. While this will be a significant setback in terms of time it will be a great advance in terms of stability. So far i’ve been working mainly on the backend, it allows you to upload and add streams to the database. The frontend will come later.
The framework has been build on three classes. Album, Video and Players. By using these classes it became so much simpler to manage. The video class is at the center of it all. So far i’ve got wmv, flv, swf, mp4 and youtube(hd) support build in.
Other plugins should be able to access the database by calling the video class.
$video = new pss_video;
$video->load(1);
$video->create_player();
The code above is an example of calling the API to create a video. The load function takes an ID of a video and populate the instance with data from the database. At present all videos are slided but I am working on normal embeds too.