Search code examples
sencha-touch-2html5-videojplayer

Integrating HTML 5 video players(jplayer) in sencha touch app


Is it good practice to use html5 video players like jplayer in my sencha touch app?

If so, where can we instantiate the player? Also, where do we write the html code for player? This demo has both the javascript and html part.


Solution

  • References to the third party scripts can be made in app.json file if we used sencha command to deploy. However mine was not that case so adding them in index.html worked fine.

    Instantiation of the player can be done anywhere. But to make sure the instantiation was done after the DOM part of the html code was executed, go to the view in which html was written and write the javascript part in a painted function.