[mythtv-users] PATCH: enable mythweb streaming via .asx

Rich West Rich.West at wesmo.com
Wed Nov 8 17:15:27 UTC 2006


Dave Pearson wrote:
> Another problem I have now found is that when I try and play a recording 
> on a linux pc, none of the players I have so far tried will ask for a 
> userid and password when attempting to play the file (Windows Media 
> Player does), instead they crash. Is there a way of including a userid & 
> password in the asx file?

Hrmm... It wouldn't be something configurable.  You'd probably have to
hardcode it in the url that gets generated within the asx file.  The
code would look something like this:

sub generate_asx
{
   my ($title, $subtitle, $filename) = @_;
   my ($file) = "";
  
   $filename =~ s/\s/%20/g;
  
   $file = "<ASX version = \"3.0\"> 
<TITLE>$title</TITLE>
    <ENTRY>
    <TITLE>$title - $subtitle</TITLE>
    <AUTHOR>MythTV - MythWeb</AUTHOR>
    <COPYRIGHT>GPL</COPYRIGHT>
        <REF HREF =
\"http://myusername:mypassword@" . $ENV{'HTTP_HOST'} . "/mythweb/" .
$filename . "\" />
    </ENTRY>
</ASX>\n";
   return ($file)
}

Essentially, you would have to pass the username and password as part of
the referenced HREF.

-Rich


More information about the mythtv-users mailing list