Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 64
Registered: ‎09-10-2012
My Device: Developer
Accepted Solution

What's the MediaPlayer's user-agent string?

Hi guys

 

How can I get the Media Player's user-agent string?

I need it for when the app requests a video stream through a secure connection (which I'll most likely make another thread about...)

I thought it was the same one as the browser, but it seems it's a different one.

 

I entered www.thismachine.info through the Browser and through a sample app's webview and they are the same... Just wanted to be sure.

 

Thanks in advance

Pepe

Developer
Posts: 64
Registered: ‎09-10-2012
My Device: Developer

Re: What's the MediaPlayer's user-agent string?

I made a simple php script, hosted and these are the results:

 

This was generated by my browser:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0

These were generated by WindowsMP:
Windows-Media-Player/12.0.7601.17514
NSPlayer/12.00.7601.17514 WMFSDK/12.00.7601.17514

BB10 Media Player:
io-media

 

So just "io-media"...

 

In case someone wants the script, it's a bunch of copy-pasted code:

<?php 
 echo $_SERVER['HTTP_USER_AGENT'];
$myFile = "testFile.txt";
$fh = fopen($myFile, 'a') or die("can't open file");
$stringData = "UA:\n";
fwrite($fh, $stringData);
$stringData = $_SERVER['HTTP_USER_AGENT']."\n\n";
fwrite($fh, $stringData);
fclose($fh);
 ?>