Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set the quality of youtube video #11

Closed
GoogleCodeExporter opened this issue Jul 10, 2015 · 13 comments
Closed

set the quality of youtube video #11

GoogleCodeExporter opened this issue Jul 10, 2015 · 13 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. set the quality of youtube video.

What is the expected output? What do you see instead?
higher resolution rather than the default 360px


Original issue reported on code.google.com by VietDucP...@gmail.com on 7 Dec 2011 at 8:35

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

You can change the quality setting in line 47 of the javascript. Your users may 
experience more stuttery playback if their bandwidth can't hang.

Original comment by jenkins2...@gmail.com on 9 Dec 2011 at 1:36

@GoogleCodeExporter
Copy link
Author

I just tried setting it to HD and it worked fairly well. Any sluggishness seems 
to be more a problem with the browser than with bandwidth in my case. (on 
wi-fi.)

Firefox about choked on it. The navigation became sluggish and at times 
unresponsive. Laptop fans were whirring into high gear. But Safari and Chrome 
handled it like a champ.

Original comment by jenkins2...@gmail.com on 9 Dec 2011 at 2:33

@GoogleCodeExporter
Copy link
Author

i changed quality setting in line 47 but the video won't start at all. i figure 
it out to add &hd=1 into line 34 which will make the video start at 720p

swfobject.embedSWF("http://www.youtube.com/v/" + videoId + 
"?enablejsapi=1&playerapiid=ytplayer&loop=1&hd=1", "ytapiplayer", videoWidth, 
videoHeight, "8", null, null, params, atts);

Original comment by VietDucP...@gmail.com on 20 Dec 2011 at 6:12

@GoogleCodeExporter
Copy link
Author

I'm quite ambivalent about this one.

Original comment by seanmcca...@gmail.com on 24 Feb 2012 at 4:50

  • Added labels: Type-Other
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

I'm going to continue letting the YT player determine the playback quality.  In 
the next build, I'll see what I can do to make it work as efficiently as 
possible.

Original comment by seanmcca...@gmail.com on 24 Feb 2012 at 4:56

  • Changed state: WontFix

@GoogleCodeExporter
Copy link
Author

Hello, I doon't find the line where change the quality :-S Someone could help 
me, please? thanks :-)

Original comment by corunath...@gmail.com on 1 Dec 2012 at 10:29

@GoogleCodeExporter
Copy link
Author

i couldn't find this line, too.
Where can i change the quality in the recent script??

Original comment by ulrich.d...@gmail.com on 21 Jan 2013 at 8:27

@GoogleCodeExporter
Copy link
Author

Where to make a better quality, like ONLY HD video?

Original comment by itomco...@gmail.com on 14 May 2013 at 9:58

@GoogleCodeExporter
Copy link
Author

guys, use this code (change videoQuality value as described at 
(https://developers.google.com/youtube/iframe_api_reference#Playback_quality):

 videoQuality = "hd720"

        window.onPlayerReady = function(e) {
            resize();
            if (options.mute) e.target.mute();
            e.target.setPlaybackQuality(videoQuality);
            e.target.seekTo(options.start);
            e.target.playVideo();   
        }

        window.onPlayerStateChange = function(state) {
            if (e.data == YT.PlayerState.BUFFERING) {
                e.target.setPlaybackQuality(videoQuality);
            }

            if (state.data === 0 && options.repeat) { // video ended and repeat option is set true
                player.seekTo(options.start); // restart
            }
        }

Original comment by fagnermo...@gmail.com on 11 Jul 2013 at 12:56

@GoogleCodeExporter
Copy link
Author

Hi, any updates regarding HD.
Cannot figure out still how to set it so it starts with HD quality.

Original comment by matiss.z...@gmail.com on 16 Sep 2013 at 7:02

@GoogleCodeExporter
Copy link
Author

#10 code work for me .. just a little bit of changing the code in here so it 
will work on buffering

if (e.data == YT.PlayerState.BUFFERING) {
                e.target.setPlaybackQuality(videoQuality);
            }

must be change e to state .. 

if (state.data == YT.PlayerState.BUFFERING) {
                state.target.setPlaybackQuality(videoQuality);
            }

the e behaviour is not defined, the parameter state in this line 
window.onPlayerStateChange = function(state) was declared, so state will be 
used as a behaviour. :)

Original comment by rincela...@gmail.com on 24 Sep 2013 at 1:33

@GoogleCodeExporter
Copy link
Author

Hello... this thread is a few years old... but can anyone give me a clear path 
to getting a higher quality full-screen video happening?

I've tried incorporating the above solutions, but to no avail.

I'm using 1.0.1

Original comment by de...@sheriffderek.consulting on 4 Jun 2015 at 5:59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant