当前位置: 首页>>代码示例>>C++>>正文


C++ MediaPlayer::setVisible方法代码示例

本文整理汇总了C++中MediaPlayer::setVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ MediaPlayer::setVisible方法的具体用法?C++ MediaPlayer::setVisible怎么用?C++ MediaPlayer::setVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MediaPlayer的用法示例。


在下文中一共展示了MediaPlayer::setVisible方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: updatePlayer

void RenderVideo::updatePlayer()
{
    if (documentBeingDestroyed())
        return;

    bool intrinsicSizeChanged;
    intrinsicSizeChanged = updateIntrinsicSize();
    ASSERT_UNUSED(intrinsicSizeChanged, !intrinsicSizeChanged || !view().frameView().isInRenderTreeLayout());

    MediaPlayer* mediaPlayer = videoElement().player();
    if (!mediaPlayer)
        return;

    if (!videoElement().inActiveDocument()) {
        mediaPlayer->setVisible(false);
        return;
    }

    contentChanged(VideoChanged);

    IntRect videoBounds = videoBox();
    mediaPlayer->setSize(IntSize(videoBounds.width(), videoBounds.height()));
#if USE(HOLE_PUNCH_GSTREAMER) || USE(HOLE_PUNCH_EXTERNAL)
    IntRect windowRect = document().view()->contentsToScreen(absoluteBoundingBoxRect(true));
    mediaPlayer->setPosition(IntPoint(windowRect.x(), windowRect.y()));
#endif
    mediaPlayer->setVisible(true);
    mediaPlayer->setShouldMaintainAspectRatio(style().objectFit() != ObjectFitFill);
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:29,代码来源:RenderVideo.cpp

示例2: updatePlayer

void RenderVideo::updatePlayer()
{
    if (documentBeingDestroyed())
        return;

    updateIntrinsicSize();

    MediaPlayer* mediaPlayer = videoElement().player();
    if (!mediaPlayer)
        return;

    if (!videoElement().inActiveDocument()) {
        mediaPlayer->setVisible(false);
        return;
    }

#if USE(ACCELERATED_COMPOSITING)
    contentChanged(VideoChanged);
#endif
    
    IntRect videoBounds = videoBox(); 
    mediaPlayer->setFrameView(&view().frameView());
    mediaPlayer->setSize(IntSize(videoBounds.width(), videoBounds.height()));
    mediaPlayer->setVisible(true);
    mediaPlayer->setShouldMaintainAspectRatio(style().objectFit() != ObjectFitFill);
}
开发者ID:,项目名称:,代码行数:26,代码来源:

示例3: updatePlayer

void RenderVideo::updatePlayer()
{
    MediaPlayer* mediaPlayer = player();
    if (!mediaPlayer)
        return;
    if (!mediaElement()->inActiveDocument()) {
        mediaPlayer->setVisible(false);
        return;
    }
    
    IntRect videoBounds = videoBox(); 
    mediaPlayer->setFrameView(document()->view());
    mediaPlayer->setSize(IntSize(videoBounds.width(), videoBounds.height()));
    mediaPlayer->setVisible(true);
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:15,代码来源:RenderVideo.cpp

示例4: paintCurrentFrameInContext

void HTMLVideoElement::paintCurrentFrameInContext(GraphicsContext& context, const FloatRect& destRect)
{
    MediaPlayer* player = HTMLMediaElement::player();
    if (!player)
        return;
    
    player->setVisible(true); // Make player visible or it won't draw.
    player->paintCurrentFrameInContext(context, destRect);
}
开发者ID:sailei1,项目名称:webkit,代码行数:9,代码来源:HTMLVideoElement.cpp

示例5: updatePlayer

void RenderVideo::updatePlayer()
{
    MediaPlayer* mediaPlayer = player();
    if (!mediaPlayer)
        return;
    if (!mediaElement()->inActiveDocument()) {
        mediaPlayer->setVisible(false);
        return;
    }
    
    // FIXME: This doesn't work correctly with transforms.
    FloatPoint absPos = localToAbsolute();
    IntRect videoBounds = videoBox(); 
    videoBounds.move(absPos.x(), absPos.y());
    mediaPlayer->setFrameView(document()->view());
    mediaPlayer->setRect(videoBounds);
    mediaPlayer->setVisible(true);
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:18,代码来源:RenderVideo.cpp

示例6: updatePlayer

void RenderVideo::updatePlayer()
{
    updateIntrinsicSize();

    MediaPlayer* mediaPlayer = mediaElement()->player();
    if (!mediaPlayer)
        return;

    if (!videoElement()->inActiveDocument()) {
        mediaPlayer->setVisible(false);
        return;
    }

#if USE(ACCELERATED_COMPOSITING)
    contentChanged(VideoChanged);
#endif

    IntRect videoBounds = videoBox();
    mediaPlayer->setFrameView(document()->view());
    mediaPlayer->setSize(IntSize(videoBounds.width(), videoBounds.height()));
    mediaPlayer->setVisible(true);
}
开发者ID:kcomkar,项目名称:webkit,代码行数:22,代码来源:RenderVideo.cpp

示例7: updatePlayer

void RenderVideo::updatePlayer()
{
    MediaPlayer* mediaPlayer = player();
    if (!mediaPlayer)
        return;
    Document* doc = document();
    if (doc->inPageCache())
        return;
    int x;
    int y;
    absolutePosition(x, y);
    IntRect videoBounds = videoBox(); 
    videoBounds.move(x, y);
    mediaPlayer->setFrameView(doc->view());
    mediaPlayer->setRect(videoBounds);
    mediaPlayer->setVisible(true);
}
开发者ID:Gin-Rye,项目名称:duibrowser,代码行数:17,代码来源:RenderVideo.cpp


注:本文中的MediaPlayer::setVisible方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。