what the advantage or disadvantages if i used youtube-API or present the video in a webview

落爺英雄遲暮 提交于 2019-12-02 18:43:11

问题


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:


  • 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.



来源:https://stackoverflow.com/questions/17075849/what-the-advantage-or-disadvantages-if-i-used-youtube-api-or-present-the-video-i

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!