Closed yetty closed 9 years ago
Thank you for report. To HTTPS issue - embed videos should support SSL as well. Do you use {% video %}
tag and do you have django.core.context_processors.request
in TEMPLATE_CONTEXT_PROCESSORS
?
@yetty Yes. I have django.core.context_processors.request
in TEMPLATE_CONTEXT_PROCESSORS
and use {% video %}
tag.
To fix this I wrote js function that rewrites embed URL from http://youtube... to https://youtube... and then it works
@yetty maybe on django settings with HTTPS enabled (like SECURE_PROXY_SSL_HEADER
) prefer https
URLs over http
urls? Or add something like EMBED_VIDEO_SSL = True
- 2014 v 1:12, Olexandr Shalakhin:
I read you commented on the issue with Django embed video where on https site I have http YouTube links. Maybe you meant that if people copy/paste https links django-embed-video stores them as “https”. It would be great if all added links could be added as https youtube.
Saved url doesn’t have any effect on final url. It is used just for parsing video code.
To use or not to use HTTPS is decided on request.is_secure
. Take look at get_backend
function in VideoNode
[1]. HTTPS can be forced by passing extra params to template tag [2] - just in development version, not in pypi package yet. If any of these options doesn’t work for you, please give more information to reproduce your problem.
[1] https://github.com/yetty/django-embed-video/blob/master/embed_video/templatetags/embed_video_tags.py#L124 [2] http://django-embed-video.readthedocs.org/en/latest/examples.html#template-examples
I have installed django-embed-video in my Django 1.7 project and use SoundCloud and YouTube embedding and it works. Except the case that my site is HTTPS and video is HTTP so Chrome blocks it.