Browse files

Youtube player is not broken anymore when user clicks on links.

  • Loading branch information...
1 parent 5a12cea commit 1109bf8cbac78fdad154e08b281e3df7377555bf Alexis Bernard committed Nov 30, 2012
Showing with 7 additions and 1 deletion.
  1. +1 −1 app/assets/javascripts/player.js.coffee
  2. +6 −0 app/assets/stylesheets/base.css
View
2 app/assets/javascripts/player.js.coffee
@@ -16,7 +16,7 @@ class @Player
@youtube.appendChild(param = document.createElement('param'))
param.setAttribute("name", "allowScriptAccess")
param.setAttribute("value", "always")
- $('.tracks')[0].appendChild(@youtube)
+ document.body.parentElement.appendChild(@youtube) # Attach to HTML to prevents turbolinks from replacing the flash embed.
@autoPlay()
observe: (name, callback) ->
View
6 app/assets/stylesheets/base.css
@@ -224,6 +224,12 @@ footer section.settings {
width: 100%;
}
+/* TODO: Overlap track cover. */
+#youtube-player {
+ position: absolute;
+ top: -200px;
+}
+
@media (min-width: 200px) {
.track {
width: 50%;

0 comments on commit 1109bf8

Please sign in to comment.