R
R
rozochkin2014-05-21 11:23:40
Django
rozochkin, 2014-05-21 11:23:40

How to make your own embed code to transfer video content?

Good afternoon,
There is a site with video content, all content is only for authorization, it is necessary to make an embed code for all video files, apparently iframe, but with reference to a specific user (the user has his own domain).
The meaning is that the client of the site can place my video on his site, which should be played only on his domain.
The site is written in django.
I imagine this as a check on the HTTP_REFERER field, but I think this is not entirely safe, is there any smarter thing to implement this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
maxaon, 2014-05-21
@rozochkin

It is impossible to do it reliably without the participation of the client server. Using your strength, you can either complicate life, or weed out some of the users.
In an ideal world, the 'X-Frame-Options' header with a valid uri should work, but it doesn't work everywhere in our world .
As the easiest option - check the refferer. If there is, donate. If not, start checking on the client using JS - what is the parent domain, etc. You can also tie a flash, it has more features.
If you have a video player, you can remove the iframe altogether and embed it on the page, but this is more difficult. The flush policy (crossdomain.xml) will allow the restriction. html5 video - again through the fifth point, but there are a few more possibilities.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question