Media player

Dec 25, 2010 at 2:45 AM
Edited Dec 25, 2010 at 2:45 AM

I would like to be able to have video on a page, preferably using the Silverlight 4 video player but if for some reason Silverlight can't work with Orchard then a Flash (please no) player as a last alternative.

Does anyone else have a similar need and have you come up with any solutions?

Thanks.

Coordinator
Dec 25, 2010 at 5:33 AM

Mmh. What's stopping you? Are you getting an error message when you try, does it fail silently?

Dec 25, 2010 at 1:16 PM

It is not that anything is stopping me, I just don't know where to start.

I guess this is an archecture issue, what is the best way to go about implimenting this?

Coordinator
Dec 25, 2010 at 5:41 PM

Ah I see. I thought you were trying to embed the video in the body of an item, which should just work.

to do it as a module you could create a part with the movie URL, the width and height as properties and make the template render the necessary embedding markup. Does this help?

Dec 25, 2010 at 7:21 PM

html5 has a video element, but i aint sure if it's widely supported yet.

A Silverlight XAP can be hosted by ASP.NET MVC so orchard should be able as well.
You could use a silverlight html helper, some guy named "Bart Czernicki" created one.
In Orchard create a display template and use the html helper in there. 

http://silverlighthack.com/post/2010/11/16/Creating-a-ASPNET-MVC-HTML-Helper-for-Silverlight.aspx 

Dec 25, 2010 at 7:24 PM

I have similar question: what is the best way to implement embedded video player in body part as tag. For example user in body specify [mp3]/mymedia/coolsong.mp3[/mp3]. And i would like to run some transformations, that in the end replace [mp3]...[/mp3] to <object...>...</object> with player. First thing that came to mi mind is yours solution - to specify part with movie url. But this does not gives end user freedom i would like to give.  What are the best solutions here ?

Dec 25, 2010 at 11:12 PM
rfcdejong wrote:

html5 has a video element, but i aint sure if it's widely supported yet.

A Silverlight XAP can be hosted by ASP.NET MVC so orchard should be able as well.
You could use a silverlight html helper, some guy named "Bart Czernicki" created one.
In Orchard create a display template and use the html helper in there. 

http://silverlighthack.com/post/2010/11/16/Creating-a-ASPNET-MVC-HTML-Helper-for-Silverlight.aspx 

 Thanks for this link, good stuff.

So would the XAP file be an Orchard field?

Dec 26, 2010 at 10:57 AM
Edited Dec 26, 2010 at 10:57 AM

A field or a part, i would doubt myself :)

bertrandleroy told me that contentparts can't contain other contentparts, so it depends if u want the silverlight control to be used in other parts. In that case make it a field.

Coordinator
Dec 26, 2010 at 8:44 PM

It can be done as a field or a part. Your choice. You might want to read this if you don't know what parts and fields are and how they relate to each other: http://orchardproject.net/docs/Basic-Orchard-Concepts.ashx#Orchard_concepts_31