Subject: | patch to detect RealPlayer |
Find attached a patch that allows the detection if the web-site is being opened inside the
RealPlayer's browser. The RealPlayer uses the MSIE engine under windows and Safari/Gecko
under Mac OS X.
Subject: | realplayer.patch |
*** HTTP-BrowserDetect-1.06/lib/HTTP/BrowserDetect.pm 2009-11-24 18:09:43.000000000 +0000
--- source/svn/HTTP-BrowserDetect/lib/HTTP/BrowserDetect.pm 2009-12-02 13:49:49.088146375 +0000
***************
*** 52,58 ****
aol aol3 aol4
aol5 aol6 neoplanet
neoplanet2 avantgo emacs
! mozilla gecko
);
# Robots
--- 52,58 ----
aol aol3 aol4
aol5 aol6 neoplanet
neoplanet2 avantgo emacs
! mozilla gecko r1
);
# Robots
***************
*** 610,615 ****
--- 610,625 ----
}
}
+ # RealPlayer
+ $tests->{REALPLAYER} = ( index( $ua, "r1" ) != -1 || index( $ua, "realplayer" ) != -1 );
+
+ $self->{realplayer_version} = undef;
+ if ( $tests->{REALPLAYER} ) {
+ if ($ua =~ /realplayer\/([\d\.]+)/) {
+ $self->{realplayer_version} = $1;
+ }
+ }
+
$self->{major} = $major;
$self->{minor} = $minor;
$self->{beta} = $beta;
***************
*** 656,661 ****
--- 666,685 ----
return $os_string;
}
+ sub realplayer {
+ my ( $self, $check ) = _self_or_default(@_);
+
+ return 1 if $self->{tests}->{REALPLAYER};
+ return 0;
+ }
+
+ sub realplayer_version {
+ my ( $self, $check ) = _self_or_default(@_);
+
+ return $self->{realplayer_version} if exists $self->{realplayer_version} && $self->{realplayer_version};
+ return 0;
+ }
+
sub gecko_version {
my ( $self, $check ) = _self_or_default(@_);
my $version;