sync youtube videos
parent
32a2b397ee
commit
f1b745c761
|
@ -37,6 +37,12 @@ class Orgy(Base):
|
|||
t += 303
|
||||
return t
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def seconds_since_starts(self):
|
||||
return int(time.time() - self.start_utc)
|
||||
|
||||
|
||||
def get_running_orgy(v, chat_id):
|
||||
if not (v and v.allowed_in_chat): return None
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<div>
|
||||
<p id="orgy-file-container" class="resizable">
|
||||
{% if orgy.type == 'youtube' %}
|
||||
<iframe style="border: none" sandbox="allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox" title="Play" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen src="https://cdpn.io/pen/debug/NWeVNRj?v={{orgy.data}}&autoplay=1"></iframe>
|
||||
<iframe style="border: none" sandbox="allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox" title="Play" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen src="https://cdpn.io/pen/debug/NWeVNRj?v={{orgy.data}}&autoplay=1{% if orgy.end_utc %}&start={{orgy.seconds_since_starts}}{% endif %}"></iframe>
|
||||
{% elif orgy.type == 'rumble' %}
|
||||
<iframe src="{{orgy.data}}" frameborder="0" allowfullscreen></iframe>
|
||||
{% elif orgy.type == 'twitch' %}
|
||||
|
|
Loading…
Reference in New Issue