Youtube embedded player video size issue - actionscript-3

We have implemented embedded youtube player in our flash application which is written in action script 3.
We are facing a issue with the display of video. After clicking on play button the video size is displaying 1/4 of the display and shifting to the top left corner of the player display leaving the remaining space as blank.
Reference used for implementing embedded youtube player.
https://developers.google.com/youtube/flash_api_reference
Kindly suggest.
Thanks

From the Iframe API itself, in setting the player size, you should use this:
player.setSize(width:Number, height:Number):Void
It sets the size in pixels of the player. This method should be used instead of setting the width and height properties of the MovieClip. Note that this method does not constrain the proportions of the video player, so you will need to maintain a 4:3 aspect ratio. The default size of the chromeless SWF when loaded into another SWF is 320px by 240px and the default size of the embedded player SWF is 480px by 385px.
Or you can change the width and height value inside the . You can try it here.

Related

How and why does frame rate change the aspect ratio of a HTML5 video or canvas?

When I change the frameRate in the code examples below, the aspect ratio of my webcam changes (see code below and attached images) on the Video element. It can change from 800x600 to 1280x720, for example. I've also tried drawing the image onto a Canvas element and same result(s).
const constraints = {
audio: true, video: {frameRate:{max:1}}
};
...versus this one...
const constraints = {
audio: true, video: {frameRate:{max:15}}
};
Why would this happen merely by changing the frame rate? I thought that frame rate has nothing to do with dimensions. Is there a way to anticipate/calculate what the change in aspect ratio will be?
This is dependent on the resolutions and frame rates supported by your camera.
When setting constraints for video capture, you can't really guarantee you're going to get what you ask for. They're essentially suggestions as to what you want. The browser will try to capture at the frame rate and resolution that you asked for. If it can't match it exactly (and if you haven't specified exact), it will do the best it can. In your case, the closest frame rate to what you asked for on your camera must be at a different resolution.
What you need to do is use .videoHeight and .videoWidth properties of the video element you're displaying the video in.
The best way to handle this is listen for the resize event. This is important, as the width/height can actually change at any time! Sometimes, the video may get smaller mid-stream if the system can't keep up with the large video. A more practical example is when you rotate your phone, and the video rotates with it. the resize event will fire.

HTML5 Video controls shrinking on page load

I need to integrate the HTML5 Video player in the page to run an MP4 video. This video is running within a carousel which on load does the slide width calculations, as the video original videos width managed through the CSS for with the width:100%.
The issue is when the page loads and the carousel initialises, the controls of the VIDEO do not expand full width of the video player. Once I click anywhere on the video, other than the play button, the control panel expands the full width, as it should.
BEFORE:
AFTER:

Max resolution for video in Flash

I'm working on a standalone app that displays high-resolution video with other movie clips. I am using Flash FLVPlayback component. Not sure what is the max dimensions of video that can be played in Flash?
I'm trying to display a locally stored MP4 video with the dimensions of 5760 x 1080, which is well under the max canvas area limit, but is not displaying properly. I can see a green rectangle where the video should be displayed.

How can I remove youtube logo from the youtube player for use in other application?

I want to use the Charmless youtube player in my application and I want to remove youtube logo from the Player. How can i achieve this thing? My application is developed using AS3.
Simply add ?modestbranding=1 to the end of your URL.
See more here.
modestbranding (supported players: AS3, HTML5)
This parameter lets you use a YouTube player that does not show a YouTube logo.
Set the parameter value to 1 to prevent the YouTube logo from displaying in the control bar.
Note that a small YouTube text label will still display in the upper-right corner of a paused
video when the user's mouse pointer hovers over the player.
try this API player code.
http://www.youtube.com/apiplayer?version=3&modestbranding=1&showinfo=1
Chromeless player, the modestbranding has no effect unless "showinfo=1" is must for API player.
I tried to remove youtube logo by many ways. But I didn't get success to remove it from the youtube player.
Finally I check the youtube player functionality and behavior. When video is attached to the player then it will be displayed in center. if player container height is bigger then video height so both (top and bottom) side Black strip will be appeared. Just we have to hide the Black Strip from the user display area using masking concept. (In Flash we can apply the mask to container and same thing will be done using the DOM model in Javascript.)
In directly it will be removed as per end user perspective not actually. so Indirect way youtube logo is removed from the player.
you can try GKPlugin this plugin using JWPlayer 5.x at:
https://drive.google.com/folderview?id=0B0OhZLpuvlSRTDZLMXowQWNMZTA#list

YouTube video loaded into Flash MovieClip, can I get width and height?

I'm trying to load a YouTube video on a flash MovieClip using url
http://www.youtube.com/v/4nRNoXT_gUc that returns the video with player directly.
the video is loaded and i can manage it with his player, the problem is when i try to position it no the stage, because I don't know his width until it starts.
I've tested it with Event.ENTER_FRAME but when the video starts it return width = 10000
how can i do to know his width or height?
You can retrieve the movie's nominal width and height through the loader's contentLoaderInfo object. Just try the following :
trace(loader.contentLoaderInfo.width);
The nominal width and height of your movie is 640x480. You will notice, however, that the movie is being scaled down (probably by YouTube, would need to be confirmed).
Also, be aware that what is returned by YouTube is an AVM1Movie object. An AVM1Movie object is an SWF that was compiled under ActionScript 2 (in YouTube's case, most likely Flash version 8). The interaction that is possible with an AVM1Movie object is much more limited than that of a regular AS3-based swf file.