4

I am trying to hide vimeo video url from browser it is not working properly. I am using Jplayer plugin used to play a vimeo video it is working properly but the video links are showing in inspect element and it is also available for download

Below is my code

<script type="text/javascript">
$(document).ready(function(){
$("#jquery_jplayer_1").jPlayer({
    ready: function () {
        $(this).jPlayer("setMedia", {
            title: "Big Buck Bunny",
            //m4v: "https://skyfiregcs-a.akamaihd.net/exp=1445430563~acl=%2A%2F426511975.mp4%2A~hmac=8768bf06a0fa2761cd9ccc202352d3fdb5ef900c697f47e5c5d6c4452583b8d4/vimeo-prod-skyfire-std-us/01/3429/5/142149222/426511975.mp4",
                            m4v: "https://skyfiregcs-a.akamaihd.net/exp=1445581412~acl=%2A%2F423502157.mp4%2A~hmac=79d9fdcb40746a63224a8b26c4489246ac8de9f92aedb8c4d3004f31ee883000/vimeo-prod-skyfire-std-us/01/3279/5/141398811/423502157.mp4",
            poster: "http://www.jplayer.org/video/poster/Big_Buck_Bunny_Trailer_480x270.png"
        });
    },
    swfPath: "../../js/jplayer",
    solution: "flash, html",
    supplied: "webmv, ogv, m4v",
    size: {
        width: "640px",
        height: "450px",
        cssClass: "jp-video-360p"
    },
    useStateClassSkin: true,
    autoBlur: false,
    smoothPlayBar: true,
    keyEnabled: true,
    remainingDuration: true,
    toggleDuration: true
   });
});
 </script>';

Is there any solution to fixed the problem

Thanks in advance any suggestion would be appreciated.

Sharma Vikram
  • 2,440
  • 6
  • 23
  • 46

1 Answers1

-1

For this you have to do some jugglery with session.

Something like this:

 $(document).ready(function(){

<?php //----Set some session variable here-----// 
$_SESSION['url_on']=1;

?>


$("#jquery_jplayer_1").jPlayer({
    ready: function () {
        $(this).jPlayer("setMedia", {
            title: "Big Buck Bunny",

                            m4v: "getUrl.php",//--------->>call any function or page
            poster: "http://www.jplayer.org/video/poster/Big_Buck_Bunny_Trailer_480x270.png"
        });
    },

And in php function check for the session data,if available then return the desire url otherwise return false.

If any user hit the jplayer src he/she will see blank screen instead.

  • can you explain briefly i can't understand what are you saying ? – Sharma Vikram Oct 23 '15 at 11:45
  • first of all set a session variable in document.ready after that call a function which return the url (before it check for the session available or not) in php function. – Niraj Karmick Oct 23 '15 at 11:51
  • Jplayer uses their own script which uses src to play mp3/mp4.which is visible to user ,so that it will be good to use session for the checking purpose to avoid any downloads. – Niraj Karmick Oct 23 '15 at 11:57
  • your code is working properly but your code doesn't met my requirement again i'm trying to explain my question hope this time i explain you properly. – Sharma Vikram Oct 23 '15 at 12:19
  • my question is " i don't want to show any video url to registered user which is login – Sharma Vikram Oct 23 '15 at 12:22
  • Anyhow you have to show the url to play any video as Jplayer hit that src to play the same.You can not simply hide the src. – Niraj Karmick Oct 23 '15 at 12:25
  • Is there any way to hide url or encrypt video url so that registered user won't able to see and download video, – Sharma Vikram Oct 23 '15 at 12:27
  • See this link http://stackoverflow.com/questions/11195354/hide-mp3-full-url ...may it will help you to solve your issue – Niraj Karmick Oct 23 '15 at 12:32