Online Content Plugin (1 Viewer)

samuel337

Portal Pro
August 25, 2004
772
0
Melbourne, Australia
EDIT: Now with the ability to view webpages! Follow the instructions below - I have edited them for the new version.

So, without further ado, I'm releasing my Online Content Plugin. The idea is that you can select sources that you want to search, then you can search it, and the results are shown. Depending on the results, you can play them or just view the description.

Currently, there are two sources - Yahoo Launch music videos US and CNN News. However, anyone can create more source plugins - simply create a new .net assembly, and implement the IOnlineContentSource interface in OCPlugin.dll. I hope people will create more sources!

The Yahoo Launch plugin returns items that launch into video streams, and the CNN News plugin returns items that open in the web page viewer.

Currently, the plugin only works with the BlueTwo skin, simply because that's the skin I'm using. Also, the graphics for the screens are a mish-mash of other parts of MP because I haven't asked Samsonite to create some images for me yet (can you, Samsonite? ;-) ). Also, the language has to be English.

To install:
- Download http://mercury.walagata.com/w/samuel337/myOCPlugin11.zip
- Extract the zip file to your mediaportal folder. All the files should fall into place - caution: it will overwrite your existing strings.xml for English.
- In detail, strings.xml goes to mediaportal\language\English
MyOCMainScreen.xml and MyOCSelectSources.xml goes to mediaportal\skin\BlueTwo
OCSYahooMusicVideoPlugin.dll goes to mediaportal\plugins\OCS (you need to create this folder)
OCSCNNNewsPlugin.dll goes to mediaportal\plugins\OCS
OCPlugin.dll goes to mediaportal\plugins\windows
Microsoft.mshtml.dll goes to mediaportal
AxInterop.SHDocVw.dll goes to mediaportal
Interop.SHDocVw.dll goes to mediaportal
- Now load MP and you should see My Online Content.
- Click it, press the 'Select Sources' button and click on the sources you want searched
- press the Confirm button.
- Now press the search button and enter in something.
- Press Done, and it will start searching.
- When the progress dialog disappears, the results will show.
- Pick the item you want to view, press it and it will open.

Hope this works for everyone!

To change the webpage screen's colours and scrolling speed, goto MP Configuration, Plugins, My Online Content, Setup. The keys to control the webpage viewer are the same as for MP - up, left, right, down, and esc to close. For the time being, the keys for zooming in and out are I and O respectively. Not all pages zoom correctly - this is a bug with IE.

Feedback welcome!

EDIT: Source available at: http://mercury.walagata.com/w/samuel337/myOCPlugin11Src.zip

Sam
p.s. some credit for the yahoo launch plugin belongs to this person, who made the Meedio plugin - http://web.tampabay.rr.com/dncenter/
 

Inker

Retired Team Member
  • Premium Supporter
  • December 6, 2004
    2,055
    318
    Hey great job!

    Does exactly what you say it does :)

    Couple of suggestions:
    - Click it, press the 'Select Sources' button and click the 'Yahoo Launch Music Videos' list item to select it.
    - press the Confirm button.
    Skip the confirm part here, its kind of confusing.....pressing enter on source should do the trick

    Also here it would be nice to have the sources displayed with a thumbnail
    online_325x243_screenshot_F.jpg

    something like this....only i would make the thumbnails even larger

    when you enter yahoo plugin (after pressing confirm).....since searching will be the default action here, i think the keyboard should pop up automatically with maybe a little help text in the background

    when you have lots of results on your search you get several pages.......but each page only uses the top half of the gui.....the bottom half seems to be wasted space

    Select source in here should probably be called something like change source.....or select different source.....or just back
    That part wasn't very clear to me when I loaded it up the first time.......I thought I had to select another source within the plugin, or this button let me select some predefined music videos.......something like that, maybe I just get confused easily :)

    Maybe add a show top 10 videos selection (for each genre)........this option would probably defeat the auto popup keyboard suggestion from above.........maybe load the top 10 vids automatically.........but then again this would take time and if you want to search for a specific video you probably don't want to wait for it to get the top 10 vids........so a button would be best.

    oh and also.......is there a way to select the users bandwidth?

    other small things I can think of:
    history/favourites.......let me see what I played/add videos to favourites
    save the video locally.........now that would rock
    in the future maybe an integration with myMusic where a new option in the context menu would be: Play music video for this song.......then it searches automatically from the id3 tag and plays it

    ok thats all for now........keep up the great work
     

    juvinious

    Portal Member
    December 20, 2004
    43
    1
    Hong Kong
    Nice job, I haven't tried your plugin out. I've been working on a plugin for yahoo launch off and on for two weeks now. I have the US and spanish servers working, with selectable bitrate and server. I was waiting till I got every other server added (ie germany, uk, etc etc). Yours looks alot more attractive than mine. If you want any assistance in that I wouldn't mind adding the rest of the servers in this plugin. How are you running the videos fullscreen? I had to modify the g_Player source so that I can get it to do fullscreen.
    I can send you my source if you want to take a look.
    I'll try yours out when I get a chance.
     

    samuel337

    Portal Pro
    August 25, 2004
    772
    0
    Melbourne, Australia
    Hey Inker, here's some answers to your post (geez you think heaps ;-) ):

    Inker said:
    Hey great job!

    Does exactly what you say it does :)

    Couple of suggestions:
    - Click it, press the 'Select Sources' button and click the 'Yahoo Launch Music Videos' list item to select it.
    - press the Confirm button.
    Skip the confirm part here, its kind of confusing.....pressing enter on source should do the trick

    The idea is that you will be able to search multiple sources at the same time. For example, you may want to search Yahoo Launch Music Videos and MTV Music Videos at the same time. This is why you need to press the confirm button. If you're really lazy, you can just return to the previous screen - it will automatically save your selections.

    Inker said:
    Also here it would be nice to have the sources displayed with a thumbnail

    online_325x243_screenshot_F.jpg

    something like this....only i would make the thumbnails even larger

    I'm still thinking about thumbnails...maybe when I make like a google image search plugin I'll implement the thumbnails feature.

    Inker said:
    when you enter yahoo plugin (after pressing confirm).....since searching will be the default action here, i think the keyboard should pop up automatically with maybe a little help text in the background

    Not if you searched for something, the exited the plugin to do something else, then returned to the plugin. Maybe I should make the search screen appear automatically if there are no search results...

    Inker said:
    when you have lots of results on your search you get several pages.......but each page only uses the top half of the gui.....the bottom half seems to be wasted space

    The bottom half of the screen is dedicated to showing more information about the selected item - e.g. description and in the future, thumbnails and source name. Unfortunately, I couldn't find anything to go in the description field for the music videos, so I left it blank.

    Inker said:
    Select source in here should probably be called something like change source.....or select different source.....or just back
    That part wasn't very clear to me when I loaded it up the first time.......I thought I had to select another source within the plugin, or this button let me select some predefined music videos.......something like that, maybe I just get confused easily :)

    Maybe Select Online source...but then that will be too long to fit the button... any other ideas?

    Inker said:
    Maybe add a show top 10 videos selection (for each genre)........this option would probably defeat the auto popup keyboard suggestion from above.........maybe load the top 10 vids automatically.........but then again this would take time and if you want to search for a specific video you probably don't want to wait for it to get the top 10 vids........so a button would be best.

    Because this plugin is not a dedicated Yahoo Music Video plugin - rather its designed to cater for many, many sources, I don't think this feature should be added - mind you, its a great idea, but it just doesn't fit my plan for this plugin.

    Inker said:
    oh and also.......is there a way to select the users bandwidth?

    That's on its way - just got to figure out how to do this because OCS plugins (that is, the plugin that lets you search yahoo music videos) aren't displayed in MP configuration yet.

    Inker said:
    other small things I can think of:
    history/favourites.......let me see what I played/add videos to favourites

    Hmm... possible idea, I'll ponder it when I get the plugin well and truly done and when there's more support for this. It wouldn't be very hard to add this, but I want to work on other bits in this plugin first.

    Inker said:
    save the video locally.........now that would rock

    I'm not sure about Yahoo's reaction, and whether I can actually download the files - i.e. they may be streaming only. I think I'll do this at the same time as the above response.

    Inker said:
    in the future maybe an integration with myMusic where a new option in the context menu would be: Play music video for this song.......then it searches automatically from the id3 tag and plays it

    Future is the keyword here - at the moment, I think the above ideas will keep me busy and this idea requires me to delve into the my music code which I really don't want to yet. Also, I need frodo's approval first because I'll need to edit MP source code.

    Inker said:
    ok thats all for now........keep up the great work

    Thanks - keep the feedback coming!

    Sam
     

    samuel337

    Portal Pro
    August 25, 2004
    772
    0
    Melbourne, Australia
    juvinious said:
    Nice job, I haven't tried your plugin out. I've been working on a plugin for yahoo launch off and on for two weeks now. I have the US and spanish servers working, with selectable bitrate and server. I was waiting till I got every other server added (ie germany, uk, etc etc). Yours looks alot more attractive than mine. If you want any assistance in that I wouldn't mind adding the rest of the servers in this plugin. How are you running the videos fullscreen? I had to modify the g_Player source so that I can get it to do fullscreen.
    I can send you my source if you want to take a look.
    I'll try yours out when I get a chance.

    Sorry juvinious, I didn't mean to undermine your work. I didn't know about it until I had finished my plugin.

    Its up to you if you want to create a specific Yahoo launch music videos plugin or not - not as flexible, but you maybe be able to add in features such as display the Top 10 or something like that.

    If you want to add the rest of the servers to my plugin, simply create a new assembly in .NET - then implement the IOnlineContentSource interface located in the OCPlugin.dll file. The interface is simple - GetSourceName, and GetSourceDesc (name of the source and description), and finally a Search function. My plugin simply sends the searchStr to each of the IOnlineContentSource plugins and takes the search results that it returns and displays them. So that's where the majority of your code would go.

    If you want, I can send you the source code for my yahoo launch plugin so you get an idea of what to do - its in VB.NET.

    For playing videos, I'm simply adding the video URL to the VIDEO_TEMP playlist, then telling MP to play that playlist. It does the fullscreen thing automatically.

    Sam
     

    juvinious

    Portal Member
    December 20, 2004
    43
    1
    Hong Kong
    I just tried it out, it's very similar to the way mine works. However yours has the ability to add other sources, I wrote mine to cater only to Yahoo launch servers in every available country. Also you should make sure you have .asx added to extensions in setup in order to have it work fullscreen. :)
    Yours is not undermining my work because your plugin is for various things :)
    I'm going to clean up mine and make changes to it where I don't have to use a modified g_player, i'll post it later that way you can have a look.
    Good work.
     

    Lyxalig

    MP Donator
  • Premium Supporter
  • January 30, 2005
    276
    1
    38
    Norway
    Home Country
    Norway Norway
    I would also like to have a look at the sourcecode for yahoo plugin. I don't know how to code, but with this I can actually understand the basics, and try to implement a new Yahoo country.

    Please?
    :roll:
     

    Users who are viewing this thread

    Top Bottom