Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>22652123</title>
- <script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
- <script>
- var client = "FF";
- $(document).ready(function(){
- checkIE();
- startUp();
- startIt();
- });
- function checkIE() {
- var clientCheck = window.navigator.appName;
- if (clientCheck == "Microsoft Internet Explorer") {
- console.log("IE");
- client = "IE";
- // playvideos();
- return true;
- } else {
- console.log("FF");
- client = "FF";
- // hello();
- return false;
- }
- }
- function startIt(){
- if(client == "IE"){
- playvideos();
- }else{
- hello();
- }
- }
- function hello() {
- console.log("Hello");
- var players = document.getElementsByName("video1");
- var options = new Array("");
- url = "rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov";
- console.log(players[0].playlist);
- var id = players[0].playlist.add(url, null, options);
- players[0].playlist.playItem(id);
- console.log("playing video");
- }
- function playvideos() {
- console.log("enter");
- var vlc = document.getElementById("vlc");
- var options = new Array(":aspect-ratio=16:10", "--rtsp-tcp");
- //var options=[":ts-csa-ck="+EncryptionkeyValue];
- var urlVideofile = "rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov";
- var targetURL = "rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov";
- var itemId = vlc.playlist.add(targetURL, "", options);
- var id = vlc.playlist.add(urlVideofile, null, options);
- vlc.playlist.playItem(id);
- }
- function startUp(){
- var player;
- if (client == "IE") {
- player = "<object type='application/x-vlc-plugin' id='vlc' width='300' height='225' classid='clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921'></object>";
- } else {
- 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' />";
- }
- $("#video_holder").html(player);
- }
- </script>
- </head>
- <body>
- <div id="video_holder"></div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment