diff --git a/platypush/backend/http/static/css/video.omxplayer.css b/platypush/backend/http/static/css/video.omxplayer.css index 694bc0c322..aba2fd50c9 100644 --- a/platypush/backend/http/static/css/video.omxplayer.css +++ b/platypush/backend/http/static/css/video.omxplayer.css @@ -7,3 +7,7 @@ width: 100%; } +form#video-ctrl { + text-align: center; +} + diff --git a/platypush/backend/http/static/js/video.omxplayer.js b/platypush/backend/http/static/js/video.omxplayer.js index eeb7b67447..493d20127c 100644 --- a/platypush/backend/http/static/js/video.omxplayer.js +++ b/platypush/backend/http/static/js/video.omxplayer.js @@ -1,9 +1,10 @@ $(document).ready(function() { var $container = $('#video-container'), - $form = $('#video-form'); + $searchForm = $('#video-search'), + $ctrlForm = $('#video-ctrl'); var initBindings = function() { - $form.on('submit', function(event) { + $searchForm.on('submit', function(event) { var formData = $(this).serializeArray().reduce(function(obj, item) { var value = item.value.trim(); if (value.length > 0) { @@ -32,6 +33,18 @@ $(document).ready(function() { return false; }); + + $searchForm.find('button[data-action]').on('click', function(evt) { + var action = $(this).data('action'); + var $btn = $(this); + + execute( + { + type: 'request', + action: 'video.omxplayer.' + action, + } + ); + }); }; var init = function() { diff --git a/platypush/backend/http/templates/plugins/video.omxplayer.html b/platypush/backend/http/templates/plugins/video.omxplayer.html index 32dae58243..6e97464db2 100644 --- a/platypush/backend/http/templates/plugins/video.omxplayer.html +++ b/platypush/backend/http/templates/plugins/video.omxplayer.html @@ -2,18 +2,48 @@