Using this wizard, i cannot get a Youtube Playlist to autoplay With Low Volume.
https://developers.google.com/youtube/youtube_player_demo
have tried iframe, as3, as2.
Need volume/fullscreen controls.
Thanks!
Because the player parameters (left column) cannot support the control in volume.
Therefore, embed code is not useful in your case.
In iframe API reference, you can use player.setVolume() to set the volume after the player is ready.
If you want to control the volume, you have to write some code in Javascript.
Example (see Loud playback)
Related
I am a newbie in video streaming and I just build a sample website which plays videos. Here i just give the video file location to the video tag in html5. I just noticed that in youtube the video tag contains the blob url and had a look into this. I found that the video data comes in segments and came across a term called pseudo streaming. Whereas it seems likes the website that i build downloads the whole file and plays the video. I am not trying to do any live streaming, just trying to stream local videos. I thought maybe the way video data is received in segments is done by a video streaming server. I came across RED5 open source streaming server, but most of the examples that is given is for live streaming which I am not experimenting on. Its been few days and I am not sure whether i am on the right track
The segmented approach you refer to is to support Adaptive Bit Rate streaming - ABR.
ABR allows the client device or player download the video in chunks, e.g 10 second chunks, and select the next chunk from the bit rate most appropriate to the current network conditions. See here for an example:
https://stackoverflow.com/a/42365034/334402
For your existing site, so long as your server supports range requests then you probably are not actually downloading the whole video. With Range Requests, the browser or player will request just part of the file at a time so it can start playback before the whole file is downloaded.
For MP4 files, it is worth noting that you need to have the header information, which is contained in a 'block' or 'atom' called MOOV atom, at the start of the file rather than the end - it is at the end for regular MP4 files. There are a number of tools which will allow you move it to the start - e.g.:
http://multimedia.cx/eggs/improving-qt-faststart/
You are definitely on the right track with your investigations - video hosting and streaming is a specialist area so it is generally easier to leverage existing streaming technologies and services rather than to build them your self. Some good places to look to get a feel for open source solutions:
https://gstreamer.freedesktop.org
http://www.videolan.org/vlc/streaming.html
I want to be able to load only the audio stream of the youtube video and process it (EQ, Effects, etc.) through a graph of Web Audio nodes.
Is this doable? Any open-source work out there, doing that?
Thanks in advance to all and any responses.
No, because you can't get audio streams cross-domain. (that is, if your code could be hosted on YouTube.com, sure, but not from mydomain.com.)
The reason for this (you CAN do it if CORS is set up, but it's not on YouTube) is because if you can get the audio stream, you can do a bit-copy of the data. Just like images, they don't want to leak the raw data.
I play video using YouTube iFrame. Closed youtube controls in webview perfectly. player.playVideo(),player.stopVideo() working but player.mute() and player.Setvolume (60) does not. does anyone help me?
i am using this module https://github.com/gilesvangruisen/Swift-YouTube-Player/
YouTube Api
Most of the JavaScript Player API functions have Objective-C equivalents, though some of the naming may differ slightly to more closely match Objective-C coding guidelines. Notable exceptions are methods controlling the volume of the video, since these are controlled by the phone hardware or with built in UIView instances designed for this purpose, such as MPVolumeView.
https://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html#//apple_ref/doc/uid/TP40009523-CH5-SW10
Volume Control in JavaScript
On the desktop, you can set and read the volume property of an or element. This allows you to set the element’s audio volume relative to the computer’s current volume setting. A value of 1 plays sound at the normal level. A value of 0 silences the audio. Values between 0 and 1 attenuate the audio.
This volume adjustment can be useful, because it allows the user to mute a game, for example, while still listening to music on the computer.
On iOS devices, the audio level is always under the user’s physical control. The volume property is not settable in JavaScript. Reading the volume property always returns 1.
I have a website that plays back videos using the html5 video tag and the javascript api for the video tag, and also plays back youtube videos using the youtube javascript api. I notice a bug on some browsers for youtube videos - when I seek to a certain point and play (all this in response to a user click on a button) the video doesn't seek. It plays from the beginning.
This is not a problem for videos played back with the html5 video tag. I think the reason that it is not a problem is that I use the "preload" option with that tag, which means that the video is mostly loaded and buffered before the user even clicks the button that does the SEEK.
So to get it to work with youtube, I need an equivalent of a "preload", or, perhaps I can make autoplay true, but then pause the video after a millisecond, just to get the buffering started.
Is there some solution to this that I don't know about?
Which function are you using to do the seeking? It sounds a little like you might be using "playVideoAt()" -- with that function, if you specify a time beyond what is loaded, then it is expected behavior for it to start to play at the beginning. If, however, you're using the "seekTo()" method, then it shouldn't be doing that ... seekTo() should allow playing beyond what is loaded without a problem.
Another possibility would be to see if the "allowSeekAhead" parameter (to the "seekTo()" method) is being set or not.
I know there is this &hd=1 code to start a YouTube video in 720p. Is there a code or trick to add at the end of a YouTube video URL to start in 1080p?
Seems to be working again :)
Using an example:
before:
http://www.youtube.com/watch?v=ecsCrOEYl7c
after:
http://www.youtube.com/watch_popup?v=ecsCrOEYl7c&vq=hd1080
note both:
watch_popup
&vq=hd1080
Other possible values can be found here:
https://developers.google.com/youtube/iframe_api_reference#Playback_quality
You can also change the start time of the player by appending this (to 1 minute and 22 seconds in this example):
&t=1m22s
Some documentation can be found here:
https://developers.google.com/youtube/
It's not possible to set the quality to 1080p only with an URL. Some years ago it was possible by adding &fmt=37 but it doesn't work anymore.
However, if you can use JavaScript the YouTube API will allow you to select the quality.
From documentation:
hd (supported players: AS2)
Values: 0 or 1. Default is 0. Setting to 1 enables HD playback by default. This has no effect on the Chromeless Player. This also has no
effect if an HD version of the video is not available. If you enable
this option, keep in mind that users with a slower connection may have
an sub-optimal experience unless they turn off HD. You should ensure
your player is large enough to display the video in its native
resolution.
AS2 player will be retired in October 2012 and the embed codes on YouTube website load AS3 player by default. To show hd1080 you need to use JavaScript API. The functions are described here.