I've had a quick hack of the Iplayer app to get it working with HLS
listen again.

It was very straight forward.  No authentication keys or other
obfuscation.  If somebody wants to do an official fork, this is how you
do it :


Amend BBCXMLParser.pm on line 83

Where it is replacing the media selector that comes in the xml for the
flash streams, make it replace it with the media selector for the hls
streams instead


Code:
--------------------
    
  # convert to mediaselector 5 and look for pc flash streams
  if ($entry->{'url'} =~ 
/http:\/\/www\.bbc\.co\.uk\/mediaselector\/4\/mtis\/stream\/(.*)/) {
  $entry->{'url'} = 
"http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/apple-ipad-hls/vpid/$1";;
  }
  
  
--------------------



Then amend iplayer.pm  (sorry, this is the real hacky bit,  I did it
just to get it working, obviously it would need to be done properly in
an official version)

Amend the _msParse subroutine, to fool it into thinking that the hls
stream is wma  (around line 245)

Change it from

Code:
--------------------
    
  
  next unless ($type =~ /wma|x\-ms\-asf/ && $args->{'t'} eq 'wma' ||
  $type eq 'mp4' && $args->{'t'} eq 'aac');
  
--------------------


to


Code:
--------------------
    
  next unless ($type =~ /wma|x\-ms\-asf/ && $args->{'t'} eq 'wma' ||
  $type eq 'mp4' && $args->{'t'} eq 'wma');
  
--------------------


Just below it,hard code the type to be 'hls' so that it will be sent to
the PlayHLS plugin


Code:
--------------------
    
  push @streams, {
  #       it was this ---->               type    => $args->{'t'},
  type    => "hls",
  service => $media->{'service'},
  br      => $media->{'bitrate'},
  url     => $c->{'href'},
  };
  
--------------------



Thats it!


------------------------------------------------------------------------
expectingtofly's Profile: http://forums.slimdevices.com/member.php?userid=63263
View this thread: http://forums.slimdevices.com/showthread.php?t=53229

_______________________________________________
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to