Using JPlayer in mojoPortal

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
10/17/2011 12:56:08 PM
Gravatar
Total Posts 21

Using JPlayer in mojoPortal

Is there any documentation regarding using jPlayer within mojoPortal? It looks like the jplayer scripts are included within the Web/ClientScripts directory, so I'm guessing there is an easy-ish way of adding videos to the site.

 

Thanks

10/18/2011 11:20:27 AM
Gravatar
Total Posts 18439

Re: Using JPlayer in mojoPortal

No, there isn't.

You can easily include the main script

mojoBasePage basePage = Page as mojoBasePage;
basePage.ScriptConfig.IncludejPlayer = true;

but you would have to wire up your own instance of the player and setup the videos.

The only work I have done is I made a jPlayerPanel control that can wire up jplayer for any links inside the panel that end with .mp3

I was only working on mp3 files at the time for use in WebStore for playing the teaser files if selling mp3 downloads.

The control could be evolved to support more media types or you could make your own control borrowing some code from there.

Best,

Joe

11/11/2011 10:27:01 PM
Gravatar
Total Posts 81
Website Hobbyist and Software Engineer
Proud member of the mojoPortal team
www.doan.me

Re: Using JPlayer in mojoPortal

I know this post is a few weeks old, but I just finished an initial version of a Media Player feature for mojoPortal that implements jPlayer. I have made it open source, so feel free to use it and extend it as needed. Please also provide me with any feedback. I have a number of ideas of ways to enhance it, but right now it works for my needs. If I find that it gains an audience I will be more than willing to help keep it up to date and add new features.

All of the details are available at: http://www.doan.me/media-player.aspx

11/13/2011 8:19:07 AM
Gravatar
Total Posts 18439

Re: Using JPlayer in mojoPortal

Hi Kerry,

Looks good! For now I've added it to the community downloads page to make it easier to find. When I get some time I will evaluate it for possible inclusion in mojoPortal.

Thanks for sharing your work with the community!

Best,

Joe

11/13/2011 1:54:07 PM
Gravatar
Total Posts 125

Re: Using JPlayer in mojoPortal

It's a very useful feature. I tried it on my local machine and it throws an error. I was wondering whether you can include the code behind (.cs) files in the download package. 

Thank you very much!

 

11/13/2011 2:13:12 PM
Gravatar
Total Posts 81
Website Hobbyist and Software Engineer
Proud member of the mojoPortal team
www.doan.me

Re: Using JPlayer in mojoPortal

Thanks Joe!

Wei Le,

Can you please provide more details on the error that you are getting? What type of data base? What steps were you performing?

The source code can be found at: https://bitbucket.org/kerrydoan/media-player-for-mojoprotal/overview

11/13/2011 3:15:53 PM
Gravatar
Total Posts 125

Re: Using JPlayer in mojoPortal

Thank you for the nick work!

Latest Mojo. MSSQL database.

I can add the feature to page, setup the file and edit the track. the error shows up when I finish edit the track and switch back to the player. Here is the details:

e remote server returned an error: (404) Not Found.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.WebException: The remote server returned an error: (404) Not Found.
Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:


[WebException: The remote server returned an error: (404) Not Found.]
   System.Net.HttpWebRequest.GetResponse() +7859156
   System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy) +160
   System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn) +310
   System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext) +164
   System.Xml.Linq.XElement.Load(String uri, LoadOptions options) +128
   Doan.MediaPlayer.UI.MediaPlayerControl.AddSkin() +54
   Doan.MediaPlayer.UI.MediaPlayerControl.Page_Load(Object sender, EventArgs e) +227
   System.Web.UI.Control.LoadRecursive() +71
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3064

 

11/13/2011 3:26:33 PM
Gravatar
Total Posts 81
Website Hobbyist and Software Engineer
Proud member of the mojoPortal team
www.doan.me

Re: Using JPlayer in mojoPortal

It sounds like it is not finding the XML file that helps define what jPlayer skin to utilize. Here is the code it is complaining about:

XElement skin = XElement.Load(SiteRoot + "/Doan_MediaPlayer/jPlayer210/Skins.xml").Descendants("Skin").FirstOrDefault();

Can you verify that the file it is looking for exists?

Otherwise, if you can help identify why it would not be finding that file on your local system that would be great.

Thanks!

Kerry

11/13/2011 3:46:30 PM
Gravatar
Total Posts 125

Re: Using JPlayer in mojoPortal

It all works now. I forgot to copy the skin.xml file. My fault!

 

11/13/2011 3:54:05 PM
Gravatar
Total Posts 81
Website Hobbyist and Software Engineer
Proud member of the mojoPortal team
www.doan.me

Re: Using JPlayer in mojoPortal

Whew!.. okay good! Glad we got if figured out. Hope you enjoy and please let me know if you have any suggestions. Thanks!

Kerry

11/13/2011 4:56:11 PM
Gravatar
Total Posts 125

Re: Using JPlayer in mojoPortal

I just download your sources code, it complies and run well  when I add the first feature and play a mp3 files. 

I installed a second feature, try to add a video file and it shows an error "No Matching Audio File Extension Found", although I choose the file type is "Video". It seems "Video" type is also treated as " Audio" type. It might be a cache problem in my local machine? Anyway, I just let you know. here is the message: 

No Matching Audio File Extension Found

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: No Matching Audio File Extension Found

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[Exception: No Matching Audio File Extension Found]
   Doan.MediaPlayer.UI.MediaPlayerControl.ComposeAndRegisterPlayerInstanceScript() +2651
   Doan.MediaPlayer.UI.MediaPlayerControl.Page_Load(Object sender, EventArgs e) +366
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.237

You must sign in to post in the forums. This thread is closed to new posts.