Exemplo n.º 1
0
 public function get_action_map(MediaURL $media_url, &$plugin_cookies)
 {
     $move_backward_favorite_action = UserInputHandlerRegistry::create_action($this, 'move_backward_favorite');
     $move_backward_favorite_action['caption'] = 'Backward';
     $move_forward_favorite_action = UserInputHandlerRegistry::create_action($this, 'move_forward_favorite');
     $move_forward_favorite_action['caption'] = 'Forward';
     $remove_favorite_action = UserInputHandlerRegistry::create_action($this, 'remove_favorite');
     $remove_favorite_action['caption'] = 'Favorite';
     $menu_items[] = array(GuiMenuItemDef::caption => 'Remove from Favorites', GuiMenuItemDef::action => $remove_favorite_action);
     $popup_menu_action = ActionFactory::show_popup_menu($menu_items);
     return array(GUI_EVENT_KEY_ENTER => ActionFactory::tv_play(), GUI_EVENT_KEY_PLAY => ActionFactory::tv_play(), GUI_EVENT_KEY_B_GREEN => $move_backward_favorite_action, GUI_EVENT_KEY_C_YELLOW => $move_forward_favorite_action, GUI_EVENT_KEY_D_BLUE => $remove_favorite_action, GUI_EVENT_KEY_POPUP_MENU => $popup_menu_action);
 }
 public function get_action_map(MediaURL $media_url, &$plugin_cookies)
 {
     $actions = array();
     $actions[GUI_EVENT_KEY_ENTER] = ActionFactory::tv_play();
     $actions[GUI_EVENT_KEY_PLAY] = ActionFactory::tv_play();
     if ($this->tv->is_favorites_supported()) {
         $add_favorite_action = UserInputHandlerRegistry::create_action($this, 'add_favorite');
         $add_favorite_action['caption'] = 'Favorite';
         $popup_menu_action = UserInputHandlerRegistry::create_action($this, 'popup_menu');
         $actions[GUI_EVENT_KEY_D_BLUE] = $add_favorite_action;
         $actions[GUI_EVENT_KEY_POPUP_MENU] = $popup_menu_action;
     }
     $actions[GUI_EVENT_KEY_INFO] = UserInputHandlerRegistry::create_action($this, 'info');
     return $actions;
 }
Exemplo n.º 3
0
 public function get_action_map(MediaURL $media_url, &$plugin_cookies)
 {
     return array(GUI_EVENT_KEY_ENTER => ActionFactory::open_folder(), GUI_EVENT_KEY_PLAY => ActionFactory::tv_play());
 }