Embed player on https website

Aug 26, 2010 at 10:39 AM

I got the player working with our Windows Media Services 2008 server on a normal http website. However when I try to access the page over a https connection, the XAP loads, but no video is playing. Can this be solved?

Aug 26, 2010 at 2:57 PM

Maybe this is crossdomain issue. Have you properly configured clientaccesspolicy.xml ?

Aug 26, 2010 at 3:06 PM
I used this and it worked fine... might want to tighten it up when you deploy but it worked for me in the test/dev environment... <access-policy> <cross-domain-access> <policy> <allow-from http-request-headers="SOAPAction"> <domain uri="http://*"/> <domain uri="https://*"/> </allow-from> <grant-to> <resource path="/" include-subpaths="true"/> </grant-to> </policy> </cross-domain-access> </access-policy> I put it in the root folder of my website (in test/developement environment) in a file named ClientAccessPolicy.xml if you are not familiar with this and it cleared up any issues like your post suggests... Use Firebug and Firefox to ensure it is found and loaded properly... well... seeing as how some have particular feelings for particular browsers this may not be an option for you but it made debugging a breeze... Cheers; brendonr
Aug 26, 2010 at 4:10 PM

I created the ClientAccessPolicy file as you suggested but still no video. I changed the allow-from tag to http-methods="*" which didn't help either. I'm not sure the file is even loaded though, I have no experience with Firebug but I ran it and don't see the file being loaded anywhere.

The test page is located at https://manager.instorebroadcast.com/previews/Silverlight4VideoPlayerTestPage.html perhaps you could have a look? (if you change https to http it works)

This website is hosted on 2 servers with a load-balancer in front of them. I read something about Silverlight loading the clientaccesspolicy on port 943 (http://msdn.microsoft.com/en-us/library/cc645032(VS.95).aspx) which would need an additional entry in the loadbalancer.

Normally the clientaccesspolicy.xml should be loaded when it's placed in the root of the website, without any additional changes to the XAP?

Aug 26, 2010 at 5:06 PM
I get this error when I hit play as there is no item loaded in the playlist... Load your playlist item in code or XAML... The error is from the microsoft library saying you have no source set... essentially, there is nothing to play... As far as firebug goes... download it... install it.... and then you will see a little bug in the bottom right of the firefox browser when you run firefox... hit that and you can see all the http GET requests in half of the window... one of them is for ClientAccesspolicy.xml file. The response tab will have the file source listed if it found it or an error if it didn't... Hope this helps yah... Good luck... CS myPlayer.Playlist.Add(new Microsoft.SilverlightMediaFramework.Core.Media.PlaylistItem { MediaSource = new Uri(Your MEDIA URL HERE), DeliveryMethod = Streaming for MMS, SMooth Streaming is Adaptive Streaming... search posts here for DeliveryMethod, Title = A title for the playlist, Description = A description }); XAML <pp:Player.Playlist> <Media:PlaylistItem MediaSource="http://mediadl.microsoft.com/mediadl/iisnet/smoothmedia/Experience/BigBuckBunny_720p.ism/Manifest" Description="from xaml" Title="From Xaml" DeliveryMethod=" </pp:Player.Playlist>--> Error: Unhandled Error in Silverlight Application Play is not allowed when there is no source set. at Microsoft.Web.Media.SmoothStreaming.SmoothStreamingMediaElement.Play() at Microsoft.SilverlightMediaFramework.Plugins.SmoothStreaming.SmoothStreamingMediaPlugin.Play() at Microsoft.SilverlightMediaFramework.Core.SMFPlayer.Play() at Microsoft.SilverlightMediaFramework.Core.SMFPlayer.PlayElement_Click(Object sender, RoutedEventArgs e) at System.Windows.Controls.Primitives.ButtonBase.OnClick() at System.Windows.Controls.Button.OnClick() at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e) at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e) at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName) Source File: https://manager.instorebroadcast.com/previews/Silverlight4VideoPlayerTestPage.html Line: 0 Cheers; brendon
Aug 26, 2010 at 5:10 PM
sorry... this site doesn't render properly in any browser for some reason sometimes and sometimess it does this with my posts... It looks bad butcopy it out and sort it out that way... I still can't get the site to view right... something there it doesn't like... Brendon
Aug 26, 2010 at 7:04 PM

In the Firebug Net tab I see 5 Get requests:

  • Silverlight4VideoPlayerTestpage.html
  • Silverlight.js
  • fwlink?LinkId=161376 (from microsoft.com domain)
  • Silverlight4VideoPlayer.xap
  • SLMedallion_NLD.png

ClientAccessPolicy.xml is not called. After some research it turns out that Silverlight doesn't look for this file when it thinks it's not a cross domain call. (http://forums.silverlight.net/forums/p/193638/459689.aspx)

Silverlight only attempts to retrieve the CDAP of the recipient service when the Silverlight runtime detects that you are making a request out of the application domain of the Silverlight application. If you're not trying to cross a domain boundary, the file is not required and will not be retrieved

 Concerning the playlist, if you visit the same page over http instead of https you will see that it's actually working (http://manager.instorebroadcast.com/previews/Silverlight4VideoPlayerTestPage.html).

Aug 26, 2010 at 7:26 PM

Yup Your are right on the cross domain call and if the media and web are on the same domain you have nothing to worry about. However, I am facing the same problem as you with the player… If this is a MMS feed you will notice that the play/pause button does not work… So even though it plays, it won't stop. Now if you can explain this behavior on your player… overridden SMFPlayer but not implementing the base call for play or pause in your overridden routine for instance then it is explained but I have the same problem with my player and MMS feeds…. Not sure if they are related or not… I am interested in what you find out for sure… Doesn't seem to throw any errors… You could try and play a smooth streaming url and see if play and pause works with that… Here is a URL you can try… This may shed some light into why this is working or not… Cross Domain will come into this though for this url to work…

http://mediadl.microsoft.com/mediadl/iisnet/smoothmedia/Experience/BigBuckBunny_720p.ism/Manifest"

Set the delivery method to adaptive streaming, fill in the other couple of items the playlistitem expects and the player should do the rest… Quiting time here now…. All the best and good luck… Wish I could offer more…

Cheers;

Brendon

Aug 27, 2010 at 2:30 PM

When I add the smooth streaming url from microsoft.com it plays over https. Additionally, progressive download of wmv also works with https (with relative url to files on the same domain).

Unfortunately after many more hours of testing we still don't have the Windows Media Service stream working when the website is viewed over https.

Aug 30, 2010 at 9:39 PM

Hi RikD;

Do you have MMS working with your player with the pause/play functionality working????  I mean without being a SSL connection.  I am not having any luck with an MMS feed from expression encoder to this player for some reason...  It will play when I select the item from the playlist but not from the play button... and then it just won't stop.. :-)  I am just wondering if you are past this and is there something I am missing or is there a bug that should be addressed...  Anyone like to share their experience with this???  Does anyone have MMS working with their extended player?...  I mean the play and pause routines are called and the player behaves as you would think it should... it pauses and plays at the click of the play button provided... Maybe all of this is a part of a bigger problem with MMS feeds and this framework...

Aug 31, 2010 at 7:27 PM
Edited Oct 22, 2010 at 7:25 PM

RikD....  Did you get your player to work over https?  I have not gotten any responses on this and was wondering if it was even possible?