Coder Social home page Coder Social logo

Comments (6)

shalakhin avatar shalakhin commented on June 3, 2024

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.

from django-embed-video.

yetty avatar yetty commented on June 3, 2024

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?

from django-embed-video.

shalakhin avatar shalakhin commented on June 3, 2024

@yetty Yes. I have django.core.context_processors.request in TEMPLATE_CONTEXT_PROCESSORS and use {% video %} tag.

from django-embed-video.

shalakhin avatar shalakhin commented on June 3, 2024

To fix this I wrote js function that rewrites embed URL from http://youtube... to https://youtube... and then it works

from django-embed-video.

shalakhin avatar shalakhin commented on June 3, 2024

@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

from django-embed-video.

yetty avatar yetty commented on June 3, 2024
    1. 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

from django-embed-video.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.