what the advantage or disadvantages if i used yout

2019-03-06 12:27发布

In YouTube Player API when I press fullscreen it repeats the video from the beginning ,any help to solve this problem

Also when I lock my phone (sleep mode) it stop playing , I want it to resume.

1条回答
成全新的幸福
2楼-- · 2019-03-06 13:22
  • If you add fullscreen, orientation flags to your AndroidManifest it won't. Basically by default, it recreates the activity, hence restarts.

    <activity
        android:name="MyActivity"
        android:label="@string/app_name"
        android:configChanges="orientation|screenSize" >
    
  • YouTube prohibits running videos in sleep mode, or in background. It's clear in YouTube TOS. Hence there won't be any APIs and doing workarounds will be against the TOS.

查看更多
登录 后发表回答