gpt4 book ai didi

fr.bmartel.youtubetv.YoutubeTvView类的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 18:30:31 25 4
gpt4 key购买 nike

本文整理了Java中fr.bmartel.youtubetv.YoutubeTvView类的一些代码示例,展示了YoutubeTvView类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoutubeTvView类的具体详情如下:
包路径:fr.bmartel.youtubetv.YoutubeTvView
类名称:YoutubeTvView

YoutubeTvView介绍

[英]Youtube TV custom view.
[中]Youtube电视自定义视图。

代码示例

代码示例来源:origin: bertrandmartel/youtubetv

public void closePlayer() {
    youtubeTvView.closePlayer();
  }
}

代码示例来源:origin: bertrandmartel/youtubetv

@Override
  public void onClick(View view) {
    mYoutubeView1.start();
  }
});

代码示例来源:origin: bertrandmartel/youtubetv

/**
 * Initialize Webview.
 */
private void initView() {
  inflate(getContext(), R.layout.youtube_view, this);
  init();
}

代码示例来源:origin: bertrandmartel/youtubetv

if (mYoutubeTvView.isShowingNowPlayingCard()) {
      break;
    case ENDED:
      if (mYoutubeTvView.getPlaylistIndex() != -1) {
        mYoutubeTvView.start();
  updateMediaSession(videoId, rebuildMedia, playbackState, position, speed, title, mYoutubeTvView.getMediaSession());

代码示例来源:origin: bertrandmartel/youtubetv

setBorder();
mWebView = (WebView) findViewById(R.id.youtube_view);
ImageView playIcon = (ImageView) findViewById(R.id.play_icon);
ProgressBar loadingProgress = (ProgressBar) findViewById(R.id.progress_bar);
Handler handler = new Handler();
int width = getMeasuredWidth();
int height = getMeasuredHeight();
    mMediaSession.release();
  mMediaSession = new MediaSession(getContext(), MEDIA_SESSION_TAG);
  mMediaSession.setCallback(new MediaSession.Callback() {
    @Override

代码示例来源:origin: bertrandmartel/youtubetv

/**
 * This must be override to get actual width & height of the webview and pass it to Javascript to resize player & viewport.
 *
 * @param hasFocus
 */
@Override
public void onWindowFocusChanged(boolean hasFocus) {
  super.onWindowFocusChanged(hasFocus);
  int viewWidth = getWidth();
  int viewHeight = getHeight();
  if (mJavascriptInterface != null && mJavascriptInterface.isPageLoaded()) {
    WebviewUtils.callJavaScript(mWebView, "setSize", viewWidth, viewHeight);
  } else {
    mJavascriptInterface.setSizeOnLoad(viewWidth, viewHeight);
  }
}

代码示例来源:origin: bertrandmartel/youtubetv

private void setBorder() {
  if (mShowBorder) {
    FrameLayout layout = (FrameLayout) findViewById(R.id.youtube_frame);
    layout.setPadding(mBorderWidth, mBorderWidth, mBorderWidth, mBorderWidth);
    layout.setBackground(getResources().getDrawable(R.drawable.webview_selector));
    StateListDrawable drawable = (StateListDrawable) layout.getBackground();
    DrawableContainer.DrawableContainerState drawableContainerState = (DrawableContainer.DrawableContainerState) drawable.getConstantState();
    Drawable[] children = drawableContainerState.getChildren();
    GradientDrawable focusedItem = (GradientDrawable) children[0];
    focusedItem.setStroke(mBorderWidth, mBorderColor);
  }
}

代码示例来源:origin: bertrandmartel/youtubetv

@Override
public boolean isPlaying() {
  return getPlayerState() == VideoState.PLAYING ? true : false;
}

代码示例来源:origin: bertrandmartel/youtubetv

mYoutubeView1.addPlayerListener(new IPlayerListener() {
  @Override
  public void onPlayerReady(final VideoInfo videoInfo) {

代码示例来源:origin: bertrandmartel/youtubetv

@Override
public void onBackPressed() {
  super.onBackPressed();
  mYoutubeView1.closePlayer();
  mYoutubeView2.closePlayer();
  finish();
}

代码示例来源:origin: bertrandmartel/youtubetv

@Override
public void onBackPressed() {
  super.onBackPressed();
  mYoutubeView1.closePlayer();
  finish();
}

代码示例来源:origin: bertrandmartel/youtubetv

@Override
public void onBackPressed() {
  super.onBackPressed();
  mYoutubeView.closePlayer();
  finish();
}

代码示例来源:origin: bertrandmartel/youtubetv

@Override
public void onBackPressed() {
  super.onBackPressed();
  mYoutubeView.closePlayer();
  finish();
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com