Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Find a trick with Dimiter to force YouTube to play music with a bette…

…r quality.
  • Loading branch information...
commit 7a1fb318e2836f22f7e7f36aabdcd7770d5da8ac 1 parent 6e2039f
Alexis Bernard authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  app/assets/javascripts/player.js.coffee
View
2  app/assets/javascripts/player.js.coffee
@@ -103,6 +103,7 @@ class @Player
onYouTubeStateChanged: (state) ->
@playNextTrack() if state == 0
+ @youtube.object.width = @youtube.object.height = '200px' if state == 1
pause: () ->
@pausedTrack = @playingTrack
@@ -158,6 +159,7 @@ class YoutubeWrapper
pause: -> @object.pauseVideo() if @object.pauseVideo
playUrl: (url) ->
+ @object.width = @object.height = '720px' # Force Youtube to choose a good playback quality
if @object.loadVideoByUrl
@object.loadVideoByUrl(url)
else
Please sign in to comment.
Something went wrong with that request. Please try again.