Guest User

22652123

a guest
Mar 26th, 2014
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <title>22652123</title>
  5.         <script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
  6.         <script>
  7.                 var client = "FF";
  8.  
  9.                 $(document).ready(function(){
  10.                     checkIE();
  11.                     startUp();
  12.                     startIt();
  13.                 });
  14.  
  15.                 function checkIE() {
  16.                     var clientCheck = window.navigator.appName;
  17.                     if (clientCheck == "Microsoft Internet Explorer") {
  18.                         console.log("IE");
  19.                         client = "IE";
  20.                         // playvideos();
  21.                         return true;
  22.                     } else {
  23.                         console.log("FF");
  24.                         client = "FF";
  25.                         // hello();
  26.                         return false;
  27.                     }
  28.                 }
  29.  
  30.                 function startIt(){
  31.                     if(client == "IE"){
  32.                         playvideos();
  33.                     }else{
  34.                         hello();
  35.                     }
  36.                 }
  37.  
  38.                 function hello() {
  39.                     console.log("Hello");
  40.                     var players = document.getElementsByName("video1");
  41.                     var options = new Array("");
  42.                     url = "rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov";
  43.                     console.log(players[0].playlist);
  44.                     var id = players[0].playlist.add(url, null, options);
  45.                     players[0].playlist.playItem(id);
  46.                     console.log("playing video");
  47.                 }
  48.  
  49.                 function playvideos() {
  50.                     console.log("enter");
  51.                     var vlc = document.getElementById("vlc");
  52.                     var options = new Array(":aspect-ratio=16:10", "--rtsp-tcp");
  53.                     //var options=[":ts-csa-ck="+EncryptionkeyValue];
  54.                     var urlVideofile = "rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov";
  55.                     var targetURL = "rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov";
  56.                     var itemId = vlc.playlist.add(targetURL, "", options);
  57.                     var id = vlc.playlist.add(urlVideofile, null, options);
  58.                     vlc.playlist.playItem(id);
  59.                 }
  60.  
  61.                 function startUp(){
  62.                     var player;
  63.                     if (client == "IE") {
  64.                         player = "<object type='application/x-vlc-plugin' id='vlc' width='300' height='225' classid='clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921'></object>";
  65.                     } else {
  66.                         player = "<embed type='application/x-vlc-plugin' pluginspage='http://www.videolan.org'  id='vlc' name='video1'  autostart='yes'   toolbar='true'  loop='yes' width='400' height='300' target='rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov' />";
  67.                     }
  68.                     $("#video_holder").html(player);
  69.                 }
  70.         </script>
  71.     </head>
  72.     <body>
  73.         <div id="video_holder"></div>
  74.     </body>
  75. </html>
Advertisement
Add Comment
Please, Sign In to add comment