Opened 15 years ago

Last modified 10 years ago

#4516 confirmed New Feature

Toolbar button to embed Silverlight

Reported by: Tim Acheson Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

As requested, I am sending everything that your developers will need in order to add a button to the toolbar to facilitate embedding Silverlight using CKEditor.

Embedding Silverlight is very similar to embedding Flash. With Flash, the application is packaged in a SWF file. With Silverlight, the application is packaged in an XAP file.

So the new toolbar button will simply need to add some HTML -- it's a lot like embedding Flash.

How to embed Silverlight using HTML: http://msdn.microsoft.com/en-us/library/cc189089(VS.95).aspx

A list of all available embed parameters: http://msdn.microsoft.com/en-us/library/cc838268(VS.95).aspx

Working example -- a Silverlight Video player: http://www.timacheson.com/Blog/2009/sep/halo_3_odst_launches_next_week#silverlightControlHost

HTML code for the example:

<object id="Player" data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="640" height="360">

<param name="source" value="/ClientBin/VideoPlayer.xap" /> <param name="minruntimeversion" value="2.0.31005.0" /> <param name="background" value="#000000" /> <param name="initParams" value="m=http://www.xbox.com/NR/rdonlyres/D5A8470A-A00C-4EE3-A87E-9A027CC6FFA0/0/vidhalo3odst230lo.asx" /> <a href="http://go.microsoft.com/fwlink/?LinkId=124807" style="text-decoration: none;"><img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none" /></a>

</object>

Change History (4)

comment:1 Changed 15 years ago by Tim Acheson

As requested, I am sending everything that your developers will need in order to add a button to the toolbar to facilitate embedding Silverlight using CKEditor.

Embedding Silverlight is very similar to embedding Flash. With Flash, the application is packaged in a SWF file. With Silverlight, the application is packaged in an XAP file.

So the new toolbar button will simply need to add some HTML -- it's a lot like embedding Flash.

How to embed Silverlight using HTML: http://msdn.microsoft.com/en-us/library/cc189089(VS.95).aspx

A list of all available embed parameters: http://msdn.microsoft.com/en-us/library/cc838268(VS.95).aspx

Working example -- a Silverlight Video player: http://www.timacheson.com/Blog/2009/sep/halo_3_odst_launches_next_week#silverlightControlHost

HTML code for the example:

<object id="Player" data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="640" height="360">
	<param name="source" value="/ClientBin/VideoPlayer.xap" />
	<param name="minruntimeversion" value="2.0.31005.0" />
	<param name="background" value="#000000" />
	<param name="initParams" value="m=http://www.xbox.com/NR/rdonlyres/D5A8470A-A00C-4EE3-A87E-9A027CC6FFA0/0/vidhalo3odst230lo.asx" />
	<a href="http://go.microsoft.com/fwlink/?LinkId=124807" style="text-decoration: none;"><img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none" /></a>
</object>

comment:2 Changed 15 years ago by Tim Acheson

If you wish, you could go a step further and package the video player used in my example, simply by including the file VideoPlayerM.xap with CKEditor. (An XAP file is the Silverlight equivalent of a SWF file for Flash.)

SL2VideoPlayer is an open source redistributable video player built in Silverlight 2:-

http://sl2videoplayer.codeplex.com/Wiki/View.aspx?title=installation%20instructions

This would enable your users to very easily embed video in a variety of formats, including media formats not supported by Flash.

comment:3 Changed 15 years ago by Tim Acheson

Allow me to add one additional piece of information that you will find useful.

When embedding Silverlight there is one mandatory <param/> element, namely "Source". This specifies the URI of the XAP file. (I.e. The URL of the file packaging the application, which is the Silverlight equivalent of a SWF file).

However, I reccomend giving your users the ability to set at least the basic params used in my sample HTML above, including Source and initParams whcih could be user-defined free text fields.

Here is the documentation for the Source param:

http://msdn.microsoft.com/en-us/library/cc838137(VS.95).aspx

When viewing the page about the Source param, on the left you will see links for of all supported <param/> names.

comment:4 Changed 10 years ago by Jakub Ś

Status: newconfirmed
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy