Finally I found the solution.
I
made an index.html file and put the required JWPlayer JavaScript inside
it. Then I used an iframe, and put this index file inside it. Here is
the sample iframe code:
<div style="position:relative; padding-bottom:56.25%; overflow:hidden;">
<iframe src="https://example.com/index.html" width="100%" height="100%" frameborder="0" scrolling="no" allowfullscreen style="position:absolute;"></iframe></div>
<iframe src="https://example.com/index.html" width="100%" height="100%" frameborder="0" scrolling="no" allowfullscreen style="position:absolute;"></iframe></div>
Now the video is played back both on PC, and inside the mobile app.