當前位置: 首頁>>代碼示例>>Java>>正文


Java YouTubePlayer.FULLSCREEN_FLAG_CONTROL_SYSTEM_UI屬性代碼示例

本文整理匯總了Java中com.google.android.youtube.player.YouTubePlayer.FULLSCREEN_FLAG_CONTROL_SYSTEM_UI屬性的典型用法代碼示例。如果您正苦於以下問題:Java YouTubePlayer.FULLSCREEN_FLAG_CONTROL_SYSTEM_UI屬性的具體用法?Java YouTubePlayer.FULLSCREEN_FLAG_CONTROL_SYSTEM_UI怎麽用?Java YouTubePlayer.FULLSCREEN_FLAG_CONTROL_SYSTEM_UI使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在com.google.android.youtube.player.YouTubePlayer的用法示例。


在下文中一共展示了YouTubePlayer.FULLSCREEN_FLAG_CONTROL_SYSTEM_UI屬性的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onInitializationSuccess

@Override
public void onInitializationSuccess(YouTubePlayer.Provider provider,
        YouTubePlayer youTubePlayer, boolean wasRestored) {

    // Set up YouTube player
    mYouTubePlayer = youTubePlayer;
    mYouTubePlayer.setPlayerStateChangeListener(this);
    mYouTubePlayer.setFullscreen(mIsFullscreen);
    mYouTubePlayer.setOnFullscreenListener(this);

    // YouTube player flags: use a custom full screen layout; let the YouTube player control
    // the system UI (hiding navigation controls, ActionBar etc); and let the YouTube player
    // handle the orientation state of the activity.
    mYouTubeFullscreenFlags = YouTubePlayer.FULLSCREEN_FLAG_CUSTOM_LAYOUT |
            YouTubePlayer.FULLSCREEN_FLAG_CONTROL_SYSTEM_UI |
            YouTubePlayer.FULLSCREEN_FLAG_CONTROL_ORIENTATION;

    // On smaller screen devices always switch to full screen in landscape mode
    if (!mIsTablet) {
        mYouTubeFullscreenFlags |= YouTubePlayer.FULLSCREEN_FLAG_ALWAYS_FULLSCREEN_IN_LANDSCAPE;
    }

    // Apply full screen flags
    mYouTubePlayer.setFullscreenControlFlags(mYouTubeFullscreenFlags);

    // Load the requested video
    if (!TextUtils.isEmpty(mYouTubeVideoId)) {
        mYouTubePlayer.loadVideo(mYouTubeVideoId);
    }
}
 
開發者ID:The-WebOps-Club,項目名稱:saarang-iosched,代碼行數:30,代碼來源:SessionLivestreamActivity.java

示例2: onInitializationSuccess

@Override
public void onInitializationSuccess(YouTubePlayer.Provider provider,
        YouTubePlayer youTubePlayer, boolean wasRestored) {

    // Set up YouTube player
    mYouTubePlayer = youTubePlayer;
    mYouTubePlayer.setPlayerStateChangeListener(this);
    mYouTubePlayer.setFullscreen(mIsFullscreen);
    mYouTubePlayer.setOnFullscreenListener(this);

    // YouTube player flags: use a custom full screen layout; let the YouTube player control
    // the system UI (hiding navigation controls, ActionBar etc); and let the YouTube player
    // handle the orientation state of the activity.
    mYouTubeFullscreenFlags = YouTubePlayer.FULLSCREEN_FLAG_CUSTOM_LAYOUT |
            YouTubePlayer.FULLSCREEN_FLAG_CONTROL_SYSTEM_UI |
            YouTubePlayer.FULLSCREEN_FLAG_CONTROL_ORIENTATION;

    // On smaller screen devices always switch to full screen in landscape mode
    if (!mIsTablet) {
        mYouTubeFullscreenFlags |= YouTubePlayer.FULLSCREEN_FLAG_ALWAYS_FULLSCREEN_IN_LANDSCAPE;
    }

    // Apply full screen flags
    setFullscreenFlags();

    // If a presentation display is available, set YouTube player style to minimal
    if (mPresentation != null) {
        mYouTubePlayer.setPlayerStyle(YouTubePlayer.PlayerStyle.MINIMAL);
    }

    // Load the requested video
    if (!TextUtils.isEmpty(mYouTubeVideoId)) {
        mYouTubePlayer.loadVideo(mYouTubeVideoId);
    }

    updatePresentation();
}
 
開發者ID:TheDeltaProgram,項目名稱:iosched2013,代碼行數:37,代碼來源:SessionLivestreamActivity.java


注:本文中的com.google.android.youtube.player.YouTubePlayer.FULLSCREEN_FLAG_CONTROL_SYSTEM_UI屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。