optimize flex video custom template for mobile devices