Disable Right Click (Windows Media Player)

Discussion in 'Programming' started by haiderhaider, Oct 15, 2008.

  1. #1
    Hello everyone

    I have just embedded windows media player to my website, and i want to disable right to protect my stream, i found JS but it didn’t work the script disabled right click on the whole page except the media player if anyone can help i will be thankful

    Thanks in Advanced
     
    haiderhaider, Oct 15, 2008 IP
  2. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #2
    i dont think its possible atleast using javascript since its an application
     
    Bohra, Oct 15, 2008 IP
  3. ranabra

    ranabra Peon

    Messages:
    125
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Even if your do succeed and do find the right script. trust me on the long run you can not really block someone to protect (in this case your stream).
    Whatever client side script you use it can be by passed by some one with even a little experience.
    This is a bummer I know but that is the internet reality
     
    ranabra, Oct 15, 2008 IP
  4. Bind

    Bind Peon

    Messages:
    70
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    insert the following code into the <object> tag and it should disable drag, select, and right-click content menu:

    
     oncontextmenu="return false" ondragstart="return false" onselectstart="return false"
    
    Code (markup):
    that said, all they have to do is look at your source code to get the stream, so you may want to obfuscate the code.

    these are hardly fool-proof ways as anyone can get the stream from a netstat -a, but they may deter the casual non-techy surfer.



    EDIT: Looked through some old media scripts I have and found this WMP PARAM you might be able to use:

    
    <PARAM NAME="EnableContextMenu" VALUE="false">
    
    Code (markup):
     
    Bind, Oct 16, 2008 IP