How can I enlarge video fullscreen without the aff

2019-07-20 03:18发布

I have a problem I do not know how to correct it.

I want to work a full-screen in my project. But the video of the entire screen, and I want to show the entire video of the screen appears when you click the button on the control panel only video of a button.

Do not know the solution to the problem I want to help me. I USE this code in AS3:

stage.displayState = StageDisplayState.FULL_SCREEN;
stage.scaleMode = StageScaleMode.NO_SCALE;

Example:

https://drive.google.com/file/d/0B9BcYjTM8tPoMVVOQTJhUl84b3M/view?usp=sharing

Illustrative image:

screen-capture

3条回答
看我几分像从前
2楼-- · 2019-07-20 03:34

Disable scaling

stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;

Turn off fullScreenTakeOver

flv_playback.fullScreenTakeOver = false;

and enter to the full screen mode

flv_playback.enterFullScreenDisplayState();
查看更多
ゆ 、 Hurt°
3楼-- · 2019-07-20 03:44

Add <param name="allowFullScreen" value="true" /> in your html embed code(2 times).

Also remove this code stage.displayState = StageDisplayState.FULL_SCREEN;

It will work after you click mouse only.

If you want fullscreen on other button use:

fullScreenButton.addEventListener(MouseEvent.MOUSE_DOWN, fullScreenListener);
function fullScreenListener(e:MouseEvent):void {
    if(stage.displayState == StageDisplayState.NORMAL)
        stage.displayState=StageDisplayState.FULL_SCREEN;
    else
        stage.displayState=StageDisplayState.NORMAL;
}

More info here.

To off FLVPlaybackComponent fullScreenTakeOver use

myVideoPlayer.fullScreenTakeOver = false;
查看更多
beautiful°
4楼-- · 2019-07-20 03:45

You can not do what you want using the full-screen button of the FLVPlayback component because it's related to the full-screen mode of the stage. Instead, you can use another button in your stage to activate the full-screen mode of your video player.

Take this example where I used two buttons, 1st button to full-screen the whole animation and the 2nd one to full-screen the video when the animation is on full-screen display mode :

stage.scaleMode = StageScaleMode.NO_SCALE;
stage.addEventListener(FullScreenEvent.FULL_SCREEN, function(e:FullScreenEvent){
    // disable the full-screen mode of the FLVPlayback component everytime the stage leaves the full-screen mode
    if(!e.fullScreen){
        player.fullScreenTakeOver = false;
    }
})

// player is my FLVPlayback component

// activate video smoothing (option)
player.getVideoPlayer(0).smoothing = true;

// disable the full-screen mode of the FLVPlayback component
player.fullScreenTakeOver = false;

// this button is to activate the full-screen mode of the FLVPlayback component
btn_player_fullscreen.addEventListener(MouseEvent.CLICK, function(e:MouseEvent){
    // if our stage is on fullscreen mode
    if(stage.displayState == StageDisplayState.FULL_SCREEN){
        // activate the full-screen mode of the FLVPlayback component
        player.fullScreenTakeOver = true;
    }
})

// this button is to activate the full-screen mode of the stage
btn_fullscreen.addEventListener(MouseEvent.CLICK, function(e:MouseEvent){
    if(stage.displayState != StageDisplayState.FULL_SCREEN){
        stage.displayState = StageDisplayState.FULL_SCREEN;
    }
})

You can see this code working here ( I didn't use a skin for my video player ).

Of course, this is just an example to show you a manner to do what you are looking for, you have to improve and adapt it to your specific needs.

Hope that can help.

查看更多
登录 后发表回答