Can I Host a Silverlight video (Smooth Streaming) on ASP.NET page?
-
Monday, March 22, 2010 10:05 AM
Hi,
I am trying to play the Smooth Streaming Silverlight video only from the ASP.NET page. More than that, I am trying to enable the functionality to navigate to the markers directly upon clicking a certain hyperlink on the ASP.NET page. Please note that, I do not create a Silverlight project within my solution (Yes, this is a purely ASP.NET Web Project). Is this possible? I could create a aspx page that will play the Smooth Streaming video in the Template using the object tag (code below), even tho I need to pass all these Playlist value within the initParam tag. And here are my questions:
- How do I get/pass the Playlist values that I know only belong to the video I am trying to play? Information such as Chapter items, etc. I thought about getting these values from the manifest file. Would this be the only way?
- How can I target the marker? After going thru all the possible online sources, I have sadly concluded that this is not possible without creating a Silverlight project. All these references (.dll files) I seem to need do not work in the aspx.cs. For example,
code extracting file contents from xap folder will not work because of System.dll issue; Playlist class will generate the same error; I can't of course use the MediaElement class.
Thanks! Hope my question makes sense.<div id="silverlightControlHost"> <object data="data:application/x-silverlight," type="application/x-silverlight" width="100%" height="100%"> <param name="source" value="MediaPlayerTemplate.xap"/> <param name="onerror" value="onSilverlightError" /> <param name="autoUpgrade" value="true" /> <param name="minRuntimeVersion" value="3.0.40624.0" /> <param name="enableHtmlAccess" value="true" /> <param name="enableGPUAcceleration" value="true" /> <param name="initparams" value='playerSettings = <Playlist> <AutoLoad>true</AutoLoad> <AutoPlay>true</AutoPlay> <DisplayTimeCode>false</DisplayTimeCode> <EnableCachedComposition>true</EnableCachedComposition> <EnableCaptions>true</EnableCaptions> <EnableOffline>true</EnableOffline> <EnablePopOut>true</EnablePopOut> <StartMuted>false</StartMuted> <StretchMode>None</StretchMode> <Items> <PlaylistItem> <AudioCodec>WmaProfessional</AudioCodec> <Description></Description> <FileSize>13565005</FileSize> <FrameRate>10</FrameRate> <Height>320</Height> <IsAdaptiveStreaming>true</IsAdaptiveStreaming> <MediaSource>movVideo.ism%5CManifest</MediaSource> <ThumbSource></ThumbSource> <Title>movVideo</Title> <VideoCodec>VC1</VideoCodec> <Width>428</Width> <Chapters> <ChapterItem> <Position>10.000</Position> <ThumbSource>movVideo_10.000.jpg</ThumbSource> <Title>Reset</Title> </ChapterItem> <ChapterItem> <Position>23.000</Position> <ThumbSource>movVideo_23.000.jpg</ThumbSource> <Title>Retry</Title> </ChapterItem> <ChapterItem> <Position>28.000</Position> <ThumbSource>movVideo_28.000.jpg</ThumbSource> <Title>Restart</Title> </ChapterItem> <ChapterItem> <Position>32.000</Position> <ThumbSource>movVideo_32.000.jpg</ThumbSource> <Title>Reinstall</Title> </ChapterItem> <ChapterItem> <Position>37.000</Position> <ThumbSource>movVideo_37.000.jpg</ThumbSource> <Title>Restore</Title> </ChapterItem> </Chapters> </PlaylistItem> </Items> </Playlist>'/> <div onmouseover="highlightDownloadArea(true)" onmouseout="highlightDownloadArea(false)"> <img src="" style="position:absolute;width:100%;height:100%;border-style:none;" onerror="this.style.display='none'"/> <img src="Preview.png" style="position:absolute;width:100%;height:100%;border-style:none;" onerror="this.style.display='none'"/> <div id="overlay" class="fadeLots" style="position:absolute;width:100%;height:100%;border-style:none;background-color:white;"/></div> <table width="100%" height="100%" style="position:absolute;"><tr><td align="center" valign="middle"> <img src="http://go2.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight"> </td></tr></table> <a href="http://go2.microsoft.com/fwlink/?LinkID=124807"> <img src="" class="fadeCompletely" style="position:absolute;width:100%;height:100%;border-style:none;" alt="Get Microsoft Silverlight"/> </a> </div> </object> <iframe id='_sl_historyFrame' style='visibility:hidden;height:0;width:0;border:0px'></iframe></div> - How do I get/pass the Playlist values that I know only belong to the video I am trying to play? Information such as Chapter items, etc. I thought about getting these values from the manifest file. Would this be the only way?

