How can I hide video src attribute from browser's inspect element?
Asked Answered
Y

2

5

What I Have?

I have simple HTML code which play a video

<video src="">

<video controls src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" 
       poster="http://sandbox.thewikies.com/vfe-generator/images/big-buck-bunny_poster.jpg"
       width="540" height="360">
</video>

What I Want?

I want to hide src attribute of video tag when someone open inspector/inspect element of browser.

Yesterday answered 18/4, 2016 at 7:52 Comment(1)
You should use Running JavaScript See something about this: #18704019Jaehne
I
3

If you actually want to protect your files from being downloaded you should consider using a streaming service and not http delivery. With HLS or MPEG-DASH you can DRM your content with encryption keys. Otherwise there is no way, think how Youtube and Vimeo can't stop people from downloading their files...

Indochina answered 18/4, 2016 at 16:47 Comment(0)
S
4

That is simply not possible.

If you want the browser to play the video, you have to tell him the url.
If you've send the url to the client, the user can grab it.

even if you obfuscate the url, and decode it in JS, as soon as my browser requests the video, I can grab the url in the network-logs of my dev-tools.

Stavros answered 18/4, 2016 at 9:7 Comment(2)
Is there any option to hide url to 1 level i.e. user can not access direct video link from src attribute of video tag from inspect element.Yesterday
not with the video-tag. you could use a plugin, but wich? flash: not on mobile available, Silverlight: afaik. rare, even on desktop, and I don't know the video-player-capabilities of Unity.Stavros
I
3

If you actually want to protect your files from being downloaded you should consider using a streaming service and not http delivery. With HLS or MPEG-DASH you can DRM your content with encryption keys. Otherwise there is no way, think how Youtube and Vimeo can't stop people from downloading their files...

Indochina answered 18/4, 2016 at 16:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.