I've taken a look at the YouTube API and it seems quite clear (for security reasons) that the player (embedded or not) does not allow YouTube video to automatically initiate full screen once loaded.
I wondered if there was a way to do this using Javascript to act as if the user had pressed the full screen button?
Any ideas shared would be greatly appreciated.
I'm afraid you can't use the YouTube player API to initiate fullscreen programatically.
This is because the underlying issues with fullscreen in flash and html5 video would make such an api method seriously error-prone.
Official response to back me up:
https://groups.google.com/forum/#!msg/youtube-api-gdata/Tyv3vTw0RQk/449KahYVNFYJ
Related
We are displaying the video using videoJS library in bootstrap modal, the video looks fine in modal popup. However, when we try to see the video in full screen mode the video look quite blur.
So, my is question do we need to set the resolution if going for full screen mode OR it is explicitly handled by VideoJS?
How can the video will be seen in correct resolution in full screen mode using videoJS library ?
I hope its a Progressive download via a HTTP server, check your network download speed/video quality, because if once video download starts the video-quality will be locked. its a common issue for progressive downloads.
I am creating all in one music app using multiple APIs. I want to stream only audio of youtube song. As i searched a lot but could not find actual solution. many of them says it will be against Youtube TOS. If it is so than how "StreamUs" chrome extension is working. I am not creating something this but i want to stream a song audio only as it is in above extension.
Thanks in advance.
author of Streamus here. Just dropping in to give a definitive answer.
Chrome extensions can utilize both an invisible, permanent background page as well as a visible, temporary foreground page. When the foreground page loses focus - it is destroyed and all content is unloaded from memory.
Streamus hosts the YouTube video player on the background page which gives the illusion that the video is not loaded. It pipes all commands from the foreground UI to the background page.
However, it's worth noting that this is a violation of YouTube's Terms of Service. I've been working with YouTube to figure out a good solution to the problem and am almost there with a clever way to present video in the foreground without losing the audio. :)
Unfortunately it does pull the video as well for bandwidth, but good question.
as quoted by the author in
https://www.reddit.com/r/streamus/comments/1w64wj/question/ .
I am trying to tell if my video is going to play inline once the user starts the video (as apposed to fullscreen/in the native video player) on an iPhone in a UIWebView before the video has started. I have no way of knowing if the UIWebView has the setting allowsInlineMediaPlayback = YES as i do not know in what app or on what page my video is being displayed.
My goal is to only show the video if it can be played inline.
Is there any way to read the allowsInlineMediaPlayback setting from javascript, or detect if my video will play inline or not?
Everything I have read on the apple developers website seems to suggest that it will automatically play in full screen mode in safari. Now if they are using another app, as far as I know you do not have access to that apps UIWebViews properties. However, in an attempt to not be totally useless, here is a link to all of the methods you can query and you might find some useful information in there.
https://developer.apple.com/library/safari/documentation/AudioVideo/Reference/HTMLMediaElementClassReference/HTMLMediaElement/HTMLMediaElement.html#//apple_ref/doc/uid/TP40009355-CH18-SW27
Some more information that may be useful to you.
https://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/AudioandVideoTagBasics/AudioandVideoTagBasics.html#//apple_ref/doc/uid/TP40009523-CH2-SW1
I am developing an iPad app that embeds YouTube videos in HTML5 format into a UIWebView. The problem is that I want to pause the video when a user brings up modal dialog windows, rather than clear or stop the video as many have suggested. This is critical to a good user experience. Does anyone know any JavaScript or API that I can run to simply pause the video when an action that presents a modal dialog will occur?
The method I use to embed is described here.
http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html
This blog explains hot to build a video in HTML 5.
http://blog.steveheffernan.com/2010/04/how-to-build-an-html5-video-player/
Then interact with the video player via the method [myWebView stringByEvaluatignJavaScriptFromString:#"playVideo()"].
I didn't tested but it seems straightforward.
Are you sure we can play embedded YouTube videos in mobile Safari?
Good luck!
Have you tried going through official docs?
https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/ControllingMediaWithJavaScript/ControllingMediaWithJavaScript.html
I am using JavaScript to display a swf video, and I want to override the Full Screen button if possible, so that it redirects to another url instead of making the video full screen. Is there a parameter that I can pass to the SWFObject that will allow me to do this? I would appreciate any help. Thanks.
That depends on what video player you are using, not all video players created in Flash can support this. I recommend you elaborate your question about the specifics of the player / SWFObject, so that people can attempt to answer your question. You might also want to consult the documentation of the Flash player you are using.