Is it possible to integrate Exoplayer into a webview application?

I am trying to create an e-commerce application for Android. After doing some research, I realized that the easiest way would be to use WebView, turn on javascript and use webchromeclient for nairitization, and it worked.

I set the URL of my application in webview and, in addition, using javascript, I can also perform the required navigation.

My problem is that in my html5 application there is a tag for the video that plays the video. I need to use Exoplayer to play videos for HLS . I downloaded the exoplayer demo application from github and it works fine. My question is: how can I integrate Exoplayer into my application .

How can I call Exoplayer in my webview application that loads the html5 and javascript application .

In further research, I found that we can call android methods from javascript and vice versa using javascriptinterface, but I cannot figure out how to integrate Exoplayer with my application.

Any suggestions would be really appreciated.

+4
source share

Source: https://habr.com/ru/post/1612358/


All Articles