Kaynağa Gözat

added video embed code functionality, on Sunset video demo page

Harlan Iverson 7 yıl önce
ebeveyn
işleme
c29f9bf4f4

+ 3 - 1
app/resources/templates/md/posts/2018-03-01-video-Sunset_at_Ocean_Beach-wBA6drSk1z0.md

@@ -1 +1,3 @@
-{:title "Video Sunset_at_Ocean_Beach-wBA6drSk1z0" :page-index 5028 :layout :video :video-thumbnail-url "/media/videos/Random/Sunset_at_Ocean_Beach-wBA6drSk1z0.jpg" :video-url "/media/videos/Random/Sunset_at_Ocean_Beach-wBA6drSk1z0.hls/out.m3u8" :video-description "Sunset_at_Ocean_Beach-wBA6drSk1z0" }
+{:title "Video Sunset_at_Ocean_Beach-wBA6drSk1z0" 
+:video-embed-path "Random/Video Sunset_at_Ocean_Beach-wBA6drSk1z0"
+:page-index 5028 :layout :video :video-thumbnail-url "/media/videos/Random/Sunset_at_Ocean_Beach-wBA6drSk1z0.jpg" :video-url "/media/videos/Random/Sunset_at_Ocean_Beach-wBA6drSk1z0.hls/out.m3u8" :video-description "Sunset_at_Ocean_Beach-wBA6drSk1z0" }

+ 9 - 0
app/resources/templates/themes/ispooge/html/partials/video-player.html

@@ -17,6 +17,15 @@
   //player.play();
   </script>
 
+
+{% if post.video-embed-path %}
+<button onclick="var el = $('#video-embed-code'); var newDisplay = (el.css('display') == 'none') ? 'block' : 'none'; el.css('display', newDisplay); console.log(newDisplay);">Embed Code</button>
+<textarea id="video-embed-code" style="display: none; width: 30em; height: 6em; font-family: monospace;"><iframe src="{{site-url}}/embed.html#{{ post.video-embed-path }}"></iframe>
+</textarea>
+{% endif %}
+
+
+
 {% else %}
 
 Twitch: {{post.video-twitch-channel}}