Showing posts with label Silverlight. Show all posts
Showing posts with label Silverlight. Show all posts

Saturday, July 30, 2011

Adding Video into a Web Page Using Silverlight


Well, if you're a regular reader of blogs, you would have noticed that I recently posted some videos of Visual Studio and ASP.NET AJAX Silverlight-based. Many of you might want to download videos from Web pages, Web logs, sites, etc., and would ask where to download the video, such as to host it, etc. Also, some of you might be waiting to use the website Silverlight. Well, this post (inspired by my experience) will help you understand how it is possible to achieve both (both use the Silverlight video host web pages) together.

The first thing you need to download a video, video course. You can start recording a screen shot of a simple "how to" technical article or even a delicious recipe that you tried. You can record videos using the screen capture tool or can try it for free  http://www.microsoft.com/downloads/details.aspx?FamilyID=5691BA02-E496-465A-BBA9-B2F1182CDF24&displaylang=en

Once you are done with recording a decent size video (say of size 3-4 MB), you are all set to start publishing the video.

Video encoding for Windows Live Streaming using Expression Encoder


2. Open Expression Encoder, select "File - "Import" and chose the location where you have your recorded video

3. It shows the Imported Video under the Media Content section

4. Select Settings in the right and under Profile adjust the Video and Audio to reduce the size.  Typically anything more than 25MB is going to have issues when using Silverlight Streaming.  So adjust the settings accordingly.

5. Switch to the Output tab and under Job Output - Template - chose a template for the video.  I chose the Silverlight Template which looks cool.

6. Once you are done with the above, click Encode to encode the video file for streaming

7. The Encoded file is typically stored in Documents folder under Expression\Encoder folders.

8. A folder is created for every encoded video

9. When you navigate to this folder, you might find the following files

i. BasePlayer.js

ii. Default.html

iii. Your WMV Video file

iv. MicrosoftAjax.js

v. player.js

vi. player.xaml

vii. PlayerStrings.js

viii. project.csproj

ix. Silverlight.js

x. StartPlayer.js

10. We need to add a Manifest file to the above files.

11. Create a simple .txt file and rename it to manifest.xml.  Open it using any text editor and copy paste the following contents

1.0
StartWithParent
   MicrosoftAjax.js
   BasePlayer.js
   PlayerStrings.js
   player.js
   StartPlayer.js

Save this file

12. Secondly, you may not want the video to start playing automatically since it might be a little annoying for your visitors, particularly if there are more than a single video.  To avoid this, you can edit the StartPlayer.js file and navigate to the section where it says autoPlay.  It is set to true by default.  Change it to false. This would make the video play after users click on the same.

13. Once you are done with the above changes, select all the files mentioned above (contents of the folder for this particular video) and Zip them.  You would need to ignore the following files while zipping

i. Default.html

ii. Silverlight.js

iii. project.csproj file

14. The zipped file is what you would require to host your video

Silverlight Streaming





Silverlight Streaming is a free resource streaming services that Windows Live, you can accommodate up to 4 GB for free streaming videos and an innovative approach, because we take care of streaming and hosting party. All you need is a Silverlight player installed on the client side to make your video.

You can get a Silverlight Streaming account for free from http://silverlight.live.com  Once you create an account, visit the



Manage Applications section and select "Upload a Silverlight Application" link

You would require to provide a name which has no space (little annoying) without hyphen (even more annoying if you are used to using hyphens) and there after Browse to upload the zipped files.

Once you are able to upload the zip file successfully, you would get an URL with an iframe tag and the required properties.

Adding it to your website


 Well, all you have to do is to copy the iframe URL provided in the Silverlight Streaming site and paste it into your blog template (switching to HTML View) / website.

Thats it, you could see that your videos are playing powered by Silverlight Streaming.

Happy Silverlight Streaming !!!








Sunday, September 5, 2010

Microsoft Silverlight 4 and SharePoint 2010 Integration (book review)

SharePoint 2010 comes with native support for Silverlight allows you to create rich Internet applications (RIA) is easier and faster. And while Silverlight has been around for some years more to develop RIA Silverlight in SharePoint 2010. While you could use the classic - the approach of Web services based on SharePoint 2010 comes with the Silverlight object model that makes it easy to work with data in SharePoint Silverlight applications

Microsoft Silverlight and SharePoint 2010 Integration four book covers the basics of developing Silverlight applications in SharePoint 2010 platform. The book begins with an overview of what Silverlight is and what the integration capabilities provided by SharePoint 2010 is as follows: it is all supported with easy to follow samples. Over the next few chapters of the book deals with the integration capabilities in more detail and focus on different parts such as Silverlight Object Model, Business Connectivity Services (BCS) and SharePoint Data Services.

Although the book targets developers who have previous SharePoint experience it provides in-depth explanation of new capabilities of SharePoint 2010, so if you haven’t done that much with the newest version of SharePoint, you won’t feel lost. The detailed explanation of different pieces of the sample solutions makes it easy to learn from the examples and the clear chapter structure makes it possible to skip the pieces that you are already familiar with.

Since the book covers basic SharePoint and Silverlight development is not really suitable for beginner developers. Have an understanding of the impact of development on both platforms, display, before you start reading this book. 4 On the other hand, Microsoft Silverlight and SharePoint integration, the book covers advanced topics such as removing data from the user interface level or to discuss the distribution capabilities Various Silverlight applications in SharePoint 2010, and when to use which is what that the book does not make much developers. In fact, it is a book that provides an overview of the average level of how you can use Silverlight4 to create four RIA SharePoint in early 2010.

Microsoft Silverlight4 and SharePoint 2010 Integration is an interesting and readable book that explains the new features of SharePoint 2010 to create rich Internet applications using Silverlight in April. It provides insight into both SharePoint 2010 and Silverlight in April and is a good starting point to explore more advanced topics RIA. If you are interested in taking advantage of Silverlight to create rich applications on the SharePoint platform in 2010 but have not done much with Silverlight, however, is a book to read.