导航菜单

页面标题

页面副标题

Namma Yatri v3.3.7 - YoutubeVideoView.java 源代码

正在查看: Namma Yatri v3.3.7 应用的 YoutubeVideoView.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package in.juspay.mobility.app;

import android.os.Bundle;
import com.pierfrancescosoffritti.androidyoutubeplayer.core.player.views.YouTubePlayerView;

public class YoutubeVideoView extends androidx.appcompat.app.d {
    float duration;
    YouTubePlayerView youTubePlayerView;

    public void onCreate(Bundle bundle) {
        super/*androidx.fragment.app.FragmentActivity*/.onCreate(bundle);
        final Bundle extras = getIntent().getExtras();
        supportRequestWindowFeature(1);
        getWindow().setFlags(1024, 1024);
        if (extras == null || !extras.getString("videoType").equals("VIDEO")) {
            setRequestedOrientation(1);
        } else {
            setRequestedOrientation(0);
        }
        setContentView(R.layout.youtube_video_view);
        this.youTubePlayerView = (YouTubePlayerView) findViewById(R.id.idVideoView);
        getLifecycle().a(this.youTubePlayerView);
        this.youTubePlayerView.e();
        this.youTubePlayerView.d(new Ib.a() {
            @Override
            public void onCurrentSecond(Hb.f fVar, float f) {
                super.onCurrentSecond(fVar, f);
                YoutubeVideoView.this.duration = f;
            }

            @Override
            public void onReady(Hb.f fVar) {
                Bundle bundle2 = extras;
                if (bundle2 != null) {
                    fVar.e(bundle2.getString("videoId"), extras.getFloat("videoDuration"));
                }
            }
        });
    }

    public void onDestroy() {
        YouTubePlayerView youTubePlayerView;
        YouTubePlayerView youTubePlayerView2 = this.youTubePlayerView;
        if (youTubePlayerView2 != null) {
            youTubePlayerView2.release();
        }
        super.onDestroy();
        if (MobilityAppBridge.youtubePlayer == null || (youTubePlayerView = MobilityAppBridge.youTubePlayerView) == null) {
            return;
        }
        youTubePlayerView.f();
        MobilityAppBridge.youtubePlayer.a(this.duration);
        MobilityAppBridge.youtubePlayer.play();
    }
}