本文整理汇总了C++中MediaPlayer::setFrameView方法的典型用法代码示例。如果您正苦于以下问题:C++ MediaPlayer::setFrameView方法的具体用法?C++ MediaPlayer::setFrameView怎么用?C++ MediaPlayer::setFrameView使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MediaPlayer
的用法示例。
在下文中一共展示了MediaPlayer::setFrameView方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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);
}
示例2: 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);
}
示例3: 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);
}
示例4: 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);
}
示例5: 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);
}