play youtube video in WebView

后端 未结 7 2169
抹茶落季
抹茶落季 2020-11-27 15:44

In my android app I have a WebView to display html data from our website. Sometimes the page will have youtube embed objects. This doesn\'t show up properly in the app. Is t

7条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-27 16:13

    You cannot show them embedded except perhaps on devices that have Flash.

    However, if you can parse out the YouTube video details, you may be able to construct an ACTION_VIEW Intent that will show them on the YouTube application...for those Android devices that have the YouTube application.

    You might also experiment with HTML5's tag, which AFAIK is supported in the Browser application and may therefore work in WebView.

提交回复
热议问题