I wanted to determine what browser the user is using because there can be problems with native mp4 video playback in browsers other than Internet Explorer.
If I know what browser they are using, I can notify them that they cannot view the video if it's not IE. I still have this to sort out, but at least I can get the correct browser and version for now :)
After researching this it turns out to be not as simple as it seems. However, I have found what I think to be a very simple solution and it seems to be working well.
It uses a 3rd party javascript file called 'bowser.js' .. you can read about it here ... https://github.com/lancedikson/bowser
I downloaded the entire package, but I think only the bowser.js file is needed for this. I've attached it here as well.
Setup is simple:
1. In the Web Projects Control Panel add the bowser.js file
1. Javascript File.png
2. In the UX Properties add bowser.js to the Javascript Linked Files
2. Javascript Linked Files.png
3. Call code to execute the javascript. In this test case I have the following code in the button OnClick event which puts the returned data into the control called Result.
Here is a video demonstrating the result: https://www.screencast.com/t/Rggr3ER9q
The sample UX is also attached.
If I know what browser they are using, I can notify them that they cannot view the video if it's not IE. I still have this to sort out, but at least I can get the correct browser and version for now :)
After researching this it turns out to be not as simple as it seems. However, I have found what I think to be a very simple solution and it seems to be working well.
It uses a 3rd party javascript file called 'bowser.js' .. you can read about it here ... https://github.com/lancedikson/bowser
I downloaded the entire package, but I think only the bowser.js file is needed for this. I've attached it here as well.
Setup is simple:
1. In the Web Projects Control Panel add the bowser.js file
1. Javascript File.png
2. In the UX Properties add bowser.js to the Javascript Linked Files
2. Javascript Linked Files.png
3. Call code to execute the javascript. In this test case I have the following code in the button OnClick event which puts the returned data into the control called Result.
Code:
{dialog.Object}.setValue('Result','Browser is ' + bowser.name + ' ' + bowser.version);
Here is a video demonstrating the result: https://www.screencast.com/t/Rggr3ER9q
The sample UX is also attached.
Comment