From: aman.jeph Date: Fri, 6 Nov 2020 10:48:13 +0000 (+0530) Subject: Implemented mini-controller according to our new ui guideline and fix Enable audio... X-Git-Tag: submit/tizen/20201106.125956^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F89%2F247189%2F3;p=profile%2Fiot%2Fapps%2Fnative%2Fvideo-player.git Implemented mini-controller according to our new ui guideline and fix Enable audio only options Change-Id: Idd3669c5c3107cb02f027cd655fda7e3d0f49932 Signed-off-by: aman.jeph --- diff --git a/playview/src/view/include/vp-play-normal-view.h b/playview/src/view/include/vp-play-normal-view.h index 598342f..72c4250 100755 --- a/playview/src/view/include/vp-play-normal-view.h +++ b/playview/src/view/include/vp-play-normal-view.h @@ -148,3 +148,5 @@ bool vp_play_normal_view_reset_audio_only(normal_view_handle * pNormalView); bool vp_play_normal_view_handle_language_change(normal_view_handle *pViewHandle); +void vp_play_normal_view_on_controller_slider_events(void *data, int event, void *event_data); + diff --git a/playview/src/view/include/vp-play-view-priv.h b/playview/src/view/include/vp-play-view-priv.h index ab53ca0..756159c 100755 --- a/playview/src/view/include/vp-play-view-priv.h +++ b/playview/src/view/include/vp-play-view-priv.h @@ -159,6 +159,7 @@ typedef struct _PlayView { Evas_Object *minicontroller_layout; Evas_Object *minicon_icon; Ecore_Timer *minicon_button_timer; + void *minicon_slider_handler; bool b_minicontroller_show; bool minicon_visible; diff --git a/playview/src/view/vp-play-normal-view.c b/playview/src/view/vp-play-normal-view.c index b29f8bb..e2b5d9f 100755 --- a/playview/src/view/vp-play-normal-view.c +++ b/playview/src/view/vp-play-normal-view.c @@ -548,6 +548,12 @@ static void _vp_play_normal_view_set_button_focus_sequence(NormalView * static void _vp_normal_view_speed_for_steps(NormalView * pNormalView, bool bSpeedFF); +static void __vp_normal_progrees_update_on_mouse_up(NormalView *pNormalView, double dRatio); +static void __vp_normal_progress_update_on_mouse_down(NormalView *pNormalView, double dRatio); +static void __vp_normal_progress_update_on_mouse_move(NormalView *pNormalView, double dRatio); + + + static NormalView *curr_Handle = NULL; #ifdef SUBTITLE_K_FEATURE @@ -3289,6 +3295,64 @@ static void __vp_normal_progress_microseek_imagelayout_del_cb(void #endif +static void __vp_normal_progress_update_on_mouse_down(NormalView *pNormalView, double dRatio) +{ + if(pNormalView == NULL) { + VideoLogError("Normalview object is null"); + return; + } + PlayView *pPlayView = pNormalView->pPlayView; + elm_object_signal_emit(pNormalView->pProgressEvent, VP_NORMAL_SIGNAL_PROGRESS_PRESS, "*"); + VP_EVAS_TIMER_DEL(pNormalView->pProgressTimer); + pNormalView->pProgressTimer = NULL; + + int nCurPos = dRatio * pNormalView->nDuration; + vp_play_progressbar_set_position(pNormalView->pProgressbar, nCurPos); + + pNormalView->bProgressDown = TRUE; + + if (vp_play_util_check_streaming(pNormalView->szMediaURL)) { + if (pNormalView->bManualPause == FALSE) { + vp_mm_player_state_t nState = VP_MM_PLAYER_STATE_NONE; + if (!vp_mm_player_get_state + (pNormalView->pPlayerHandle, &nState)) { + VideoLogWarning("vp_mm_player_get_state is fail"); + } + if (nState == VP_MM_PLAYER_STATE_PLAYING) { + vp_mm_player_pause(pNormalView->pPlayerHandle); + if (pPlayView->win_minicon) { + vp_minicontroller_update_control(pPlayView); + } + if (pPlayView->win_lockmini) { + vp_lockscreenmini_update_control(pPlayView); + } + _vp_play_normal_view_set_play_state(pNormalView); + _vp_play_normal_view_on_capture_mode(pNormalView); + } + } + + return; + } else { + if (pNormalView->bManualPause == FALSE) { + vp_mm_player_state_t nState = VP_MM_PLAYER_STATE_NONE; + if (!vp_mm_player_get_state + (pNormalView->pPlayerHandle, &nState)) { + VideoLogWarning("vp_mm_player_get_state is fail"); + } + VideoLogInfo("nState:%d", nState); + if (nState == VP_MM_PLAYER_STATE_PLAYING) { + vp_mm_player_pause(pNormalView->pPlayerHandle); + if (pPlayView && pPlayView->win_minicon) { + vp_minicontroller_update_control(pPlayView); + } + if (pPlayView && pPlayView->win_lockmini) { + vp_lockscreenmini_update_control(pPlayView); + } + } + } + } +} + /** * * @param pUserData @@ -3322,21 +3386,9 @@ static void __vp_normal_progress_mouse_down_cb(void *pUserData, Evas * e, return; } - Evas_Event_Mouse_Down *pMouseDownEvent = - (Evas_Event_Mouse_Down *) pEvent; - - double dRatio = - _vp_play_normal_view_get_mouse_pos_ratio(pNormalView-> - pProgressEvent, - pMouseDownEvent->canvas. - x); - elm_object_signal_emit(pNormalView->pProgressEvent, - VP_NORMAL_SIGNAL_PROGRESS_PRESS, "*"); - - VP_EVAS_TIMER_DEL(pNormalView->pProgressTimer); - pNormalView->pProgressTimer = NULL; + Evas_Event_Mouse_Down *pMouseDownEvent = (Evas_Event_Mouse_Down *) pEvent; - int nCurPos = dRatio * pNormalView->nDuration; + double dRatio = _vp_play_normal_view_get_mouse_pos_ratio(pNormalView->pProgressEvent, pMouseDownEvent->canvas.x); #ifdef K_FEATURE_MICROSEEK pNormalView->nPrevCanvasX = (double) pMouseDownEvent->canvas.x; @@ -3378,104 +3430,15 @@ static void __vp_normal_progress_mouse_down_cb(void *pUserData, Evas * e, evas_object_hide(pNormalView->pMicroSeekImageLayout); #endif - - vp_play_progressbar_set_position(pNormalView->pProgressbar, nCurPos); - - pNormalView->bProgressDown = TRUE; - - if (vp_play_util_check_streaming(pNormalView->szMediaURL)) { - if (pNormalView->bManualPause == FALSE) { - vp_mm_player_state_t nState = VP_MM_PLAYER_STATE_NONE; - if (!vp_mm_player_get_state - (pNormalView->pPlayerHandle, &nState)) { - VideoLogWarning("vp_mm_player_get_state is fail"); - } - if (nState == VP_MM_PLAYER_STATE_PLAYING) { - vp_mm_player_pause(pNormalView->pPlayerHandle); - if (pPlayView->win_minicon) { - vp_minicontroller_update_control(pPlayView); - } - if (pPlayView->win_lockmini) { - vp_lockscreenmini_update_control(pPlayView); - } - _vp_play_normal_view_set_play_state(pNormalView); - _vp_play_normal_view_on_capture_mode(pNormalView); - } - } - - return; - } else { - if (pNormalView->bManualPause == FALSE) { - vp_mm_player_state_t nState = VP_MM_PLAYER_STATE_NONE; - if (!vp_mm_player_get_state - (pNormalView->pPlayerHandle, &nState)) { - VideoLogWarning("vp_mm_player_get_state is fail"); - } - VideoLogInfo("nState:%d", nState); - if (nState == VP_MM_PLAYER_STATE_PLAYING) { - vp_mm_player_pause(pNormalView->pPlayerHandle); - if (pPlayView && pPlayView->win_minicon) { - vp_minicontroller_update_control(pPlayView); - } - if (pPlayView && pPlayView->win_lockmini) { - vp_lockscreenmini_update_control(pPlayView); - } - } - } - } + __vp_normal_progress_update_on_mouse_down(pNormalView, dRatio); } -/** - * - * @param pUserData - * @param e - * @param pObj - * @param pEvent - */ -static void __vp_normal_progress_mouse_up_cb(void *pUserData, Evas * e, - Evas_Object * pObj, - void *pEvent) -{ - if (!pUserData) { - VideoLogError("pUserData is NULL"); - return; - } - NormalView *pNormalView = (NormalView *) pUserData; -#ifdef K_FEATURE_MICROSEEK -#else - Evas_Event_Mouse_Up *pMouseUpEvent = (Evas_Event_Mouse_Up *) pEvent; -#endif - - VideoLogWarning("Mouse Up"); - if (pNormalView->bIsRealize == FALSE - || pNormalView->bProgressDown == FALSE) { - VideoLogWarning("Skip for not realized or prgress down"); - return; - } - if (pNormalView->bHLSMode) { - VideoLogWarning("Skip for HLS"); - return; - } - - PlayView *pPlayView = pNormalView->pPlayView; - if (!pPlayView) { - VideoLogError("pPlayView is NULL"); - return; +static void __vp_normal_progrees_update_on_mouse_up(NormalView *pNormalView, double dRatio) { + if(pNormalView == NULL) { + VideoLogError("NormalView data is null"); + return; } -#ifdef K_FEATURE_MICROSEEK - double dRatio = - _vp_play_normal_view_get_mouse_pos_ratio(pNormalView-> - pProgressEvent, - pNormalView-> - nPrevPositionX); -#else - double dRatio = - _vp_play_normal_view_get_mouse_pos_ratio(pNormalView-> - pProgressEvent, - pMouseUpEvent->canvas.x); -#endif - elm_object_signal_emit(pNormalView->pProgressEvent, - VP_NORMAL_SIGNAL_PROGRESS_UNPRESS, "*"); + elm_object_signal_emit(pNormalView->pProgressEvent, VP_NORMAL_SIGNAL_PROGRESS_UNPRESS, "*"); if (fabs(dRatio - 1.0) < 1.0e-6) { VideoLogWarning("It is the end of the video!"); __vp_normal_completed_cb(pNormalView); @@ -3538,7 +3501,58 @@ static void __vp_normal_progress_mouse_up_cb(void *pUserData, Evas * e, _vp_play_normal_view_update_progress_value(pNormalView); } } +} + +/** + * + * @param pUserData + * @param e + * @param pObj + * @param pEvent + */ +static void __vp_normal_progress_mouse_up_cb(void *pUserData, Evas * e, + Evas_Object * pObj, + void *pEvent) +{ + if (!pUserData) { + VideoLogError("pUserData is NULL"); + return; + } + NormalView *pNormalView = (NormalView *) pUserData; +#ifdef K_FEATURE_MICROSEEK +#else + Evas_Event_Mouse_Up *pMouseUpEvent = (Evas_Event_Mouse_Up *) pEvent; +#endif + VideoLogWarning("Mouse Up"); + if (pNormalView->bIsRealize == FALSE + || pNormalView->bProgressDown == FALSE) { + VideoLogWarning("Skip for not realized or prgress down"); + return; + } + if (pNormalView->bHLSMode) { + VideoLogWarning("Skip for HLS"); + return; + } + + PlayView *pPlayView = pNormalView->pPlayView; + if (!pPlayView) { + VideoLogError("pPlayView is NULL"); + return; + } +#ifdef K_FEATURE_MICROSEEK + double dRatio = + _vp_play_normal_view_get_mouse_pos_ratio(pNormalView-> + pProgressEvent, + pNormalView-> + nPrevPositionX); +#else + double dRatio = + _vp_play_normal_view_get_mouse_pos_ratio(pNormalView-> + pProgressEvent, + pMouseUpEvent->canvas.x); +#endif + __vp_normal_progrees_update_on_mouse_up(pNormalView, dRatio); } /** @@ -3560,6 +3574,34 @@ static void __vp_normal_progress_del_cb(void *pUserData, Evas * e, pNormalView->pProgressEvent = NULL; } +static void __vp_normal_progress_update_on_mouse_move(NormalView *pNormalView, double dRatio) +{ + if(pNormalView == NULL) + { + VideoLogError("NormalView object is null"); + return; + } + + int nCurPos = dRatio * pNormalView->nDuration; + + vp_play_progressbar_set_position(pNormalView->pProgressbar, nCurPos); + + if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_WEB || + pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_MULTI_PATH) { + return; + } + + if (pNormalView->bSeekComplete == FALSE) { + pNormalView->nWaitPos = nCurPos; + } else { + VideoLogWarning("== I FRMAE SEEK == [%d]", nCurPos); + if (vp_mm_player_set_position_by_key_frame(pNormalView->pPlayerHandle, nCurPos)) { + pNormalView->nWaitPos = -1; + pNormalView->bSeekComplete = FALSE; + } + } +} + /** * * @param pUserData @@ -3597,8 +3639,7 @@ static void __vp_normal_progress_mouse_move_cb(void *pUserData, Evas * e, return; } - if (pNormalView->bProgressDown == FALSE - || pNormalView->bIsRealize == FALSE) { + if (pNormalView->bProgressDown == FALSE || pNormalView->bIsRealize == FALSE) { VideoLogWarning("Skip for not realized or prgress down"); return; } @@ -3786,25 +3827,8 @@ static void __vp_normal_progress_mouse_move_cb(void *pUserData, Evas * e, pMouseMoveEvent->cur. canvas.x); #endif - int nCurPos = dRatio * pNormalView->nDuration; - - vp_play_progressbar_set_position(pNormalView->pProgressbar, nCurPos); - - if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_WEB || - pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_MULTI_PATH) { - return; - } - if (pNormalView->bSeekComplete == FALSE) { - pNormalView->nWaitPos = nCurPos; - } else { - VideoLogWarning("== I FRMAE SEEK == [%d]", nCurPos); - if (vp_mm_player_set_position_by_key_frame - (pNormalView->pPlayerHandle, nCurPos)) { - pNormalView->nWaitPos = -1; - pNormalView->bSeekComplete = FALSE; - } - } + __vp_normal_progress_update_on_mouse_move(pNormalView, dRatio); } /** @@ -6300,8 +6324,7 @@ static void __vp_normal_control_btn_clicked_cb(void *pUserData, vp_util_release_cpu(); if (pNormalView->bBufferingComplete == FALSE) { - VideoLogWarning - ("Bufferring is not completed. ignore pause signal"); + VideoLogWarning("Bufferring is not completed. ignore pause signal"); } else { if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) { VideoLogWarning("Pause Fail"); @@ -6471,6 +6494,27 @@ static void __vp_normal_control_btn_clicked_cb(void *pUserData, } } +void vp_play_normal_view_on_controller_slider_events(void *data, int event, void *event_data) { + if (!data) { + VideoLogError("pUserData is NULL"); + return; + } + NormalView *pNormalView = (NormalView *) data; + if(event == CONTROLLER_SLIDER_MOUSE_UP) { + double *ratio = (double*)event_data; + __vp_normal_progrees_update_on_mouse_up(pNormalView, (*ratio)); + } else if(event == CONTROLLER_SLIDER_MOUSE_DOWN) { + double *ratio = (double*)event_data; + __vp_normal_progress_update_on_mouse_down(pNormalView, (*ratio)); + } else if(event == CONTROLLER_SLIDER_MOUSE_MOVE) { + double *ratio = (double*)event_data; + __vp_normal_progress_update_on_mouse_move(pNormalView, (*ratio)); + } + else { + VideoLogError("Unknown slider event for controller!"); + } +} + /** * * @param pUserData @@ -11449,7 +11493,11 @@ static void _vp_play_normal_view_hide_layout(NormalView * pNormalView, VP_EVAS_DEL(pNormalView->pScreenShot); pNormalView->pScreenShot = NULL; - VP_EVAS_TIMER_DEL(pNormalView->pProgressTimer); + // this timer also update the mini controller slider. + // in case mauin control hide, don't delete the timer if mini-controller is created. + if(pPlayView->minicon_slider_handler == NULL) { + VP_EVAS_TIMER_DEL(pNormalView->pProgressTimer); + } if (bNoEffect) { elm_object_item_signal_emit(pNormalView->pNaviItem, @@ -12711,7 +12759,7 @@ static bool _vp_play_normal_view_create_progressbar(NormalView * pParent = pNormalView->pControlLayout; pNormalView->pProgressbar = - vp_play_progressbar_create(pParent, VIDEO_PROGRESSBAR_TYPE_NORMAL); + vp_play_progressbar_create(pParent, VIDEO_PROGRESSBAR_TYPE_NORMAL, (void*)pNormalView->pPlayView); if (!pNormalView->pProgressbar) { VideoLogError("pProgressbar create fail"); return FALSE; diff --git a/playview/src/widget/include/vp-play-minicontroller.h b/playview/src/widget/include/vp-play-minicontroller.h index c10c006..580cc2c 100755 --- a/playview/src/widget/include/vp-play-minicontroller.h +++ b/playview/src/widget/include/vp-play-minicontroller.h @@ -26,6 +26,13 @@ enum vp_controller_button_type { CONTROLLER_REW_BUTTON }; +enum vp_controller_slider_event_type { + CONTROLLER_SLIDER_MOUSE_DOWN = 0, + CONTROLLER_SLIDER_MOUSE_UP, + CONTROLLER_SLIDER_MOUSE_MOVE +}; + + int vp_minicontroller_create(PlayView * pPlayView); int vp_minicontroller_show(PlayView * pPlayView); int vp_minicontroller_destroy(PlayView * pPlayView); @@ -33,4 +40,5 @@ void vp_minicontroller_update_control(PlayView * pPlayView); void vp_minicontroller_update(PlayView * pPlayView, bool with_title); void vp_minicontroller_rotate(PlayView * pPlayView, int angle); int _vp_is_current_focus_available(); +void vp_minicontroller_slider_update(PlayView *pPlayView, int curr_duration, int total_duration); #endif /* VP_PLAY_MINICONTROLLER_H_ */ diff --git a/playview/src/widget/include/vp-play-progressbar.h b/playview/src/widget/include/vp-play-progressbar.h index 48fef9d..7c1fa0d 100755 --- a/playview/src/widget/include/vp-play-progressbar.h +++ b/playview/src/widget/include/vp-play-progressbar.h @@ -28,7 +28,7 @@ typedef enum { progressbar_handle vp_play_progressbar_create(Evas_Object * pParent, video_progressbar_type_t - nType); + nType, void *data); void vp_play_progressbar_destroy(progressbar_handle pWidgetHandle); bool vp_play_progressbar_realize(progressbar_handle pWidgetHandle); bool vp_play_progressbar_unrealize(progressbar_handle pWidgetHandle); diff --git a/playview/src/widget/vp-play-minicontroller.c b/playview/src/widget/vp-play-minicontroller.c index 753829e..75c794a 100755 --- a/playview/src/widget/vp-play-minicontroller.c +++ b/playview/src/widget/vp-play-minicontroller.c @@ -34,18 +34,28 @@ /* check temp */ #include "vp-play-log.h" -#define MINI_CONTROLLER_HEIGHT (93) +typedef struct _mini_controller_slider_data { + Ecore_Timer *duration_timer; + Evas_Object *slider; + Eina_Bool is_mouse_down; +} mini_controller_slider_data; + +#define MINI_CONTROLLER_HEIGHT ELM_SCALE_SIZE(112) +#define MINI_CONTROLLER_WIDTH ELM_SCALE_SIZE(1200) #define WL_INDI_H 27 //Window Layout Indicator Height #define PAUSE_TIME_OUT 120. +#define VP_MINICONTROLLER_SLIDER_TIMER_INTERVAL 0.3 +#define PROGRESSBAR_TIME_LENGTH 9 +#define PROGRESSBAR_TIME_FORMAT "02u:%02u:%02u" +#define PROGRESSBAR_TIME_ARGS(t) \ + (t) / (60 * 60), \ + ((t) / 60) % 60, \ + (t) % 60 + static time_t press_time; static time_t release_time; -int MINI_CONTROLLER_WIDTH; -int MINI_CONTROLLER_WIDTH_LANDSCAPE; -static void _minicontroller_action_cb(void *data, Evas_Object * obj, - const char *emission, - const char *source); static Evas_Object *_load_edj(Evas_Object * parent, const char *file, const char *group); static void _load_minicontroller(PlayView * pPlayView); @@ -93,8 +103,7 @@ _vp_minicontroller_action_show_player_view(PlayView * pPlayView) VideoLogError("pPlayView is NULL"); } else { VideoLogDebug("Showing controller."); - minicontrol_send_event(pPlayView->win_minicon, - MINICONTROL_EVENT_REQUEST_HIDE, NULL); + minicontrol_send_event(pPlayView->win_minicon, MINICONTROL_EVENT_REQUEST_HIDE, NULL); } vp_play_util_app_resume(); @@ -108,26 +117,30 @@ _vp_minicontroller_action_show_player_view(PlayView * pPlayView) * @param source */ static void -_minicontroller_action_cb(void *data, Evas_Object * obj, +_minicontroller_close_button_clicked_cb(void *data, Evas_Object * obj, const char *emission, const char *source) { PlayView *pPlayView = (PlayView *) data; if (!pPlayView) { VideoLogError("pPlayView is NULL"); } - if (emission) { - if (!g_strcmp0(emission, "close_btn_clicked")) { - VideoLogDebug("close button clicked!!"); - elm_exit(); - } else if (!g_strcmp0(emission, "albumart_clicked")) { - VideoLogDebug("albumart clicked!!"); - _vp_minicontroller_action_show_player_view(pPlayView); - return; - } - } + VideoLogDebug("close button clicked!!"); + elm_exit(); +} +static void +_minicontroller_album_art_clicked_cb(void *data, Evas_Object * obj, + const char *emission, const char *source) +{ + PlayView *pPlayView = (PlayView *) data; + if (!pPlayView) { + VideoLogError("pPlayView is NULL"); + } + VideoLogDebug("albumart clicked!!"); + _vp_minicontroller_action_show_player_view(pPlayView); } + /** * * @param parent @@ -176,23 +189,29 @@ static void _quick_panel_cb(minicontrol_viewer_event_e event_type, bundle * event_arg) { VideoLogDebug("Handling events for Minicontroller!!"); - if (event_type == - (minicontrol_viewer_event_e) MINICONTROL_EVENT_REQUEST_HIDE) { - VideoLogDebug("Request to close Video Player"); - } - if (event_type == - (minicontrol_viewer_event_e) MINICONTROL_VIEWER_EVENT_REPORT_ANGLE) { - char *value = NULL; - int angle = 0; - bundle_get_str(event_arg, "angle", &value); - if (value && strlen(value) > 0) { - angle = atoi(value); - VideoLogDebug("Angle is : %d", angle); + if (event_type == MINICONTROL_VIEWER_EVENT_HIDE) { + VideoLogDebug("Mini Controller is hidden"); + } + if (event_type == MINICONTROL_VIEWER_EVENT_REPORT_ANGLE) { + if(event_arg) { + char *value = NULL; + int angle = 0; + bundle_get_str(event_arg, "angle", &value); + if (value && strlen(value) > 0) { + angle = atoi(value); + VideoLogDebug("Angle is : %d", angle); + vp_minicontroller_rotate(app_data, angle); + } + } else { + // Video-Player need to be closed when user removes the mini-controller notification from quickpanel and + // we have to use the MINICONTROL_VIEWER_EVENT_REPORT_ANGLE event to close because hide event [MINICONTROL_VIEWER_EVENT_HIDE] is also being + // emitted when quickpanel is closed on swipe up/down. So to differentiate between quickpanel close and notification remove + // scenario we are using the MINICONTROL_VIEWER_EVENT_REPORT_ANGLE with null event_arg so that we can close video-player on correct scenario. + VideoLogDebug("Closing video player"); + elm_exit(); } - vp_minicontroller_rotate(app_data, angle); - } else if (event_type == MINICONTROL_EVENT_REQUEST_HIDE) { - VideoLogDebug("Closing."); - elm_exit(); + } else if (event_type == MINICONTROL_VIEWER_EVENT_SHOW) { + VideoLogDebug("Mini Controller is shown."); } } @@ -242,38 +261,7 @@ void vp_minicontroller_update_winmini_size(PlayView * pPlayView) VideoLogError("pPlayView is NULL"); return; } - int angle = elm_win_rotation_get((Evas_Object *) pPlayView->pWin); - - VideoLogError("angle======================%d", angle); - int w = 0; - if ((elm_config_scale_get() - 1.7) < 0.0001) { - MINI_CONTROLLER_WIDTH = 318; - MINI_CONTROLLER_WIDTH_LANDSCAPE = 564; - } else if ((elm_config_scale_get() - 1.8) < 0.0001) { - MINI_CONTROLLER_WIDTH = 267; - MINI_CONTROLLER_WIDTH_LANDSCAPE = 444; - } else if ((elm_config_scale_get() - 2.4) < 0.0001) { - MINI_CONTROLLER_WIDTH = 300; - MINI_CONTROLLER_WIDTH_LANDSCAPE = 533; - } else if ((elm_config_scale_get() - 2.6) < 0.0001) { - MINI_CONTROLLER_WIDTH = 277; - MINI_CONTROLLER_WIDTH_LANDSCAPE = 492; - } else if ((elm_config_scale_get() - 2.8) < 0.0001) { - MINI_CONTROLLER_WIDTH = 257; - MINI_CONTROLLER_WIDTH_LANDSCAPE = 457; - } - - if (angle == 90 || angle == 270) { - w = MINI_CONTROLLER_WIDTH_LANDSCAPE; - } else { - w = MINI_CONTROLLER_WIDTH; - } - - double scale = elm_config_scale_get(); - VideoLogDebug("scale: %f and width: %d and height: %d", scale, w, - MINI_CONTROLLER_HEIGHT); - evas_object_resize(pPlayView->win_minicon, w * scale, - MINI_CONTROLLER_HEIGHT * scale); + evas_object_resize(pPlayView->win_minicon, MINI_CONTROLLER_WIDTH, MINI_CONTROLLER_WIDTH); return; } @@ -289,7 +277,12 @@ int vp_minicontroller_create(PlayView * pPlayView) VideoLogError("pPlayView is NULL"); return -1; } - + mini_controller_slider_data *pMCSliderHandler = calloc(1, sizeof(mini_controller_slider_data)); + if(pMCSliderHandler == NULL) { + VideoLogError("Failed to allocate memory for handler of mini-controller slider"); + return -1; + } + pPlayView->minicon_slider_handler = (void*)pMCSliderHandler; if (!(pPlayView->minicontroller_layout && pPlayView->win_minicon)) { _load_minicontroller(pPlayView); @@ -348,18 +341,32 @@ static void _vp_minicontroller_update_btn(PlayView * pPlayView) return; } - vp_mm_player_state_t nState = - vp_play_normal_view_get_player_state(pPlayView); + vp_mm_player_state_t nState = vp_play_normal_view_get_player_state(pPlayView); VideoLogInfo("nState:%d", nState); + Evas_Object *play_pause_button = elm_object_part_content_get(pPlayView->minicontroller_layout, "play.pause.swallow"); + if(play_pause_button == NULL) { + VideoLogError("play/pause button is invalid"); + return; + } + Evas_Object *icon = elm_object_part_content_get(play_pause_button, "icon"); + if(icon == NULL) { + VideoLogError("icon for play/pause button is invalid"); + return; + } + char image_path[1024] = {0, }; + char *path = app_get_resource_path(); if (nState == VP_MM_PLAYER_STATE_PLAYING) { - elm_object_signal_emit(pPlayView->minicontroller_layout, - "set_pause", "c_source"); + snprintf(image_path, 1024, "%s%s/%s", path, "edje/images/mini_controller", "mini-controller_pause.png"); + VideoLogError("Setting Pause: %s", image_path); + elm_image_file_set(icon, image_path, NULL); } else { - elm_object_signal_emit(pPlayView->minicontroller_layout, - "set_play", "c_source"); + snprintf(image_path, 1024, "%s%s/%s", path, "edje/images/mini_controller", "mini-controller_play.png"); + VideoLogError("Setting Play: %s", image_path); + elm_image_file_set(icon, image_path, NULL); } - + free(path); + path = NULL; } /** @@ -389,10 +396,17 @@ static void _vp_minicontroller_update_playpause_btn(PlayView * pPlayView) { VP_EVAS_TIMER_DEL(pPlayView->minicon_button_timer); - vp_mm_player_state_t nState = - vp_play_normal_view_get_player_state(pPlayView); + vp_mm_player_state_t nState = vp_play_normal_view_get_player_state(pPlayView); VideoLogInfo("nState:%d", nState); + mini_controller_slider_data *slider_handler = (mini_controller_slider_data*)pPlayView->minicon_slider_handler; + // No need to update the button state when update is due to mouse down event callbacks + // as state of player will resume to original state when mouse up event will be called. + if(slider_handler && slider_handler->is_mouse_down) { + VideoLogInfo("skiping ..mini-controller button update"); + return; + } + if (nState == VP_MM_PLAYER_STATE_PLAYING || nState == VP_MM_PLAYER_STATE_PAUSED) { _vp_minicontroller_update_btn(pPlayView); @@ -418,7 +432,6 @@ void vp_minicontroller_update_control(PlayView * pPlayView) VideoLogError("pPlayView->win_minicon is NULL"); return; } - _vp_minicontroller_update_playpause_btn(pPlayView); } @@ -486,9 +499,7 @@ int _vp_is_current_focus_available() * @param obj * @param event_info */ -static void _vp_minicontroller_play_pause_btn_clicked_cb(void *data, - Evas_Object * obj, - void *event_info) +static void _vp_minicontroller_play_pause_btn_clicked_cb(void *data, Evas_Object * obj, void *event_info) { VideoLogDebug("play/pause button clicked"); @@ -498,29 +509,18 @@ static void _vp_minicontroller_play_pause_btn_clicked_cb(void *data, return; } - vp_mm_player_state_t nState = - vp_play_normal_view_get_player_state(pPlayView); + vp_mm_player_state_t nState = vp_play_normal_view_get_player_state(pPlayView); VideoLogInfo("nState:%d", nState); + if (nState == VP_MM_PLAYER_STATE_PLAYING) { - /*if playing state then on click it should pause and set button for play */ - elm_object_signal_emit(pPlayView->minicontroller_layout, - "set_play", "c_source"); - vp_play_normal_view_on_controller_button_press(pPlayView-> - pNormalView, - CONTROLLER_PAUSE_BUTTON); + vp_play_normal_view_on_controller_button_press(pPlayView->pNormalView, CONTROLLER_PAUSE_BUTTON); } else { if (_vp_is_current_focus_available() != 0) { - VideoLogError - ("Some other application has the focus currently... Returning..."); + VideoLogError("Some other application has the focus currently... Returning..."); vp_play_util_status_noti_show(VP_PLAY_STRING_UNABLE_TO_PLAY); return; } - - elm_object_signal_emit(pPlayView->minicontroller_layout, - "set_pause", "c_source"); - vp_play_normal_view_on_controller_button_press(pPlayView-> - pNormalView, - CONTROLLER_PLAY_BUTTON); + vp_play_normal_view_on_controller_button_press(pPlayView->pNormalView, CONTROLLER_PLAY_BUTTON); } } @@ -583,27 +583,11 @@ static void _vp_minicontroller_ff_btn_clicked_cb(void *data, } if (_vp_is_current_focus_available() != 0) { - VideoLogError - ("Some other application has the focus currently... Changing to paused state..."); + VideoLogError("Some other application has the focus currently... Changing to paused state..."); stay_pause = true; } - vp_play_normal_view_on_controller_button_press(pPlayView->pNormalView, - CONTROLLER_FF_BUTTON); -} - -/** - * - * @param data - * @param e - * @param obj - * @param event_info - */ -static void -_vp_minicontroller_ff_btn_del_cb(void *data, Evas * e, Evas_Object * obj, - void *event_info) -{ - /* Forward button remove cb */ + vp_play_normal_view_on_controller_button_press(pPlayView->pNormalView, CONTROLLER_FF_BUTTON); } /** @@ -675,21 +659,44 @@ static void _vp_minicontroller_rew_btn_clicked_cb(void *data, CONTROLLER_REW_BUTTON); } -/** - * - * @param data - * @param e - * @param obj - * @param event_info - */ -static void -_vp_minicontroller_rew_btn_del_cb(void *data, Evas * e, Evas_Object * obj, - void *event_info) + + +static void __vp_minicontroller_slider_mouse_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) { - /* Rewind button remove cb */ + PlayView *pPlayView = (PlayView*)data; + if(pPlayView == NULL) { + VideoLogError("Invalid PlayView data"); + return; + } + mini_controller_slider_data *slider_handle = (mini_controller_slider_data*)pPlayView->minicon_slider_handler; + slider_handle->is_mouse_down = EINA_TRUE; + double ratio = elm_slider_value_get(obj); + vp_play_normal_view_on_controller_slider_events(pPlayView->pNormalView, CONTROLLER_SLIDER_MOUSE_DOWN, ((void*)(&ratio))); } -/*end of focused UI callbacks*/ +static void __vp_minicontroller_slider_mouse_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + PlayView *pPlayView = (PlayView*)data; + if(pPlayView == NULL) { + VideoLogError("Invalid PlayView data"); + return; + } + double ratio = elm_slider_value_get(obj); + vp_play_normal_view_on_controller_slider_events(pPlayView->pNormalView, CONTROLLER_SLIDER_MOUSE_UP, ((void*)(&ratio))); + mini_controller_slider_data *slider_handle = (mini_controller_slider_data*)pPlayView->minicon_slider_handler; + slider_handle->is_mouse_down = EINA_FALSE; +} + +static void __vp_minicontroller_slider_mouse_move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + PlayView *pPlayView = (PlayView*)data; + if(pPlayView == NULL) { + VideoLogError("Invalid PlayView data"); + return; + } + double ratio = elm_slider_value_get(obj); + vp_play_normal_view_on_controller_slider_events(pPlayView->pNormalView, CONTROLLER_SLIDER_MOUSE_MOVE, ((void*)(&ratio))); +} /** * @@ -707,37 +714,17 @@ _vp_minicontroller_update_layout(PlayView * pPlayView, bool landscape) VideoLogDebug("isLiveStreaming is %d", isLiveStreaming); VP_EVAS_TIMER_DEL(pPlayView->minicon_button_timer); + mini_controller_slider_data *slider_data = (mini_controller_slider_data*)pPlayView->minicon_slider_handler; + if(slider_data) { + VP_EVAS_TIMER_DEL(slider_data->duration_timer); + } if (pPlayView->minicontroller_layout) { evas_object_del(pPlayView->minicontroller_layout); pPlayView->minicontroller_layout = NULL; } - if (isLiveStreaming) { - if (landscape) { - VideoLogDebug("angle: 90 or 270"); - pPlayView->minicontroller_layout = - _load_edj(pPlayView->win_minicon, MINICON_EDJ_NAME, - "video-minicontroller-live-streaming-ld"); - } else { - VideoLogDebug("angle: 0"); - pPlayView->minicontroller_layout = - _load_edj(pPlayView->win_minicon, MINICON_EDJ_NAME, - "video-minicontroller-live-streaming"); - } - } else { - if (landscape) { - VideoLogDebug("angle: 90 or 270"); - pPlayView->minicontroller_layout = - _load_edj(pPlayView->win_minicon, MINICON_EDJ_NAME, - "video-minicontroller-ld"); - } else { - VideoLogDebug("angle: 0"); - pPlayView->minicontroller_layout = - _load_edj(pPlayView->win_minicon, MINICON_EDJ_NAME, - "video-minicontroller"); - } - } + pPlayView->minicontroller_layout = _load_edj(pPlayView->win_minicon, MINICON_EDJ_NAME, "video.player.mini.controller"); if (!pPlayView->minicontroller_layout) { return; @@ -747,84 +734,105 @@ _vp_minicontroller_update_layout(PlayView * pPlayView, bool landscape) pPlayView->minicontroller_layout); /*add focused UI related */ - pPlayView->minicon_icon = - elm_image_add(pPlayView->minicontroller_layout); - evas_object_size_hint_align_set(pPlayView->minicon_icon, - EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_size_hint_weight_set(pPlayView->minicon_icon, - EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + pPlayView->minicon_icon = elm_image_add(pPlayView->minicontroller_layout); + evas_object_size_hint_align_set(pPlayView->minicon_icon, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_size_hint_weight_set(pPlayView->minicon_icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_image_fill_outside_set(pPlayView->minicon_icon, true); - elm_object_part_content_set(pPlayView->minicontroller_layout, - "albumart_image", pPlayView->minicon_icon); - elm_object_focus_custom_chain_append(pPlayView->minicontroller_layout, - pPlayView->minicon_icon, NULL); + elm_object_part_content_set(pPlayView->minicontroller_layout, "album.art.swallow", pPlayView->minicon_icon); + elm_object_focus_custom_chain_append(pPlayView->minicontroller_layout, pPlayView->minicon_icon, NULL); elm_object_focus_allow_set(pPlayView->minicon_icon, EINA_TRUE); + edje_object_signal_callback_add(_EDJ(pPlayView->minicontroller_layout), "album,art,clicked", "vp_edje", _minicontroller_album_art_clicked_cb, pPlayView); + char image_path[1024] = {0, }; + char *res_path = app_get_resource_path(); /*-------> REW button ------->*/ if (!isLiveStreaming) { - Evas_Object *rew_focus_btn = - elm_button_add(pPlayView->minicontroller_layout); - elm_object_style_set(rew_focus_btn, "focus"); - elm_object_part_content_set(pPlayView->minicontroller_layout, - "rew_btn_focus", rew_focus_btn); - - elm_object_focus_custom_chain_append(pPlayView->minicontroller_layout, - rew_focus_btn, NULL); - evas_object_smart_callback_add(rew_focus_btn, "clicked", - _vp_minicontroller_rew_btn_clicked_cb, - pPlayView); - evas_object_smart_callback_add(rew_focus_btn, "pressed", - _vp_minicontroller_rew_btn_pressed_cb, - pPlayView); - evas_object_smart_callback_add(rew_focus_btn, "unpressed", - _vp_minicontroller_rew_btn_unpressed_cb, - pPlayView); - evas_object_event_callback_add(rew_focus_btn, EVAS_CALLBACK_DEL, - _vp_minicontroller_rew_btn_del_cb, - NULL); + Evas_Object *rew_focus_btn = elm_button_add(pPlayView->minicontroller_layout); + elm_object_style_set(rew_focus_btn, "icon"); + + Evas_Object *prev_icon = elm_image_add(rew_focus_btn); + snprintf(image_path, 1024, "%s%s%s", res_path, "edje/images/mini_controller/", "mini-controller_prev.png"); + VideoLogError("Prev Image Path: %s", image_path); + elm_image_file_set(prev_icon, image_path, NULL); + elm_image_resizable_set(prev_icon, EINA_FALSE, EINA_FALSE); + evas_object_size_hint_align_set(prev_icon, 0.5, 0.5); + elm_object_part_content_set(rew_focus_btn, "icon", prev_icon); + + elm_object_part_content_set(pPlayView->minicontroller_layout, "prev.button.swallow", rew_focus_btn); + elm_object_focus_custom_chain_append(pPlayView->minicontroller_layout, rew_focus_btn, NULL); + evas_object_smart_callback_add(rew_focus_btn, "clicked", _vp_minicontroller_rew_btn_clicked_cb, pPlayView); + evas_object_smart_callback_add(rew_focus_btn, "pressed", _vp_minicontroller_rew_btn_pressed_cb, pPlayView); + evas_object_smart_callback_add(rew_focus_btn, "unpressed", _vp_minicontroller_rew_btn_unpressed_cb, pPlayView); } /*-------> play/pause button ------->*/ - Evas_Object *play_pause_focus_btn = - elm_button_add(pPlayView->minicontroller_layout); - elm_object_style_set(play_pause_focus_btn, "focus"); - elm_object_part_content_set(pPlayView->minicontroller_layout, - "play_pause_focus", play_pause_focus_btn); - elm_object_focus_custom_chain_append(pPlayView->minicontroller_layout, - play_pause_focus_btn, NULL); - evas_object_smart_callback_add(play_pause_focus_btn, "clicked", - _vp_minicontroller_play_pause_btn_clicked_cb, - pPlayView); + Evas_Object *play_pause_focus_btn = elm_button_add(pPlayView->minicontroller_layout); + elm_object_style_set(play_pause_focus_btn, "icon"); + + Evas_Object *play_pause_icon = elm_image_add(play_pause_focus_btn); + snprintf(image_path, 1024, "%s%s%s", res_path, "edje/images/mini_controller/", "mini-controller_pause.png"); + VideoLogError("Prev Image Path: %s", image_path); + elm_image_file_set(play_pause_icon, image_path, NULL); + elm_image_resizable_set(play_pause_icon, EINA_FALSE, EINA_FALSE); + evas_object_size_hint_align_set(play_pause_icon, 0.5, 0.5); + elm_object_part_content_set(play_pause_focus_btn, "icon", play_pause_icon); + + elm_object_part_content_set(pPlayView->minicontroller_layout, "play.pause.swallow", play_pause_focus_btn); + elm_object_focus_custom_chain_append(pPlayView->minicontroller_layout, play_pause_focus_btn, NULL); + evas_object_smart_callback_add(play_pause_focus_btn, "clicked", _vp_minicontroller_play_pause_btn_clicked_cb, pPlayView); /*------->FF button ------->*/ if (!isLiveStreaming) { - Evas_Object *ff_focus_btn = - elm_button_add(pPlayView->minicontroller_layout); - elm_object_style_set(ff_focus_btn, "focus"); - elm_object_part_content_set(pPlayView->minicontroller_layout, - "ff_btn_focus", ff_focus_btn); - - elm_object_focus_custom_chain_append(pPlayView->minicontroller_layout, - ff_focus_btn, NULL); - evas_object_smart_callback_add(ff_focus_btn, "clicked", - _vp_minicontroller_ff_btn_clicked_cb, - pPlayView); - evas_object_smart_callback_add(ff_focus_btn, "pressed", - _vp_minicontroller_ff_btn_pressed_cb, - pPlayView); - evas_object_smart_callback_add(ff_focus_btn, "unpressed", - _vp_minicontroller_ff_btn_unpressed_cb, - pPlayView); - evas_object_event_callback_add(ff_focus_btn, EVAS_CALLBACK_DEL, - _vp_minicontroller_ff_btn_del_cb, NULL); - - /*-------> close button ------->*/ - edje_object_signal_callback_add(_EDJ(pPlayView->minicontroller_layout), - "*", "*", _minicontroller_action_cb, - pPlayView); - } + Evas_Object *ff_focus_btn = elm_button_add(pPlayView->minicontroller_layout); + elm_object_style_set(ff_focus_btn, "icon"); + + Evas_Object *next_icon = elm_image_add(ff_focus_btn); + snprintf(image_path, 1024, "%s%s%s", res_path, "edje/images/mini_controller/", "mini-controller_next.png"); + VideoLogError("Prev Image Path: %s", image_path); + elm_image_file_set(next_icon, image_path, NULL); + elm_image_resizable_set(next_icon, EINA_FALSE, EINA_FALSE); + evas_object_size_hint_align_set(next_icon, 0.5, 0.5); + elm_object_part_content_set(ff_focus_btn, "icon", next_icon); + + elm_object_part_content_set(pPlayView->minicontroller_layout, "next.button.swallow", ff_focus_btn); + elm_object_focus_custom_chain_append(pPlayView->minicontroller_layout, ff_focus_btn, NULL); + evas_object_smart_callback_add(ff_focus_btn, "clicked", _vp_minicontroller_ff_btn_clicked_cb, pPlayView); + evas_object_smart_callback_add(ff_focus_btn, "pressed", _vp_minicontroller_ff_btn_pressed_cb, pPlayView); + evas_object_smart_callback_add(ff_focus_btn, "unpressed", _vp_minicontroller_ff_btn_unpressed_cb, pPlayView); + } + + /*-------> close button ------->*/ + Evas_Object *close_icon = elm_image_add(pPlayView->minicontroller_layout); + snprintf(image_path, 1024, "%s%s%s", res_path, "edje/images/mini_controller/", "mini-controller_close_icon.png"); + VideoLogError("Close Image Path: %s", image_path); + elm_image_file_set(close_icon, image_path, NULL); + elm_image_resizable_set(close_icon, EINA_FALSE, EINA_FALSE); + evas_object_size_hint_align_set(close_icon, 0.5, 0.5); + elm_object_part_content_set(pPlayView->minicontroller_layout, "close.icon.swallow", close_icon); + edje_object_signal_callback_add(_EDJ(pPlayView->minicontroller_layout), "close,button,clicked", "vp_edje", _minicontroller_close_button_clicked_cb, pPlayView); + + mini_controller_slider_data *slider_handler= (mini_controller_slider_data*)pPlayView->minicon_slider_handler; + slider_handler->is_mouse_down = EINA_FALSE; + slider_handler->slider = elm_slider_add(pPlayView->minicontroller_layout); + evas_object_size_hint_align_set(slider_handler->slider, EVAS_HINT_FILL, 0.5); + evas_object_size_hint_weight_set(slider_handler->slider, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_slider_value_set(slider_handler->slider, 0.0); + elm_object_part_content_set(pPlayView->minicontroller_layout, "slider.swallow", slider_handler->slider); + + evas_object_event_callback_add(slider_handler->slider, EVAS_CALLBACK_MOUSE_DOWN, __vp_minicontroller_slider_mouse_down_cb, (void *)pPlayView); + evas_object_event_callback_add(slider_handler->slider, EVAS_CALLBACK_MOUSE_UP, __vp_minicontroller_slider_mouse_up_cb, (void *)pPlayView); + evas_object_event_callback_add(slider_handler->slider, EVAS_CALLBACK_MOUSE_MOVE, __vp_minicontroller_slider_mouse_move_cb, (void *)pPlayView ); + + char szDurationTime[PROGRESSBAR_TIME_LENGTH] = { 0, }; + int total_duration = 0; + vp_play_normal_view_get_video_duration(pPlayView->pNormalView, &total_duration); + snprintf(szDurationTime, PROGRESSBAR_TIME_LENGTH, "%" PROGRESSBAR_TIME_FORMAT, PROGRESSBAR_TIME_ARGS(total_duration / 1000)); + elm_object_part_text_set(pPlayView->minicontroller_layout, "slider.text.right", szDurationTime); + _vp_minicontroller_update_btn(pPlayView); + free(res_path); + res_path = NULL; } /** @@ -843,11 +851,11 @@ static void _vp_minicontroller_title_set(PlayView * pPlayView) } Evas_Object *label = elm_object_part_content_get(pPlayView->minicontroller_layout, - "elm.text"); + "title.text.swallow"); int r = 0; - int g = 0; - int b = 0; + int g = 12; + int b = 43; int a = 255; char *markup_title = @@ -860,7 +868,7 @@ static void _vp_minicontroller_title_set(PlayView * pPlayView) title = NULL; } else { title = - g_strdup_printf(title_format, 24, r, g, b, a, markup_title); + g_strdup_printf(title_format, 22, r, g, b, a, markup_title); } if (!label) { @@ -874,7 +882,7 @@ static void _vp_minicontroller_title_set(PlayView * pPlayView) elm_object_text_set(label, title); evas_object_show(label); elm_object_part_content_set(pPlayView->minicontroller_layout, - "elm.text", label); + "title.text.swallow", label); } else { elm_object_text_set(label, title); } @@ -888,6 +896,46 @@ static void _vp_minicontroller_title_set(PlayView * pPlayView) } +void vp_minicontroller_slider_update(PlayView *pPlayView, int curr_duration, int total_duration) +{ + if(pPlayView == NULL) { + VideoLogError("PlayView object is NULL"); + return; + } + mini_controller_slider_data *slider_handle = (mini_controller_slider_data*)pPlayView->minicon_slider_handler; + if(slider_handle == NULL) { + VideoLogError("mini controller slider handle is null"); + return; + } + if(slider_handle->is_mouse_down == EINA_FALSE) { + double ratio = (double)(curr_duration)/(double)(total_duration); + elm_slider_value_set(slider_handle->slider, ratio); + } + char szDurationTime[PROGRESSBAR_TIME_LENGTH] = { 0, }; + snprintf(szDurationTime, PROGRESSBAR_TIME_LENGTH, "%" PROGRESSBAR_TIME_FORMAT, PROGRESSBAR_TIME_ARGS(curr_duration / 1000)); + elm_object_part_text_set(pPlayView->minicontroller_layout, "slider.text.left", szDurationTime); +} + +static Eina_Bool __vp_minicontroller_duration_update_timer(void *data) +{ + PlayView *pPlayView = (PlayView*)data; + if(pPlayView == NULL) { + VideoLogError("duration timer update data is null, can't update duration for mini-controller"); + return ECORE_CALLBACK_CANCEL; + } + + char szDurationTime[PROGRESSBAR_TIME_LENGTH] = { 0, }; + int total_duration = 0; + vp_play_normal_view_get_video_duration(pPlayView->pNormalView, &total_duration); + snprintf(szDurationTime, PROGRESSBAR_TIME_LENGTH, "%" PROGRESSBAR_TIME_FORMAT, PROGRESSBAR_TIME_ARGS(total_duration / 1000)); + elm_object_part_text_set(pPlayView->minicontroller_layout, "slider.text.right", szDurationTime); + + mini_controller_slider_data *slider_data = (mini_controller_slider_data*)pPlayView->minicon_slider_handler; + slider_data->duration_timer = NULL; + + return ECORE_CALLBACK_CANCEL; +} + /** * * @param pPlayView @@ -906,25 +954,21 @@ void vp_minicontroller_update(PlayView * pPlayView, bool with_title) //_vp_minicontroller_update_btn(pPlayView); VideoLogDebug("Updating thumbnail!!!!!!!!!!!!!!"); char *thumbnail_path = NULL; - vp_media_contents_get_video_thumbnail_path(pPlayView->szMediaURL, - &thumbnail_path); + vp_media_contents_get_video_thumbnail_path(pPlayView->szMediaURL, &thumbnail_path); - if (thumbnail_path == NULL) { - VideoLogInfo - ("Cannot generate thumbnail for video file. Switching to default path."); + if (thumbnail_path == NULL || strlen(thumbnail_path) == 0) { + VideoLogInfo("Cannot generate thumbnail for video file. Switching to default path."); char edj_path[1024] = { 0 }; char *path = app_get_resource_path(); - snprintf(edj_path, 1024, "%s%s/%s", path, "edje", - VIDEO_PLAYER_IMAGE_NAME_EDJ); + snprintf(edj_path, 1024, "%s%s%s", path, "edje/images/mini_controller/", "mini-controller_default_thumbnail.png"); free(path); - elm_image_file_set(pPlayView->minicon_icon, edj_path, - VP_PLAY_NORMAL_AUDIO_ONLY_IMG); - evas_object_color_set(pPlayView->minicon_icon, 0, 0, 0, 255); + elm_image_file_set(pPlayView->minicon_icon, edj_path, NULL); } else { - VideoLogInfo("thumbnail = %s:%s", pPlayView->szMediaURL, - thumbnail_path); + VideoLogInfo("thumbnail = %s:%s", pPlayView->szMediaURL, thumbnail_path); elm_image_file_set(pPlayView->minicon_icon, thumbnail_path, NULL); + free(thumbnail_path); + thumbnail_path = NULL; } evas_object_show(pPlayView->minicon_icon); @@ -933,6 +977,17 @@ void vp_minicontroller_update(PlayView * pPlayView, bool with_title) _vp_minicontroller_title_set(pPlayView); } + if(pPlayView->minicon_slider_handler) { + // We need to user timer here to update the duration because we can't get video duration just after click the next button + // as player is not realized at that time..so have to wait for player to realized before updating the duration. + mini_controller_slider_data *slider_data = (mini_controller_slider_data*)(pPlayView->minicon_slider_handler); + if(slider_data->duration_timer) { + ecore_timer_del(slider_data->duration_timer); + slider_data->duration_timer = NULL; + } + slider_data->duration_timer = ecore_timer_add(1.0, __vp_minicontroller_duration_update_timer, (void *)pPlayView); + } + evas_object_show(pPlayView->minicontroller_layout); } @@ -958,8 +1013,7 @@ int vp_minicontroller_destroy(PlayView * pPlayView) vp_play_normal_view_get_player_state(pPlayView); if (nState == VP_MM_PLAYER_STATE_PLAYING) { /*if playing state then on click it should pause and set button for play */ - elm_object_signal_emit(pPlayView->minicontroller_layout, - "set_pause", "c_source"); + _vp_minicontroller_update_btn(pPlayView); } if (pPlayView->win_lockmini) { @@ -977,7 +1031,19 @@ int vp_minicontroller_destroy(PlayView * pPlayView) evas_object_del(pPlayView->win_minicon); pPlayView->win_minicon = NULL; } - + if(pPlayView->minicon_button_timer) { + ecore_timer_del(pPlayView->minicon_button_timer); + pPlayView->minicon_button_timer = NULL; + } + if(pPlayView->minicon_slider_handler) { + mini_controller_slider_data *slider_data = (mini_controller_slider_data*)pPlayView->minicon_slider_handler; + if(slider_data->duration_timer) { + ecore_timer_del(slider_data->duration_timer); + slider_data->duration_timer = NULL; + } + free(pPlayView->minicon_slider_handler); + pPlayView->minicon_slider_handler = NULL; + } VP_EVAS_TIMER_DEL(pPlayView->minicon_button_timer); pPlayView->minicon_visible = false; @@ -1005,27 +1071,9 @@ void vp_minicontroller_rotate(PlayView * pPlayView, int angle) return; } - int w = 0; const char *signal = NULL; bool landscape = _vp_minicontroller_landscape_is(pPlayView, angle); - if (landscape) { - VideoLogDebug("Landscape mode enabled"); - signal = "sig_set_landscape_mode"; - w = MINI_CONTROLLER_WIDTH_LANDSCAPE; - landscape = true; - } else { - VideoLogDebug("Portrait mode enabled"); - signal = "sig_set_portrait_mode"; - w = MINI_CONTROLLER_WIDTH; - landscape = false; - } - - elm_object_signal_emit(pPlayView->minicontroller_layout, signal, - "c_source"); - - double scale = elm_config_scale_get(); - evas_object_resize(pPlayView->win_minicon, w * scale, - MINI_CONTROLLER_HEIGHT * scale); + evas_object_resize(pPlayView->win_minicon, MINI_CONTROLLER_WIDTH, MINI_CONTROLLER_HEIGHT); _vp_minicontroller_update_layout(pPlayView, landscape); vp_minicontroller_update(pPlayView, true); } diff --git a/playview/src/widget/vp-play-progressbar.c b/playview/src/widget/vp-play-progressbar.c index 5eb7ce5..131da71 100755 --- a/playview/src/widget/vp-play-progressbar.c +++ b/playview/src/widget/vp-play-progressbar.c @@ -20,6 +20,7 @@ #include "vp-play-button.h" #include "vp-play-progressbar.h" +#include "vp-play-minicontroller.h" /* check temp */ @@ -34,6 +35,7 @@ typedef struct _ProgressWidget { Evas_Object *pStartLabel; Evas_Object *pTotalLabel; + void *pPlayView; video_progressbar_type_t nType; @@ -321,7 +323,7 @@ static bool _vp_play_progressbar_init_layout(ProgressWidget * */ progressbar_handle vp_play_progressbar_create(Evas_Object * pParent, video_progressbar_type_t - nType) + nType, void *data) { if (pParent == NULL) { VideoLogError("pParent is NULL"); @@ -340,6 +342,7 @@ progressbar_handle vp_play_progressbar_create(Evas_Object * pParent, pProgressWidget->pParent = pParent; pProgressWidget->nType = nType; pProgressWidget->bRealized = FALSE; + pProgressWidget->pPlayView = data; if (!_vp_play_progressbar_init_layout(pProgressWidget)) { VideoLogError("_vp_play_progressbar_init_layout is fail"); @@ -494,6 +497,8 @@ bool vp_play_progressbar_set_position(progressbar_handle pWidgetHandle, _vp_play_progressbar_value_update(pProgressWidget); + vp_minicontroller_slider_update(pProgressWidget->pPlayView, pProgressWidget->nCurrentPos, pProgressWidget->nDuration); + return TRUE; } diff --git a/res/edje/vp-videolist-custom-gengrid.edc b/res/edje/vp-videolist-custom-gengrid.edc index 1803313..8844c91 100755 --- a/res/edje/vp-videolist-custom-gengrid.edc +++ b/res/edje/vp-videolist-custom-gengrid.edc @@ -418,6 +418,7 @@ group { "elm/gengrid/item/videolist/default"; desc { "default"; rel1.to: "elm.icon"; rel1.relative: 0.0 0.0; + rel1.offset: 4 4; rel2.to: "elm.icon"; rel2.relative: 0.0 0.0; min: 40 40; diff --git a/vp-main/res/edje/images/mini_controller/mini-controller_close_icon.png b/vp-main/res/edje/images/mini_controller/mini-controller_close_icon.png new file mode 100755 index 0000000..ae9a4dc Binary files /dev/null and b/vp-main/res/edje/images/mini_controller/mini-controller_close_icon.png differ diff --git a/vp-main/res/edje/images/mini_controller/mini-controller_default_thumbnail.png b/vp-main/res/edje/images/mini_controller/mini-controller_default_thumbnail.png new file mode 100755 index 0000000..b0a1145 Binary files /dev/null and b/vp-main/res/edje/images/mini_controller/mini-controller_default_thumbnail.png differ diff --git a/vp-main/res/edje/images/mini_controller/mini-controller_next.png b/vp-main/res/edje/images/mini_controller/mini-controller_next.png new file mode 100755 index 0000000..44deb11 Binary files /dev/null and b/vp-main/res/edje/images/mini_controller/mini-controller_next.png differ diff --git a/vp-main/res/edje/images/mini_controller/mini-controller_pause.png b/vp-main/res/edje/images/mini_controller/mini-controller_pause.png new file mode 100755 index 0000000..d7d02c2 Binary files /dev/null and b/vp-main/res/edje/images/mini_controller/mini-controller_pause.png differ diff --git a/vp-main/res/edje/images/mini_controller/mini-controller_play.png b/vp-main/res/edje/images/mini_controller/mini-controller_play.png new file mode 100755 index 0000000..5593cb7 Binary files /dev/null and b/vp-main/res/edje/images/mini_controller/mini-controller_play.png differ diff --git a/vp-main/res/edje/images/mini_controller/mini-controller_prev.png b/vp-main/res/edje/images/mini_controller/mini-controller_prev.png new file mode 100755 index 0000000..6fc5737 Binary files /dev/null and b/vp-main/res/edje/images/mini_controller/mini-controller_prev.png differ diff --git a/vp-main/res/edje/pv-minicontroller.edc b/vp-main/res/edje/pv-minicontroller.edc index 2c064ff..b0bbaf7 100755 --- a/vp-main/res/edje/pv-minicontroller.edc +++ b/vp-main/res/edje/pv-minicontroller.edc @@ -13,416 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -#define MINI_H 70 -#define MINI_H_PORT 70 -#define TOP_PADDING 4 -#define LEFT_PADDING 12 -#define RIGHT_PADDING 4 -#define BOTTOM_PADDING 6 -#define ALBUM_ART_SIZE 120 120 -#define BUTTON_SIZE_MIN_MAX 80 80 -#define BIG_BTN_SIZE_MIN_MAX 80 80 -#define BUTTON_EXPAND_OFFSET 0 -#define BUTTON_CLOSE_SIZE_MAX 30 30 -#define PLAY_BTN_SIZE_MIN_MAX 80 80 -#define FF_BTN_SIZE_MIN_MAX 80 80 - - -#define MC_BG 30 28 28 0 - - -#define MC_MUSIC_LAGRE_BTN_EF "mini_controller/bg_btn_player_01_ef.png" -#define MC_MUSIC_LAGRE_BTN_BG "mini_controller/bg_btn_player_01.png" -#define MC_MUSIC_PLAY_BTN "mini_controller/music_btn_player_play_nor.png" -#define MC_MUSIC_PAUSE_BTN "mini_controller/music_btn_player_pause_nor.png" -#define MC_MUSIC_STOP_BTN "mini_controller/control_circle_icon_stop.png" - -#define MC_MUSIC_SMALL_BTN_EF "mini_controller/bg_btn_player_02_ef.png" -#define MC_MUSIC_SMALL_BTN_BG "mini_controller/bg_btn_player_02.png" - -#define MC_MUSIC_CLOSE_BTN "mini_controller/btn_controller_close.png" -#define MC_MUSIC_PREV_BTN "mini_controller/music_btn_player_prev_nor.png" -#define MC_MUSIC_NEXT_BTN "mini_controller/music_btn_player_next_nor.png" - -#define MC_MUSIC_ALBUM_FRAME "mini_controller/album_frame.png" - -#define MC_IMG_REW_NORMAL "mini_controller/btn_video_prev_nor.png" -#define MC_IMG_REW_PRESSED "mini_controller/btn_video_prev_press.png" -#define MC_IMG_PLAY_NORMAL "mini_controller/btn_video_play_nor.png" -#define MC_IMG_PLAY_PRESSED "mini_controller/btn_video_play_press.png" -#define MC_IMG_PAUSE_NORMAL "mini_controller/btn_video_pause_nor.png" -#define MC_IMG_PAUSE_PRESSED "mini_controller/btn_video_pause_press.png" -#define MC_IMG_FF_NORMAL "mini_controller/btn_video_next_nor.png" -#define MC_IMG_FF_PRESSED "mini_controller/btn_video_next_press.png" -#define MC_IMG_CLOSE_NORMAL "mini_controller/btn_close_nor.png" -#define MC_IMG_CLOSE_PRESSED "mini_controller/btn_close_press.png" -#define MC_IMG_PROGRESS_BG "mini_controller/video_progress_bg.png" -#define MC_IMG_PROGRESS_BAR "mini_controller/video_progress.png" - - - -#define MC_FOCUSED_COVER(__name, __over_part_bg) \ -part { \ - name: __name"_focus"; \ - type: SWALLOW; \ - mouse_events: 1; \ - scale: 1; \ - repeat_events: 1; \ - description { \ - state: "default" 0.0; \ - align: 0 0; \ - visible:1; \ - fixed: 1 1;\ - rel1 { \ - relative: 0 0; \ - to: __over_part_bg; \ - } \ - rel2 { \ - relative: 1 1; \ - to: __over_part_bg; \ - } \ - } \ -} - -#define MC_PART_AREA_FROM_LEFT(__name, __left_part, __width, __height) \ -part { name: __name; \ - type: SPACER; \ - scale: 1; \ - mouse_events: 0; \ - description { state: "default" 0.0; \ - rel1 { relative: 1.0 0.5; to: __left_part; } \ - rel2 { relative: 1.0 0.5; to: __left_part; } \ - min: __width __height; \ - fixed: 1 1; \ - align: 0.0 0.5; \ - } \ -} - -#define MC_PART_AREA_FROM_SWALLOW_LEFT(__name, __left_part, __width, __height) \ -part { name: __name; \ - type: SWALLOW; \ - scale: 1; \ - mouse_events: 1; \ - description { state: "default" 0.0; \ - rel1 { relative: 1.0 0.5; to: __left_part; } \ - rel2 { relative: 1.0 0.5; to: __left_part; } \ - min: __width __height; \ - fixed: 1 1; \ - align: 0.0 0.5; \ - } \ -} -#define MC_IMAGE_PART_FOCUS(__name,__to,__image,__btn_min_max)\ -part { name: __name;\ - type: IMAGE;\ - scale: 1;\ - mouse_events: 1;\ - description { state: "default" 0.0;\ - rel1 { relative: 0.5 0.5; to: __to; }\ - rel2 { relative: 0.5 0.5; to: __to; }\ - min: __btn_min_max;\ - max: __btn_min_max;\ - image.normal: __image;\ - fixed: 1 1;\ - align: 0.5 0.5;\ - color: 41 215 255 255;\ - }\ - description { state: "pressed" 0.0;\ - inherit: "default" 0.0;\ - color: 41 215 255 255;\ - }\ - description { state: "focus" 0.0;\ - inherit: "default" 0.0;\ - color: 6 119 194 255;\ - }\ - description { state: "hide" 0.0;\ - inherit: "default" 0.0;\ - visible: 0;\ - }\ - } - - -#define MC_IMAGE_PART(__name,__to,__image,__normal_code_red_component,__normal_code_green_component,__normal_code_blue_component,__normal_code_alpha_component,__press_code_red_component,__press_code_green_component,__press_code_blue_component,__press_code_alpha_component,__btn_min_max)\ -part { name: __name;\ - type: IMAGE;\ - scale: 1;\ - mouse_events: 1;\ - description { state: "default" 0.0;\ - rel1 { relative: 0.5 0.5; to: __to; }\ - rel2 { relative: 0.5 0.5; to: __to; }\ - min: __btn_min_max;\ - max: __btn_min_max;\ - image.normal: __image;\ - fixed: 1 1;\ - align: 0.5 0.5;\ - color: __normal_code_red_component __normal_code_green_component __normal_code_blue_component __normal_code_alpha_component;\ - }\ - description { state: "pressed" 0.0;\ - inherit: "default" 0.0;\ - color: __press_code_red_component __press_code_green_component __press_code_blue_component __press_code_alpha_component;\ - }\ - description { state: "hide" 0.0;\ - inherit: "default" 0.0;\ - visible: 0;\ - }\ - } - -#define MC_PROGRAM_IMAGE_VISIBLE(__btn, __show_signal, __hide_signal) \ -program { \ - signal: __show_signal; \ - source: "*"; \ - action: STATE_SET "default" 0.0; \ - target: __btn; \ -} \ -program { \ - signal: __hide_signal; \ - source: "*"; \ - action: STATE_SET "hide" 0.0; \ - target: __btn; \ -} - - -#define MC_PART_ICON_BTN(__name, __to, __normal, __pressed, __btn_min_max) \ -part { name: __name"_clip"; \ - type: RECT; \ - scale: 1; \ - mouse_events: 0; \ - description { state: "default" 0.0; \ - rel1.to: __name"_bg"; \ - rel2.to: __name"_bg"; \ - color: 255 255 255 255; \ - } \ - description { state: "hide" 0.0; \ - inherit: "default" 0.0; \ - visible: 0; \ - } \ -} \ -part { name: __name"_bg"; \ - type: IMAGE; \ - scale: 1; \ - mouse_events: 0; \ - clip_to: __name"_clip"; \ - description { state: "default" 0.0; \ - rel1 { relative: 0.5 0.5; to: __to; } \ - rel2 { relative: 0.5 0.5; to: __to; }\ - min: __btn_min_max; \ - max: __btn_min_max; \ - image.normal: __normal; \ - fixed: 1 1; \ - align: 0.5 0.5; \ - } \ - description { state: "pressed" 0.0; \ - inherit: "default" 0.0; \ - image.normal: __pressed; \ - } \ -} \ -part { name: __name; \ - type: RECT; \ - scale: 1; \ - mouse_events: 1; \ - clip_to: __name"_clip"; \ - description { state: "default" 0.0; \ - rel1.to: __name"_bg"; \ - rel2.to: __name"_bg"; \ - color: 0 0 0 0; \ - } \ -} - -#define MC_PART_TEXT_BTN(__name, __to, __text_part_name) \ -part { name: __name"_clip"; \ - type: RECT; \ - scale: 1; \ - mouse_events: 0; \ - description { state: "default" 0.0; \ - rel1.to: __to; \ - rel2.to: __to; \ - color: 255 255 255 255; \ - } \ - description { state: "hide" 0.0; \ - inherit: "default" 0.0; \ - visible: 0; \ - } \ -} \ -part { name: __name"_bg"; \ - type: SPACER; \ - scale: 1; \ - mouse_events: 0; \ - clip_to: __name"_clip"; \ - description { state: "default" 0.0; \ - rel1.to: __to; \ - rel2.to: __to; \ - } \ - description { state: "pressed" 0.0; \ - inherit: "default" 0.0; \ - } \ -} \ -part { name: __text_part_name; \ - type: TEXT; \ - scale: 1; \ - mouse_events: 0; \ - clip_to: __name"_clip"; \ - description { state: "default" 0.0; \ - rel1.to: __name"_bg"; \ - rel2.to: __name"_bg"; \ - text { \ - font: "Tizen:style=Medium"; \ - size: 28; \ - align: 0.5 0.5; \ - } \ - color: 149 149 149 255; \ - } \ -} \ -part { name: __name; \ - type: RECT; \ - scale: 1; \ - mouse_events: 1; \ - clip_to: __name"_clip"; \ - description { state: "default" 0.0; \ - rel1.to: __to; \ - rel2.to: __to; \ - color: 0 0 0 0; \ - } \ -} - -#define MC_PART_RECT(__name, __to, __sx, __sy, __ex, __ey) \ -part { \ - name: __name; \ - mouse_events: 1; \ - repeat_events: 1; \ - type: RECT; \ - scale: 1; \ - description { \ - state: "default" 0.0; \ - align: 0 0; \ - visible: 1; \ - rel1 { \ - relative: __sx __sy; \ - to: __to; \ - } \ - rel2 { \ - relative: __ex __ey; \ - to: __to; \ - } \ - color: 0 0 0 0; \ - }\ - description { \ - state: "hide" 0.0; \ - visible: 0; \ - }\ -} - -#define MC_PART_SWALLOW(__name, __to, __sx, __sy, __ex, __ey) \ -part { \ - name: __name; \ - mouse_events: 1; \ - type: SWALLOW; \ - scale: 1; \ - description { \ - state: "default" 0.0; \ - align: 0.5 0.5; \ - fixed: 1 1; \ - visible: 1; \ - fixed:1 1;\ - rel1 { \ - relative: __sx __sy; \ - to: __to; \ - } \ - rel2 { \ - relative: __ex __ey; \ - to: __to; \ - } \ - color: 0 0 0 0; \ - } \ -} - -#define MC_PROGRAM_BTN_ACTION(__btn, __down_emission, __down_src, __up_emission, __up_src, __clicked_emission, __clicked_src) \ -program { \ - name: __btn"_after_down"; \ - signal: "mouse,down,1"; \ - source: __btn; \ - script { \ - set_state(PART:__btn"_bg", "pressed", 0.0); \ - emit(__down_emission, __down_src); \ - } \ -} \ -program { \ - source: __btn; \ - signal: "mouse,down,1"; \ - action: PLAY_SAMPLE "button-pressed" 1.0; \ - after: __btn"_after_down"; \ - transition: ACCELERATE 0.02;\ -} \ -program { \ - signal: "mouse,up,1"; \ - source: __btn; \ - script { \ - set_state(PART:__btn"_bg", "default", 0.0); \ - emit(__up_emission, __up_src); \ - } \ -} \ -program { \ - signal: "mouse,clicked,1"; \ - source: __btn; \ - action: SIGNAL_EMIT __clicked_emission __clicked_src; \ -} - -#define MC_PROGRAM_BTN_VISIBLE(__btn, __show_signal, __hide_signal) \ -program { \ - signal: __show_signal; \ - source: "*"; \ - action: STATE_SET "default" 0.0; \ - target: __btn"_clip"; \ -} \ -program { \ - signal: __hide_signal; \ - source: "*"; \ - action: STATE_SET "hide" 0.0; \ - target: __btn"_clip"; \ -} - -#define MINI_CONTROL_HIDE_SWALLOW_OPTION(__name, __to) \ -part { \ - name: __name; \ - mouse_events: 1; \ - type: SWALLOW; \ - scale: 1; \ - repeat_events: 1; \ - description { \ - state: "default" 0.0; \ - align: 0.5 0.5; \ - visible: 0; \ - rel1 { \ - relative: 0 0; \ - to: __to; \ - } \ - rel2 { \ - relative: 1 1; \ - to: __to; \ - } \ - color: 0 0 0 0; \ - } \ - description { \ - state: "visible" 0.0; \ - inherit: "default"; \ - visible: 1; \ - } \ -} - -#define MINI_CONTROL_BUTTON_INVISIVBLE_PROGRAM(__name) \ -program { \ - name: __name"_visible" ; \ - signal: __name"_visible"; \ - source: __name; \ - action: STATE_SET "visible" 0.0; \ - target: __name; \ -} \ -program { \ - name: __name"_invisible" ; \ - signal: __name"_invisible"; \ - source: __name; \ - action: STATE_SET "default" 0.0; \ - target: __name; \ -} +#include "custom/pv-custom-define.edc" externals { external: "elm"; @@ -430,1711 +21,315 @@ externals { } collections { -base_scale: 2.4; -/* -sounds { - sample { - name: "button-pressed" AS_IS; - source: MP_BUTTON_PRESSED_NAME; - } -} +base_scale: CURRENT_BASE_SCALE; -plugins { - plugin { - name: "touch_sound_plugin"; - source: "feedback"; - param: "FEEDBACK_TYPE_SOUND FEEDBACK_PATTERN_TAP"; +styles { + style { name: "mini_controller_total_duration_text"; + base: "font=Tizen:weight=Regular:width=BreezeSans font_size=18 align=right color=#001447 ellipsis=1.0 wrap=none"; + } + style { name: "mini_controller_current_duration_text"; + base: "font=Tizen:weight=Regular:width=BreezeSans font_size=18 align=left color=#001447 ellipsis=1.0 wrap=none"; } } -*/ -group { - name: "video-minicontroller"; - images { - image: MC_MUSIC_LAGRE_BTN_EF COMP; - image: MC_MUSIC_LAGRE_BTN_BG COMP; - image: MC_MUSIC_PLAY_BTN COMP; - image: MC_MUSIC_PAUSE_BTN COMP; - image: MC_MUSIC_SMALL_BTN_EF COMP; - image: MC_MUSIC_SMALL_BTN_BG COMP; - image: MC_MUSIC_CLOSE_BTN COMP; - image: MC_MUSIC_PREV_BTN COMP; - image: MC_MUSIC_NEXT_BTN COMP; - - image: MC_MUSIC_ALBUM_FRAME COMP; - } +group { name: "video.player.mini.controller"; parts { - part{ name: "bg"; - type : RECT; - scale : 1; - mouse_events: 0; - description { - state: "default" 0.0; - min : 0 MINI_H_PORT; - fixed: 1 1; - rel1{ relative : 0 0;} - rel2{ relative : 1 1;} - color: MC_BG; - } - } - - part { name: "event_box"; - type : SWALLOW; - mouse_events: 1; - scale: 1; - description { - state: "default" 0.0; - rel1 { - relative: 0 0; - to: "bg"; - } - rel2 { - relative: 1 1; - to: "bg"; - } - } - } - - part { name: "padding.top"; + part { name: "base"; type: SPACER; scale: 1; - mouse_events: 0; description { state: "default" 0.0; - rel1 { relative: 0 0; to: "bg"; } - rel2 { relative: 1 0; to: "bg"; } - min: 0 TOP_PADDING; - fixed: 0 1; - align: 0 0; } } - part { name: "padding.left"; - type: SPACER; scale: 1; - mouse_events: 0; + type: SPACER; + scale: 1; description { state: "default" 0.0; - rel1 { relative: 0 0; to: "bg"; } - rel2 { relative: 0 1; to: "bg"; } - min: LEFT_PADDING 0; + min: 40 0; + max: 40 -1; fixed: 1 0; - align: 0 0; + rel1 { to: "base"; relative: 0.0 0.0; } + rel2 { to: "base"; relative: 0.0 1.0; } + align: 0.0 0.0; } } - part { name: "padding.right"; type: SPACER; scale: 1; - mouse_events: 0; description { state: "default" 0.0; - rel1 { relative: 1 0; to: "bg"; } - rel2 { relative: 1 1; to: "bg"; } - min: RIGHT_PADDING 0; + min: 8 0; + max: 8 -1; fixed: 1 0; - align: 1 0; + rel1 { to: "base"; relative: 1.0 0.0; } + rel2 { to: "base"; relative: 1.0 1.0; } + align: 1.0 0.0; } } - - part { name: "padding.bottom"; + part { name: "content.area"; type: SPACER; scale: 1; - mouse_events: 0; description { state: "default" 0.0; - rel1 { relative: 0 1; to: "bg"; } - rel2 { relative: 1 1; to: "bg"; } - min: 0 BOTTOM_PADDING; - fixed: 0 1; - align: 0 1; - } - } - - part { name: "padding_for_albumart.top"; - type: SPACER; - scale: 1; - description { - state: "default" 0.0; - rel1 { relative: 0 0; to: "bg"; } - rel2 { relative: 1 0; to: "bg"; } - min: 0 15; - fixed: 0 1; + rel1 { to: "padding.left"; relative: 1.0 0.0; } + rel2 { to: "padding.right"; relative: 0.0 1.0; } align: 0.0 0.0; } } - - part { name: "padding_for_albumart.bottom"; + part { name: "close.button.area"; type: SPACER; scale: 1; description { state: "default" 0.0; - rel1 { relative: 0 1; to: "bg"; } - rel2 { relative: 1 1; to: "bg"; } - min: 0 15; - fixed: 0 1; - align: 0 1; + min: 40 0; + max: 40 -1; + fixed: 1 0; + rel1 { to: "padding.right"; relative: 0.0 0.0; } + rel2 { to: "padding.right"; relative: 0.0 1.0; } + align: 1.0 0.0; } } - - part { name: "albumarmt_bg"; + part { name: "close.button.bg"; type: RECT; scale: 1; - mouse_events: 0; + mouse_events: 1; description { state: "default" 0.0; - rel1 { relative: 1.0 1.0; to_x: "padding.left"; to_y: "padding_for_albumart.top"; } - rel2 { relative: 1.0 0.0; to_x: "padding.left"; to_y: "padding_for_albumart.bottom"; } - min: ALBUM_ART_SIZE; - max: ALBUM_ART_SIZE; + min: 40 40; + max: 40 40; fixed: 1 1; - align: 0.0 0.5; + rel.to: "close.button.area"; + rel1.relative: 0.0 0.0; + rel1.offset: 0 8; + rel2.relative: 1.0 0.0; + align: 0.0 0.0; + color: 0 0 0 0; } } - - part { name: "albumart_image"; + part { name: "close.icon.swallow"; type: SWALLOW; scale: 1; - mouse_events: 1; - clip_to: "albumarmt_bg"; description { state: "default" 0.0; - rel1 { relative: 0.5 0.5; to: "albumarmt_bg"; } - rel2 { relative: 0.5 0.5; to: "albumarmt_bg"; } - min: ALBUM_ART_SIZE; - max: ALBUM_ART_SIZE; - fixed: 1 1; - align: 0.5 0.5; + rel.to: "close.button.bg"; } } - - part { name: "albumarmt_frame"; - type: IMAGE; + part { name: "close.padding.left.padding"; + type: SPACER; scale: 1; - mouse_events: 0; description { state: "default" 0.0; - rel1 { relative: 0.0 0.0; to: "albumarmt_bg";} - rel2 { relative: 1.0 1.0; to: "albumarmt_bg";} - min: ALBUM_ART_SIZE; - image.normal: MC_MUSIC_ALBUM_FRAME; - color_class:"AO009"; + min: 32 0; + max: 32 -1; + fixed: 1 0; + rel1 { to: "close.button.area"; relative: 0.0 0.0; } + rel2 { to: "close.button.area"; relative: 0.0 1.0; } + align: 1.0 0.0; } } - - part { name: "right_area"; + part { name: "album.art.area"; type: SPACER; scale: 1; - mouse_events: 0; description { state: "default" 0.0; - rel1 { relative: 1.0 1.0; to_x: "albumarmt_bg"; to_y: "padding.top"; } - rel2 { relative: 0.0 0.0; to_x: "padding.right"; to_y: "padding.bottom"; } + min: 64 0; + max: 64 -1; + fixed: 1 1; + rel1 { to_x: "padding.left"; to_y: "content.area"; relative: 1.0 0.0; } + rel2 { to_x: "padding.left"; to_y: "content.area"; relative: 1.0 1.0; } align: 0.0 0.0; } } - - part { name: "elm.text"; // title + part { name: "album.art.swallow"; type: SWALLOW; - mouse_events: 1; scale: 1; description { state: "default" 0.0; - rel1 { relative: 0.0 1.0; to_x: "right_area"; to_y: "padding.top"; offset: 38 0;} - rel2 { relative: 0.83 1.0; to_x: "right_area"; to_y: "padding.top";} - min: 143 17; - fixed: 1 1; - align: 0.5 0.0; + min: 64 64; + max: 64 64; + rel.to: "album.art.area"; } } - - part { name: "close_btn_area"; - type: RECT; + part { name: "album.art.padding.right"; + type: SPACER; scale: 1; - mouse_events: 0; description { state: "default" 0.0; - rel1 { relative: 0.0 1.0; to_x: "padding.right"; to_y: "elm.text";offset: -25 1;} - rel2 { relative: 0.0 0.0; to_x: "padding.right"; to_y: "elm.text"; offset: -25 1;} - min: BUTTON_CLOSE_SIZE_MAX; - max: BUTTON_CLOSE_SIZE_MAX; - color: 255 0 0 0; - fixed: 1 1; - } - } - MC_IMAGE_PART("close_btn","close_btn_area",MC_MUSIC_CLOSE_BTN,61,185,204,255,61,185,204,255,BUTTON_CLOSE_SIZE_MAX) - part { name: "close_btn_touch_area"; - type: RECT; - scale: 1; - mouse_events: 1; - repeat_events: 1; - description { state: "default" 0.0; - rel1 { to: "close_btn_area"; offset: -7 -7; } - rel2 { to: "close_btn_area"; offset: 7 7; } - color: 0 0 0 0; - } - } - - part { name: "mid_padding"; - type: RECT; - mouse_events: 0; - scale: 1; - description - { state: "default" 0.0; - rel1 { relative: 0.0 1.0; to_x: "right_area"; to_y: "elm.text"; offset: 40 0; } - rel2 { relative: 1.0 1.0; to_x: "padding.right"; to_y: "elm.text"; offset: 0 0; } + min: 20 0; + max: 20 -1; + fixed: 1 0; + rel1 { to_x: "album.art.area"; to_y: "content.area"; relative: 1.0 0.0; } + rel2 { to_x: "album.art.area"; to_y: "content.area"; relative: 1.0 1.0; } align: 0.0 0.0; - color: 255 0 0 0; - } - } - - part { name: "button_area"; - type: RECT; - scale: 1; - description { state: "default" 0.0; - rel1 { relative: 0 1; to: "mid_padding";} - rel2 { relative: 1 0; to_x: "elm.text"; to_y: "padding.bottom"; } - visible: 1; - } - } - - part { name: "rew_btn_area"; - type: RECT; - scale: 1; - mouse_events: 1; - description { state: "default" 0.0; - rel1 { relative: 0.0 0.5; to: "button_area"; offset: 10 0;} - rel2 { relative: 0.0 0.5; to: "button_area"; offset: 10 -16;} - min: BUTTON_SIZE_MIN_MAX; - fixed: 1 1; - align: 0.0 0.5; - visible: 0; - } - } - - MC_IMAGE_PART("rew_btn_bg","rew_btn_area",MC_MUSIC_SMALL_BTN_BG,0,0,0,0,0,0,0,0,BUTTON_SIZE_MIN_MAX) - MC_IMAGE_PART("rew_btn_ef","rew_btn_area",MC_MUSIC_SMALL_BTN_EF,0,0,0,0,0,0,0,0,BUTTON_SIZE_MIN_MAX) - MC_IMAGE_PART("rew_btn","rew_btn_area",MC_MUSIC_PREV_BTN,61,185,204,255,34,104,115,255,FF_BTN_SIZE_MIN_MAX) - part { name: "rew_btn_touch_area"; - type: RECT; - scale: 1; - mouse_events: 1; - repeat_events: 1; - description { state: "default" 0.0; - rel1 { to: "rew_btn_area"; } - rel2 { to: "rew_btn_area";} - color: 0 0 0 0; } } - MC_FOCUSED_COVER("rew_btn", "rew_btn_area"); - - part { name: "play_pause_btn_area"; + part { name: "title.text.area"; type: SPACER; scale: 1; - mouse_events: 1; description { state: "default" 0.0; - rel1 { relative: 0.4 0.5; to: "button_area"; offset: 0 0;} - rel2 { relative: 0.4 0.5; to: "button_area"; offset: 0 -16; } - min: BUTTON_SIZE_MIN_MAX; - max: BUTTON_SIZE_MIN_MAX; - fixed: 1 1; - align:0.0 0.5; + min: 324 26; + max: 324 26; + rel1 { to_x: "album.art.padding.right"; to_y: "content.area"; relative: 1.0 0.0; } + rel2 { to_x: "album.art.padding.right"; to_y: "content.area"; relative: 1.0 1.0; } + align: 0.0 0.5; } } - - MC_IMAGE_PART("play_btn_bg","play_pause_btn_area",MC_MUSIC_LAGRE_BTN_BG,61,185,204,255,34,104,115,255,BIG_BTN_SIZE_MIN_MAX) - MC_IMAGE_PART_FOCUS("play_btn_ef","play_pause_btn_area",MC_MUSIC_LAGRE_BTN_EF,BIG_BTN_SIZE_MIN_MAX) - MC_IMAGE_PART("play_btn","play_pause_btn_area",MC_MUSIC_PLAY_BTN,255,255,255,255,255,255,255,255,PLAY_BTN_SIZE_MIN_MAX) - MC_IMAGE_PART("pause_btn","play_pause_btn_area",MC_MUSIC_PAUSE_BTN,255,255,255,255,255,255,255,255,PLAY_BTN_SIZE_MIN_MAX) - part { name: "play_btn_touch_area"; - type: RECT; - scale: 1; - mouse_events: 1; - repeat_events: 1; - description { state: "default" 0.0; - rel1 { to: "play_pause_btn_area"; } - rel2 { to: "play_pause_btn_area"; } - color: 0 0 0 0; - } - } - MC_FOCUSED_COVER("play_pause", "play_pause_btn_area"); - - part { name: "ff_btn_area"; - type: SPACER; + part { name: "title.text.swallow"; + type: SWALLOW; scale: 1; - mouse_events: 1; description { state: "default" 0.0; - rel1 { relative:0.8 0.5; to: "button_area";offset: -10 0;} - rel2 { relative:0.8 0.5; to: "button_area";offset: -10 -16;} - min: FF_BTN_SIZE_MIN_MAX; - max: FF_BTN_SIZE_MIN_MAX; - fixed: 1 1; - align:0.0 0.5; - } - } - MC_IMAGE_PART("ff_btn_bg","ff_btn_area",MC_MUSIC_SMALL_BTN_BG,0,0,0,0,0,0,0,0,BUTTON_SIZE_MIN_MAX) - MC_IMAGE_PART("ff_btn_ef","ff_btn_area",MC_MUSIC_SMALL_BTN_EF,0,0,0,0,0,0,0,0,BUTTON_SIZE_MIN_MAX) - MC_IMAGE_PART("ff_btn","ff_btn_area",MC_MUSIC_NEXT_BTN,61,185,204,255,34,104,115,255,FF_BTN_SIZE_MIN_MAX) - part { name: "ff_btn_touch_area"; - type: RECT; - scale: 1; - mouse_events: 1; - repeat_events: 1; - description { state: "default" 0.0; - rel1 { to: "ff_btn_area"; } - rel2 { to: "ff_btn_area";} - color: 0 0 0 0; - } - } - MC_FOCUSED_COVER("ff_btn", "ff_btn_area"); - } - - programs { - MC_PROGRAM_IMAGE_VISIBLE("play_btn", "show_play_btn", "hide_play_btn") - MC_PROGRAM_IMAGE_VISIBLE("pause_btn", "show_pause_btn", "hide_pause_btn") - - program { name: "albumart_cb"; - signal: "mouse,down,1"; - source: "albumart_image"; - script{ - emit("albumart_clicked", "edje"); - } - } - - program { name: "close_area_btn_down"; - signal: "mouse,down,1"; - source: "close_btn_touch_area"; - script{ - set_state(PART:"close_btn", "pressed", 0.0); - emit("close_btn_down", "edje"); - } - } - - program { name: "close_area_btn_up"; - signal: "mouse,up,1"; - source: "close_btn_touch_area"; - script{ - set_state(PART:"close_btn", "default", 0.0); - emit("close_btn_up", "edje"); - } - } - - program { name: "play_pause_btn_area_press"; - signal: "mouse,down,1"; - source: "play_btn_touch_area"; - script{ - set_state(PART:"play_btn_bg", "pressed", 0.0); - set_state(PART:"play_btn_ef", "pressed", 0.0); - } - } - - program { name: "play_pause_btn_area_up"; - signal: "mouse,up,1"; - source: "play_btn_touch_area"; - script{ - set_state(PART:"play_btn_bg", "default", 0.0); - set_state(PART:"play_btn_ef", "default", 0.0); - } - } - - program { name: "rew_btn_touch_area_press"; - signal: "mouse,down,1"; - source: "rew_btn_touch_area"; - script{ - set_state(PART:"rew_btn_bg", "pressed", 0.0); - set_state(PART:"rew_btn_ef", "pressed", 0.0); - set_state(PART:"rew_btn", "pressed", 0.0); - } - } - - program { name: "rew_btn_touch_area_up"; - signal: "mouse,up,1"; - source: "rew_btn_touch_area"; - script{ - set_state(PART:"rew_btn_bg", "default", 0.0); - set_state(PART:"rew_btn_ef", "default", 0.0); - set_state(PART:"rew_btn", "default", 0.0); - } - } - - program { name: "ff_btn_touch_area_press"; - signal: "mouse,down,1"; - source: "ff_btn_touch_area"; - script{ - set_state(PART:"ff_btn_bg", "pressed", 0.0); - set_state(PART:"ff_btn_ef", "pressed", 0.0); - set_state(PART:"ff_btn", "pressed", 0.0); - } - } - - program { name: "ff_btn_touch_area_up"; - signal: "mouse,up,1"; - source: "ff_btn_touch_area"; - script{ - set_state(PART:"ff_btn_bg", "default", 0.0); - set_state(PART:"ff_btn_ef", "default", 0.0); - set_state(PART:"ff_btn", "default", 0.0); - } - } - - program { name: "close_area_btn_clicked"; - signal: "mouse,clicked,1"; - source: "close_btn_touch_area"; - script{ - emit("close_btn_clicked", "edje"); - } - } -/* - program{ - name: "albumart_cb_after_down"; - source: "albumart_image"; - signal: "mouse,down,1"; - transition: ACCELERATE 0.02; - } - program { - name: "albumart_cb_down"; - source: "albumart_image"; - signal: "mouse,down,1"; - action: PLAY_SAMPLE "button-pressed" 1.0; - after: "albumart_cb_after_down"; - transition: ACCELERATE 0.02; - }*/ - - program { name: "set_pause_icon"; - signal: "set_pause"; - source: "*"; - script{ - set_state(PART:"play_btn", "hide", 0.0); - set_state(PART:"pause_btn", "default",0.0); - set_state(PART:"play_btn_ef", "focus", 0.0); - } - } - program { name: "set_play_icon"; - signal: "set_play"; - source: "*"; - script{ - set_state(PART:"play_btn", "default", 0.0); - set_state(PART:"pause_btn", "hide",0.0); - set_state(PART:"play_btn_ef", "default", 0.0); - } - } - program { name: "set_ff_btn_uppressed"; - signal: "ff_btn_unpressed"; - source: "*"; - script{ - set_state(PART:"ff_btn_bg", "default", 0.0); - set_state(PART:"ff_btn_ef", "default", 0.0); - set_state(PART:"ff_btn", "default", 0.0); - } - } - program { name: "set_rew_btn_uppressed"; - signal: "rew_btn_unpressed"; - source: "*"; - script{ - set_state(PART:"rew_btn_bg", "default", 0.0); - set_state(PART:"rew_btn_ef", "default", 0.0); - set_state(PART:"rew_btn", "default", 0.0); - } - } -/* - program { name: "touch_snd_rew"; - signal: "mouse,down,1"; - source: "rew_btn_touch_area"; - action: RUN_PLUGIN "touch_sound_plugin"; - } - - program { name: "touch_snd_ff"; - signal: "mouse,down,1"; - source: "ff_btn_touch_area"; - action: RUN_PLUGIN "touch_sound_plugin"; - } - program { name: "touch_snd_play_pause"; - signal: "mouse,down,1"; - source: "play_btn_touch_area"; - action: RUN_PLUGIN "touch_sound_plugin"; - } - program { name: "touch_snd_shuffle"; - signal: "mouse,down,1"; - source: "shuffle_btn_touch_area"; - action: RUN_PLUGIN "touch_sound_plugin"; - } - program { name: "touch_snd_close"; - signal: "mouse,down,1"; - source: "close_btn_touch_area"; - action: RUN_PLUGIN "touch_sound_plugin"; - } - program { name: "touch_snd_repeat"; - signal: "mouse,down,1"; - source: "repeat_btn_touch_area"; - action: RUN_PLUGIN "touch_sound_plugin"; - } -*/ - } - -} - -group { - name: "video-minicontroller-live-streaming"; - images { - image: MC_MUSIC_LAGRE_BTN_EF COMP; - image: MC_MUSIC_LAGRE_BTN_BG COMP; - image: MC_MUSIC_PLAY_BTN COMP; - image: MC_MUSIC_STOP_BTN COMP; - image: MC_MUSIC_SMALL_BTN_EF COMP; - image: MC_MUSIC_SMALL_BTN_BG COMP; - image: MC_MUSIC_CLOSE_BTN COMP; - image: MC_MUSIC_ALBUM_FRAME COMP; - } - parts { - part{ name: "bg"; - type : RECT; - scale : 1; - mouse_events: 0; - description { - state: "default" 0.0; - min : 0 MINI_H_PORT; - fixed: 1 1; - rel1{ relative : 0 0;} - rel2{ relative : 1 1;} - color: MC_BG; - } - } - - part { name: "event_box"; - type : SWALLOW; - mouse_events: 1; - scale: 1; - description { - state: "default" 0.0; - rel1 { - relative: 0 0; - to: "bg"; - } - rel2 { - relative: 1 1; - to: "bg"; - } + rel.to: "title.text.area"; + rel1.relative: 0.0 0.0; + rel2.relative: 1.0 1.0; + align: 0.0 0.0; } } - - part { name: "padding.top"; + part { name: "playback.panel.padding.left"; type: SPACER; scale: 1; - mouse_events: 0; description { state: "default" 0.0; - rel1 { relative: 0 0; to: "bg"; } - rel2 { relative: 1 0; to: "bg"; } - min: 0 TOP_PADDING; - fixed: 0 1; - align: 0 0; - } - } - - part { name: "padding.left"; - type: SPACER; scale: 1; - mouse_events: 0; - description { state: "default" 0.0; - rel1 { relative: 0 0; to: "bg"; } - rel2 { relative: 0 1; to: "bg"; } - min: LEFT_PADDING 0; + min: 60 0; + max: 60 -1; fixed: 1 0; - align: 0 0; + rel1 { to_x: "title.text.area"; to_y: "content.area"; relative: 1.0 0.0; } + rel2 { to_x: "title.text.area"; to_y: "content.area"; relative: 1.0 1.0; } + align: 0.0 0.0; } } - - part { name: "padding.right"; + part { name: "playback.area"; type: SPACER; scale: 1; - mouse_events: 0; description { state: "default" 0.0; - rel1 { relative: 1 0; to: "bg"; } - rel2 { relative: 1 1; to: "bg"; } - min: RIGHT_PADDING 0; + min: 184 0; + max: 184 -1; fixed: 1 0; - align: 1 0; + rel1 { to_x: "playback.panel.padding.left"; to_y: "content.area"; relative: 1.0 0.0; } + rel2 { to_x: "playback.panel.padding.left"; to_y: "content.area"; relative: 1.0 1.0; } + align: 0.0 0.0; } } - - part { name: "padding.bottom"; - type: SPACER; + part { name: "prev.button.swallow"; + type: SWALLOW; scale: 1; - mouse_events: 0; description { state: "default" 0.0; - rel1 { relative: 0 1; to: "bg"; } - rel2 { relative: 1 1; to: "bg"; } - min: 0 BOTTOM_PADDING; - fixed: 0 1; - align: 0 1; + min: 48 48; + max: 48 48; + fixed: 1 1; + rel1 { to: "playback.area"; relative: 0.0 0.0; } + rel2 { to: "playback.area"; relative: 0.0 1.0; } + align: 0.0 0.5; } } - - part { name: "padding_for_albumart.top"; + part { name: "play.pause.padding.left"; type: SPACER; scale: 1; - description { - state: "default" 0.0; - rel1 { relative: 0 0; to: "bg"; } - rel2 { relative: 1 0; to: "bg"; } - min: 0 15; - fixed: 0 1; + description { state: "default" 0.0; + min: 20 0; + max: 20 -1; + fixed: 1 0; + rel1 { to_x: "prev.button.swallow"; to_y: "playback.area"; relative: 1.0 0.0; } + rel2 { to_x: "prev.button.swallow"; to_y: "playback.area"; relative: 1.0 1.0; } align: 0.0 0.0; } } - - part { name: "padding_for_albumart.bottom"; - type: SPACER; + part { name: "play.pause.swallow"; + type: SWALLOW; scale: 1; description { state: "default" 0.0; - rel1 { relative: 0 1; to: "bg"; } - rel2 { relative: 1 1; to: "bg"; } - min: 0 15; - fixed: 0 1; - align: 0 1; + min: 48 48; + max: 48 48; + fixed: 1 1; + rel1 { to_x: "play.pause.padding.left"; to_y: "playback.area"; relative: 1.0 0.0; } + rel2 { to_x: "play.pause.padding.left"; to_y: "playback.area"; relative: 1.0 1.0; } + align: 0.0 0.5; } } - - part { name: "albumarmt_bg"; - type: RECT; + part { name: "play.pause.padding.right"; + type: SPACER; scale: 1; - mouse_events: 0; description { state: "default" 0.0; - rel1 { relative: 1.0 1.0; to_x: "padding.left"; to_y: "padding_for_albumart.top"; } - rel2 { relative: 1.0 0.0; to_x: "padding.left"; to_y: "padding_for_albumart.bottom"; } - min: ALBUM_ART_SIZE; - max: ALBUM_ART_SIZE; - fixed: 1 1; - align: 0.0 0.5; + min: 20 0; + max: 20 -1; + fixed: 1 0; + rel1 { to_x: "play.pause.swallow"; to_y: "playback.area"; relative: 1.0 0.0; } + rel2 { to_x: "play.pause.swallow"; to_y: "playback.area"; relative: 1.0 1.0; } + align: 0.0 0.0; } } - - part { name: "albumart_image"; + part { name: "next.button.swallow"; type: SWALLOW; scale: 1; - mouse_events: 1; - clip_to: "albumarmt_bg"; description { state: "default" 0.0; - rel1 { relative: 0.5 0.5; to: "albumarmt_bg"; } - rel2 { relative: 0.5 0.5; to: "albumarmt_bg"; } - min: ALBUM_ART_SIZE; - max: ALBUM_ART_SIZE; + min: 48 48; + max: 48 48; fixed: 1 1; - align: 0.5 0.5; + rel1 { to_x: "play.pause.padding.right"; to_y: "playback.area"; relative: 1.0 0.0; } + rel2 { to_x: "play.pause.padding.right"; to_y: "playback.area"; relative: 1.0 1.0; } + align: 0.0 0.5; } } - - part { name: "albumarmt_frame"; - type: IMAGE; + part { name: "playback.panel.padding.right"; + type: SPACER; scale: 1; - mouse_events: 0; description { state: "default" 0.0; - rel1 { relative: 0.0 0.0; to: "albumarmt_bg";} - rel2 { relative: 1.0 1.0; to: "albumarmt_bg";} - min: ALBUM_ART_SIZE; - image.normal: MC_MUSIC_ALBUM_FRAME; - color_class:"AO009"; + min: 60 0; + max: 60 -1; + fixed: 1 0; + rel1 { to_x: "playback.area"; to_y: "content.area"; relative: 1.0 0.0; } + rel2 { to_x: "playback.area"; to_y: "content.area"; relative: 1.0 1.0; } + align: 0.0 0.0; } } - - part { name: "right_area"; + part { name: "playback.slider.area"; type: SPACER; scale: 1; - mouse_events: 0; description { state: "default" 0.0; - rel1 { relative: 1.0 1.0; to_x: "albumarmt_bg"; to_y: "padding.top"; } - rel2 { relative: 0.0 0.0; to_x: "padding.right"; to_y: "padding.bottom"; } + rel1 { to: "playback.panel.padding.right"; relative: 1.0 0.0; } + rel2 { to: "close.padding.left.padding"; relative: 0.0 1.0; } align: 0.0 0.0; } } - - part { name: "elm.text"; // title + part { name: "slider.swallow"; type: SWALLOW; - mouse_events: 1; scale: 1; + mouse_events: 1; description { state: "default" 0.0; - rel1 { relative: 0.0 1.0; to_x: "right_area"; to_y: "padding.top"; offset: 38 0;} - rel2 { relative: 0.83 1.0; to_x: "right_area"; to_y: "padding.top";} - min: 143 17; - fixed: 1 1; - align: 0.5 0.0; + min: 368 32; + max: 368 32; + rel.to: "playback.slider.area"; } } - - part { name: "close_btn_area"; - type: RECT; + part { name: "slider.text.left"; + type: TEXTBLOCK; scale: 1; - mouse_events: 0; description { state: "default" 0.0; - rel1 { relative: 0.0 1.0; to_x: "padding.right"; to_y: "elm.text";offset: -25 1;} - rel2 { relative: 0.0 0.0; to_x: "padding.right"; to_y: "elm.text"; offset: -25 1;} - min: BUTTON_CLOSE_SIZE_MAX; - max: BUTTON_CLOSE_SIZE_MAX; - color: 255 0 0 0; - fixed: 1 1; - } - } - MC_IMAGE_PART("close_btn","close_btn_area",MC_MUSIC_CLOSE_BTN,61,185,204,255,61,185,204,255,BUTTON_CLOSE_SIZE_MAX) - part { name: "close_btn_touch_area"; - type: RECT; - scale: 1; - mouse_events: 1; - repeat_events: 1; - description { state: "default" 0.0; - rel1 { to: "close_btn_area"; offset: -7 -7; } - rel2 { to: "close_btn_area"; offset: 7 7; } - color: 0 0 0 0; - } - } - - part { name: "mid_padding"; - type: RECT; - mouse_events: 0; - scale: 1; - description - { state: "default" 0.0; - rel1 { relative: 0.0 1.0; to_x: "right_area"; to_y: "elm.text"; offset: 40 0; } - rel2 { relative: 1.0 1.0; to_x: "padding.right"; to_y: "elm.text"; offset: 0 0; } + min: 120 22; + max: 120 22; + rel1 { to: "slider.swallow"; relative: 0.0 1.0; } + rel2 { to: "slider.swallow"; relative: 0.0 1.0; } align: 0.0 0.0; - color: 255 0 0 0; - } - } - - part { name: "button_area"; - type: RECT; - scale: 1; - description { state: "default" 0.0; - rel1 { relative: 0 1; to: "mid_padding";} - rel2 { relative: 1 0; to_x: "elm.text"; to_y: "padding.bottom"; } - visible: 1; + text { + style: "mini_controller_current_duration_text"; + } } } - - part { name: "play_pause_btn_area"; - type: SPACER; + part { name: "slider.text.right"; + type: TEXTBLOCK; scale: 1; - mouse_events: 1; description { state: "default" 0.0; - rel1 { relative: 0.4 0.5; to: "button_area"; offset: 0 0;} - rel2 { relative: 0.4 0.5; to: "button_area"; offset: 0 -16; } - min: BUTTON_SIZE_MIN_MAX; - max: BUTTON_SIZE_MIN_MAX; - fixed: 1 1; - align:0.0 0.5; - } - } - - MC_IMAGE_PART("play_btn_bg","play_pause_btn_area",MC_MUSIC_LAGRE_BTN_BG,61,185,204,255,34,104,115,255,BIG_BTN_SIZE_MIN_MAX) - MC_IMAGE_PART_FOCUS("play_btn_ef","play_pause_btn_area",MC_MUSIC_LAGRE_BTN_EF,BIG_BTN_SIZE_MIN_MAX) - MC_IMAGE_PART("play_btn","play_pause_btn_area",MC_MUSIC_PLAY_BTN,255,255,255,255,255,255,255,255,PLAY_BTN_SIZE_MIN_MAX) - MC_IMAGE_PART("pause_btn","play_pause_btn_area",MC_MUSIC_STOP_BTN,255,255,255,255,255,255,255,255,PLAY_BTN_SIZE_MIN_MAX) - part { name: "play_btn_touch_area"; - type: RECT; - scale: 1; - mouse_events: 1; - repeat_events: 1; - description { state: "default" 0.0; - rel1 { to: "play_pause_btn_area"; } - rel2 { to: "play_pause_btn_area"; } - color: 0 0 0 0; + min: 120 22; + max: 120 22; + rel1 { to: "slider.swallow"; relative: 1.0 1.0; } + rel2 { to: "slider.swallow"; relative: 1.0 1.0; } + align: 1.0 0.0; + text { + style: "mini_controller_total_duration_text"; } + } } - MC_FOCUSED_COVER("play_pause", "play_pause_btn_area"); } - programs { - MC_PROGRAM_IMAGE_VISIBLE("play_btn", "show_play_btn", "hide_play_btn") - MC_PROGRAM_IMAGE_VISIBLE("pause_btn", "show_pause_btn", "hide_pause_btn") - - program { name: "albumart_cb"; - signal: "mouse,down,1"; - source: "albumart_image"; - script{ - emit("albumart_clicked", "edje"); - } - } - - program { name: "close_area_btn_down"; - signal: "mouse,down,1"; - source: "close_btn_touch_area"; - script{ - set_state(PART:"close_btn", "pressed", 0.0); - emit("close_btn_down", "edje"); - } - } - - program { name: "close_area_btn_up"; - signal: "mouse,up,1"; - source: "close_btn_touch_area"; - script{ - set_state(PART:"close_btn", "default", 0.0); - emit("close_btn_up", "edje"); - } + program { name: "close_button_clicked"; + signal: "mouse,down,1"; + source: "close.button.bg"; + action: SIGNAL_EMIT "close,button,clicked" "vp_edje"; } - - program { name: "play_pause_btn_area_press"; - signal: "mouse,down,1"; - source: "play_btn_touch_area"; - script{ - set_state(PART:"play_btn_bg", "pressed", 0.0); - set_state(PART:"play_btn_ef", "pressed", 0.0); - } + program { name: "album_art_clicked"; + signal: "mouse,down,1"; + source: "album.art.swallow"; + action: SIGNAL_EMIT "album,art,clicked" "vp_edje"; } - - program { name: "play_pause_btn_area_up"; - signal: "mouse,up,1"; - source: "play_btn_touch_area"; - script{ - set_state(PART:"play_btn_bg", "default", 0.0); - set_state(PART:"play_btn_ef", "default", 0.0); - } - } - - program { name: "close_area_btn_clicked"; - signal: "mouse,clicked,1"; - source: "close_btn_touch_area"; - script{ - emit("close_btn_clicked", "edje"); - } - } - - program { name: "set_pause_icon"; - signal: "set_pause"; - source: "*"; - script{ - set_state(PART:"play_btn", "hide", 0.0); - set_state(PART:"pause_btn", "default",0.0); - set_state(PART:"play_btn_ef", "focus", 0.0); - } - } - program { name: "set_play_icon"; - signal: "set_play"; - source: "*"; - script{ - set_state(PART:"play_btn", "default", 0.0); - set_state(PART:"pause_btn", "hide",0.0); - set_state(PART:"play_btn_ef", "default", 0.0); - } - } - } -} - -group { - name: "video-minicontroller-ld"; - images { - image: MC_MUSIC_LAGRE_BTN_EF COMP; - image: MC_MUSIC_LAGRE_BTN_BG COMP; - image: MC_MUSIC_PLAY_BTN COMP; - image: MC_MUSIC_PAUSE_BTN COMP; - image: MC_MUSIC_SMALL_BTN_EF COMP; - image: MC_MUSIC_SMALL_BTN_BG COMP; - - image: MC_MUSIC_CLOSE_BTN COMP; - image: MC_MUSIC_PREV_BTN COMP; - image: MC_MUSIC_NEXT_BTN COMP; - } - parts { - part{ name: "bg"; - type : RECT; - scale : 1; - mouse_events: 0; - description { - state: "default" 0.0; - min : 0 MINI_H; - fixed: 1 1; - rel1{ relative : 0 0;} - rel2{ relative : 1 1;} - color: MC_BG; - } - } - - part { name: "padding.top"; - type: SPACER; - scale: 1; - mouse_events: 0; - description { state: "default" 0.0; - rel1 { relative: 0 0; to: "bg"; } - rel2 { relative: 1 0; to: "bg"; } - min: 0 TOP_PADDING; - fixed: 0 1; - align: 0 0; - } - } - - part { name: "padding.left"; - type: SPACER; - scale: 1; - mouse_events: 0; - description { state: "default" 0.0; - rel1 { relative: 0 0; to: "bg"; } - rel2 { relative: 0 1; to: "bg"; } - min: LEFT_PADDING 0; - fixed: 1 0; - align: 0 0; - } - } - - part { name: "padding.right"; - type: SPACER; - scale: 1; - mouse_events: 0; - description { state: "default" 0.0; - rel1 { relative: 1 0; to: "bg"; } - rel2 { relative: 1 1; to: "bg"; } - min: RIGHT_PADDING 0; - fixed: 1 0; - align: 1 0; - } - } - - part { name: "padding.bottom"; - type: SPACER; - scale: 1; - mouse_events: 0; - description { state: "default" 0.0; - rel1 { relative: 0 1; to: "bg"; } - rel2 { relative: 1 1; to: "bg"; } - min: 0 BOTTOM_PADDING; - fixed: 0 1; - align: 0 1; - } - } - - part { name: "padding_for_albumart.top"; - type: SPACER; - scale: 1; - description { state: "default" 0.0; - rel2 { relative: 1.0 0.0; } - min: 0 7; - fixed: 0 1; - align: 0.0 0.0; - } - } - - part { name: "padding_for_albumart.bottom"; - type: SPACER; - scale: 1; - description { state: "default" 0.0; - rel1 { relative: 0 1; to: "bg"; } - rel2 { relative: 1 1; to: "bg"; } - min: 0 7; - fixed: 0 1; - align: 0 1; - } - } - - part { name: "albumarmt_bg"; - type: RECT; - scale: 1; - mouse_events: 0; - description { state: "default" 0.0; - rel1 { relative: 1.0 1.0; to_x: "padding.left"; to_y: "padding_for_albumart.top"; } - rel2 { relative: 1.0 0.0; to_x: "padding.left"; to_y: "padding_for_albumart.bottom"; } - min: ALBUM_ART_SIZE; - max: ALBUM_ART_SIZE; - fixed: 1 1; - align: 0.0 0.5; - } - } - part { name: "albumart_image"; - type: SWALLOW; - scale: 1; - mouse_events: 1; - clip_to: "albumarmt_bg"; - description { state: "default" 0.0; - rel1 { relative: 0.5 0.5; to: "albumarmt_bg"; } - rel2 { relative: 0.5 0.5; to: "albumarmt_bg"; } - min: ALBUM_ART_SIZE; - max: ALBUM_ART_SIZE; - fixed: 1 1; - align: 0.5 0.5; - } - } - part { name: "albumarmt_frame"; - type: IMAGE; - scale: 1; - mouse_events: 0; - description { state: "default" 0.0; - rel1 { relative: 0.0 0.0; to: "albumarmt_bg";} - rel2 { relative: 1.0 1.0; to: "albumarmt_bg";} - min: ALBUM_ART_SIZE; - image.normal: MC_MUSIC_ALBUM_FRAME; - color_class:"AO009"; - } - } - - part { name: "right_area"; - type: RECT; - scale: 1; - mouse_events: 0; - description { state: "default" 0.0; - rel1 { relative: 1.0 1.0; to_x: "albumarmt_bg"; to_y: "padding.top"; } - rel2 { relative: 0.0 0.0; to_x: "padding.right"; to_y: "padding.bottom"; } - align: 0.0 0.0; - color:0 255 0 0; - } - } - part { name: "elm.text"; // title - type: SWALLOW; - mouse_events: 1; - scale: 1; - description { state: "default" 0.0; - rel1 { relative: 0.1 1.0; to_x: "right_area"; to_y: "padding.top";} - rel2 { relative: 290/329 1.0; to_x: "right_area"; to_y: "padding.top";} - fixed: 1 1; - align: 0.5 0.0; - } - } - - part { name: "mid_padding"; - type: RECT; - mouse_events: 0; - scale: 1; - description - { state: "default" 0.0; - //min: 323 3; - //max: 323 3; - fixed: 1 1; - rel1 { relative: 0.0 1.0; to_x: "right_area"; to_y: "elm.text"; offset: 40 0; } - rel2 { relative: 1.0 1.0; to_x: "right_area"; to_y: "elm.text"; } - fixed: 1 1; - align: 0.0 0.0; - color: 255 0 0 0; - } - } - - part { name: "close_btn_area"; - type: SPACER; - scale: 1; - mouse_events: 1; - description { state: "default" 0.0; - rel1 { relative: 0.0 0.0; to_x: "padding.right"; to_y: "elm.text";offset: -30 15;} - rel2 { relative: 0.0 0.0; to: "padding.right";to_y: "elm.text"; offset: -30 15;} - min: BUTTON_CLOSE_SIZE_MAX; - max: BUTTON_CLOSE_SIZE_MAX; - fixed: 1 1; - } - } - MC_IMAGE_PART("close_btn","close_btn_area",MC_MUSIC_CLOSE_BTN,61,185,204,255,61,185,204,255,BUTTON_CLOSE_SIZE_MAX) - part { name: "close_btn_touch_area"; - type: RECT; - scale: 1; - mouse_events: 1; - repeat_events: 1; - description { - state: "default" 0.0; - rel1 { to: "close_btn_area"; offset: -7 -7;} - rel2 { to: "close_btn_area"; offset: 7 7;} - color: 0 0 0 0; - } - } - - part { name: "button_area"; - type: RECT; - scale: 1; - description { state: "default" 0.0; - rel1 { relative: 0 1; to_x:"elm.text"; to_y: "mid_padding";} - rel2 { relative: 1 0; to_x: "elm.text"; to_y: "padding.bottom"; } - visible: 1; - color: 0 255 0 0; - } - } - - part { name: "rew_btn_area"; - type: RECT; - scale: 1; - mouse_events: 1; - description { state: "default" 0.0; - rel1 { relative: 0.2 0.5; to: "button_area"; offset: 10 0;} - rel2 { relative: 0.2 0.5; to: "button_area"; offset: 10 -16;} - min: BUTTON_SIZE_MIN_MAX; - fixed: 1 1; - align: 0.0 0.5; - visible: 0; - } - } - - - MC_IMAGE_PART("rew_btn_bg","rew_btn_area",MC_MUSIC_SMALL_BTN_BG,0,0,0,0,0,0,0,0,BUTTON_SIZE_MIN_MAX) - MC_IMAGE_PART("rew_btn_ef","rew_btn_area",MC_MUSIC_SMALL_BTN_EF,0,0,0,0,0,0,0,0,BUTTON_SIZE_MIN_MAX) - MC_IMAGE_PART("rew_btn","rew_btn_area",MC_MUSIC_PREV_BTN,61,185,204,255,34,104,115,255,FF_BTN_SIZE_MIN_MAX) - part { name: "rew_btn_touch_area"; - type: RECT; - scale: 1; - mouse_events: 1; - repeat_events: 1; - description { state: "default" 0.0; - rel1 { to: "rew_btn_area"; } - rel2 { to: "rew_btn_area";} - color: 0 0 0 0; - } - } - MC_FOCUSED_COVER("rew_btn", "rew_btn_area"); - - - - part { name: "play_pause_btn_area"; - type: SPACER; - scale: 1; - mouse_events: 1; - description { state: "default" 0.0; - rel1 { relative: 0.5 0.5; to: "button_area";offset: 0 0;} - rel2 { relative: 0.5 0.5; to: "button_area";offset: 0 -16;} - min: PLAY_BTN_SIZE_MIN_MAX; - max: PLAY_BTN_SIZE_MIN_MAX; - fixed: 1 1; - } - } - - - MC_IMAGE_PART("play_btn_bg","play_pause_btn_area",MC_MUSIC_LAGRE_BTN_BG,61,185,204,255,34,104,115,255,BIG_BTN_SIZE_MIN_MAX) - MC_IMAGE_PART_FOCUS("play_btn_ef","play_pause_btn_area",MC_MUSIC_LAGRE_BTN_EF,BIG_BTN_SIZE_MIN_MAX) - MC_IMAGE_PART("play_btn","play_pause_btn_area",MC_MUSIC_PLAY_BTN,255,255,255,255,255,255,255,255,PLAY_BTN_SIZE_MIN_MAX) - MC_IMAGE_PART("pause_btn","play_pause_btn_area",MC_MUSIC_PAUSE_BTN,255,255,255,255,255,255,255,255,PLAY_BTN_SIZE_MIN_MAX) - part { name: "play_btn_touch_area"; - type: RECT; - scale: 1; - mouse_events: 1; - repeat_events: 1; - description { state: "default" 0.0; - rel1 { to: "play_pause_btn_area"; } - rel2 { to: "play_pause_btn_area";} - color: 0 0 0 0; - fixed: 1 1; - } - } - MC_FOCUSED_COVER("play_pause", "play_pause_btn_area"); - - - part { name: "ff_btn_area"; - type: SPACER; - scale: 1; - mouse_events: 1; - description { state: "default" 0.0; - rel1 { relative: 0.7 0.5; to: "button_area";offset: -10 0;} - rel2 { relative: 0.7 0.5; to: "button_area";offset: -10 -16;} - min: FF_BTN_SIZE_MIN_MAX; - max: FF_BTN_SIZE_MIN_MAX; - fixed: 1 1; - align:0.0 0.5; - } - } - - MC_IMAGE_PART("ff_btn_bg","ff_btn_area",MC_MUSIC_SMALL_BTN_BG,0,0,0,0,0,0,0,0,BUTTON_SIZE_MIN_MAX) - MC_IMAGE_PART("ff_btn_ef","ff_btn_area",MC_MUSIC_SMALL_BTN_EF,0,0,0,0,0,0,0,0,BUTTON_SIZE_MIN_MAX) - MC_IMAGE_PART("ff_btn","ff_btn_area",MC_MUSIC_NEXT_BTN,61,185,204,255,34,104,115,255,FF_BTN_SIZE_MIN_MAX) - part { name: "ff_btn_touch_area"; - type: RECT; - scale: 1; - mouse_events: 1; - repeat_events: 1; - description { state: "default" 0.0; - rel1 { to: "ff_btn_area"; } - rel2 { to: "ff_btn_area";} - color: 0 0 0 0; - fixed: 1 1; - } - } - MC_FOCUSED_COVER("ff_btn", "ff_btn_area"); - } - - programs { - - MC_PROGRAM_IMAGE_VISIBLE("play_btn", "show_play_btn", "hide_play_btn") - MC_PROGRAM_IMAGE_VISIBLE("pause_btn", "show_pause_btn", "hide_pause_btn") - - program { name: "play_pause_btn_area_press"; - signal: "mouse,down,1"; - source: "play_btn_touch_area"; - script{ - set_state(PART:"play_btn_bg", "pressed", 0.0); - set_state(PART:"play_btn_ef", "pressed", 0.0); - } - } - - program { name: "play_pause_btn_area_up"; - signal: "mouse,up,1"; - source: "play_btn_touch_area"; - script{ - set_state(PART:"play_btn_bg", "default", 0.0); - set_state(PART:"play_btn_ef", "default", 0.0); - } - } - - program { name: "rew_btn_touch_area_press"; - signal: "mouse,down,1"; - source: "rew_btn_touch_area"; - script{ - set_state(PART:"rew_btn_bg", "pressed", 0.0); - set_state(PART:"rew_btn_ef", "pressed", 0.0); - set_state(PART:"rew_btn", "pressed", 0.0); - } - } - - program { name: "rew_btn_touch_area_up"; - signal: "mouse,up,1"; - source: "rew_btn_touch_area"; - script{ - set_state(PART:"rew_btn_bg", "default", 0.0); - set_state(PART:"rew_btn_ef", "default", 0.0); - set_state(PART:"rew_btn", "default", 0.0); - } - } - - program { name: "ff_btn_touch_area_press"; - signal: "mouse,down,1"; - source: "ff_btn_touch_area"; - script{ - set_state(PART:"ff_btn_bg", "pressed", 0.0); - set_state(PART:"ff_btn_ef", "pressed", 0.0); - set_state(PART:"ff_btn", "pressed", 0.0); - } - } - - program { name: "ff_btn_touch_area_up"; - signal: "mouse,up,1"; - source: "ff_btn_touch_area"; - script{ - set_state(PART:"ff_btn_bg", "default", 0.0); - set_state(PART:"ff_btn_ef", "default", 0.0); - set_state(PART:"ff_btn", "default", 0.0); - } - } - - program { name: "albumart_cb"; - signal: "mouse,down,1"; - source: "albumart_image"; - script{ - emit("albumart_clicked", "edje"); - } - } - /* - program{ - name: "albumart_cb_after_down"; - source: "albumart_image"; - signal: "mouse,down,1"; - transition: ACCELERATE 0.02; - } - program { - name: "albumart_cb_down"; - source: "albumart_image"; - signal: "mouse,down,1"; - action: PLAY_SAMPLE "button-pressed" 1.0; - after: "albumart_cb_after_down"; - transition: ACCELERATE 0.02; - } -*/ - program { name: "close_area_btn_down"; - signal: "mouse,down,1"; - source: "close_btn_touch_area"; - script{ - set_state(PART:"close_btn", "pressed", 0.0); - emit("close_btn_down", "edje"); - } - } - - program { name: "close_area_btn_up"; - signal: "mouse,up,1"; - source: "close_btn_touch_area"; - script{ - set_state(PART:"close_btn", "default", 0.0); - emit("close_btn_up", "edje"); - } - } - - program { name: "close_area_btn_clicked"; - signal: "mouse,up,1"; - source: "close_btn_touch_area"; - script{ - emit("close_btn_clicked", "edje"); - } - } - - program { name: "set_pause_icon"; - signal: "set_pause"; - source: "*"; - script{ - set_state(PART:"play_btn", "hide", 0.0); - set_state(PART:"pause_btn", "default",0.0); - set_state(PART:"play_btn_ef", "focus", 0.0); - } - } - program { name: "set_play_icon"; - signal: "set_play"; - source: "*"; - script{ - set_state(PART:"play_btn", "default", 0.0); - set_state(PART:"pause_btn", "hide",0.0); - set_state(PART:"play_btn_ef", "default", 0.0); - } - } - - program { name: "set_ff_btn_uppressed"; - signal: "ff_btn_unpressed"; - source: "*"; - script{ - set_state(PART:"ff_btn_bg", "default", 0.0); - set_state(PART:"ff_btn_ef", "default", 0.0); - set_state(PART:"ff_btn", "default", 0.0); - } - } - program { name: "set_rew_btn_uppressed"; - signal: "rew_btn_unpressed"; - source: "*"; - script{ - set_state(PART:"rew_btn_bg", "default", 0.0); - set_state(PART:"rew_btn_ef", "default", 0.0); - set_state(PART:"rew_btn", "default", 0.0); - } - } - /* - program { name: "touch_snd_rew"; - signal: "mouse,down,1"; - source: "rew_btn_touch_area"; - action: RUN_PLUGIN "touch_sound_plugin"; - } - - program { name: "touch_snd_ff"; - signal: "mouse,down,1"; - source: "ff_btn_touch_area"; - action: RUN_PLUGIN "touch_sound_plugin"; - } - program { name: "touch_snd_play_pause"; - signal: "mouse,down,1"; - source: "play_btn_touch_area"; - action: RUN_PLUGIN "touch_sound_plugin"; - } - program { name: "touch_snd_shuffle"; - signal: "mouse,down,1"; - source: "shuffle_btn_touch_area"; - action: RUN_PLUGIN "touch_sound_plugin"; - } - program { name: "touch_snd_close"; - signal: "mouse,down,1"; - source: "close_btn_touch_area"; - action: RUN_PLUGIN "touch_sound_plugin"; - } - program { name: "touch_snd_repeat"; - signal: "mouse,down,1"; - source: "repeat_btn_touch_area"; - action: RUN_PLUGIN "touch_sound_plugin"; - } -*/ - } -} - -group { - name: "video-minicontroller-live-streaming-ld"; - images { - image: MC_MUSIC_LAGRE_BTN_EF COMP; - image: MC_MUSIC_LAGRE_BTN_BG COMP; - image: MC_MUSIC_PLAY_BTN COMP; - image: MC_MUSIC_STOP_BTN COMP; - image: MC_MUSIC_SMALL_BTN_EF COMP; - image: MC_MUSIC_SMALL_BTN_BG COMP; - image: MC_MUSIC_CLOSE_BTN COMP; - } - parts { - part{ name: "bg"; - type : RECT; - scale : 1; - mouse_events: 0; - description { - state: "default" 0.0; - min : 0 MINI_H; - fixed: 1 1; - rel1{ relative : 0 0;} - rel2{ relative : 1 1;} - color: MC_BG; - } - } - - part { name: "padding.top"; - type: SPACER; - scale: 1; - mouse_events: 0; - description { state: "default" 0.0; - rel1 { relative: 0 0; to: "bg"; } - rel2 { relative: 1 0; to: "bg"; } - min: 0 TOP_PADDING; - fixed: 0 1; - align: 0 0; - } - } - - part { name: "padding.left"; - type: SPACER; - scale: 1; - mouse_events: 0; - description { state: "default" 0.0; - rel1 { relative: 0 0; to: "bg"; } - rel2 { relative: 0 1; to: "bg"; } - min: LEFT_PADDING 0; - fixed: 1 0; - align: 0 0; - } - } - - part { name: "padding.right"; - type: SPACER; - scale: 1; - mouse_events: 0; - description { state: "default" 0.0; - rel1 { relative: 1 0; to: "bg"; } - rel2 { relative: 1 1; to: "bg"; } - min: RIGHT_PADDING 0; - fixed: 1 0; - align: 1 0; - } - } - - part { name: "padding.bottom"; - type: SPACER; - scale: 1; - mouse_events: 0; - description { state: "default" 0.0; - rel1 { relative: 0 1; to: "bg"; } - rel2 { relative: 1 1; to: "bg"; } - min: 0 BOTTOM_PADDING; - fixed: 0 1; - align: 0 1; - } - } - - part { name: "padding_for_albumart.top"; - type: SPACER; - scale: 1; - description { state: "default" 0.0; - rel2 { relative: 1.0 0.0; } - min: 0 7; - fixed: 0 1; - align: 0.0 0.0; - } - } - - part { name: "padding_for_albumart.bottom"; - type: SPACER; - scale: 1; - description { state: "default" 0.0; - rel1 { relative: 0 1; to: "bg"; } - rel2 { relative: 1 1; to: "bg"; } - min: 0 7; - fixed: 0 1; - align: 0 1; - } - } - - part { name: "albumarmt_bg"; - type: RECT; - scale: 1; - mouse_events: 0; - description { state: "default" 0.0; - rel1 { relative: 1.0 1.0; to_x: "padding.left"; to_y: "padding_for_albumart.top"; } - rel2 { relative: 1.0 0.0; to_x: "padding.left"; to_y: "padding_for_albumart.bottom"; } - min: ALBUM_ART_SIZE; - max: ALBUM_ART_SIZE; - fixed: 1 1; - align: 0.0 0.5; - } - } - part { name: "albumart_image"; - type: SWALLOW; - scale: 1; - mouse_events: 1; - clip_to: "albumarmt_bg"; - description { state: "default" 0.0; - rel1 { relative: 0.5 0.5; to: "albumarmt_bg"; } - rel2 { relative: 0.5 0.5; to: "albumarmt_bg"; } - min: ALBUM_ART_SIZE; - max: ALBUM_ART_SIZE; - fixed: 1 1; - align: 0.5 0.5; - } - } - part { name: "albumarmt_frame"; - type: IMAGE; - scale: 1; - mouse_events: 0; - description { state: "default" 0.0; - rel1 { relative: 0.0 0.0; to: "albumarmt_bg";} - rel2 { relative: 1.0 1.0; to: "albumarmt_bg";} - min: ALBUM_ART_SIZE; - image.normal: MC_MUSIC_ALBUM_FRAME; - color_class:"AO009"; - } - } - - part { name: "right_area"; - type: RECT; - scale: 1; - mouse_events: 0; - description { state: "default" 0.0; - rel1 { relative: 1.0 1.0; to_x: "albumarmt_bg"; to_y: "padding.top"; } - rel2 { relative: 0.0 0.0; to_x: "padding.right"; to_y: "padding.bottom"; } - align: 0.0 0.0; - color:0 255 0 0; - } - } - part { name: "elm.text"; // title - type: SWALLOW; - mouse_events: 1; - scale: 1; - description { state: "default" 0.0; - rel1 { relative: 0.1 1.0; to_x: "right_area"; to_y: "padding.top";} - rel2 { relative: 290/329 1.0; to_x: "right_area"; to_y: "padding.top";} - fixed: 1 1; - align: 0.5 0.0; - } - } - - part { name: "mid_padding"; - type: RECT; - mouse_events: 0; - scale: 1; - description - { - state: "default" 0.0; - fixed: 1 1; - rel1 { relative: 0.0 1.0; to_x: "right_area"; to_y: "elm.text"; offset: 40 0; } - rel2 { relative: 1.0 1.0; to_x: "right_area"; to_y: "elm.text"; } - fixed: 1 1; - align: 0.0 0.0; - color: 255 0 0 0; - } - } - - part { name: "close_btn_area"; - type: SPACER; - scale: 1; - mouse_events: 1; - description { state: "default" 0.0; - rel1 { relative: 0.0 0.0; to_x: "padding.right"; to_y: "elm.text";offset: -30 15;} - rel2 { relative: 0.0 0.0; to: "padding.right";to_y: "elm.text"; offset: -30 15;} - min: BUTTON_CLOSE_SIZE_MAX; - max: BUTTON_CLOSE_SIZE_MAX; - fixed: 1 1; - } - } - MC_IMAGE_PART("close_btn","close_btn_area",MC_MUSIC_CLOSE_BTN,61,185,204,255,61,185,204,255,BUTTON_CLOSE_SIZE_MAX) - part { name: "close_btn_touch_area"; - type: RECT; - scale: 1; - mouse_events: 1; - repeat_events: 1; - description { - state: "default" 0.0; - rel1 { to: "close_btn_area"; offset: -7 -7;} - rel2 { to: "close_btn_area"; offset: 7 7;} - color: 0 0 0 0; - } - } - - part { name: "button_area"; - type: RECT; - scale: 1; - description { state: "default" 0.0; - rel1 { relative: 0 1; to_x:"elm.text"; to_y: "mid_padding";} - rel2 { relative: 1 0; to_x: "elm.text"; to_y: "padding.bottom"; } - visible: 1; - color: 0 255 0 0; - } - } - - part { name: "play_pause_btn_area"; - type: SPACER; - scale: 1; - mouse_events: 1; - description { state: "default" 0.0; - rel1 { relative: 0.5 0.5; to: "button_area";offset: 0 0;} - rel2 { relative: 0.5 0.5; to: "button_area";offset: 0 -16;} - min: PLAY_BTN_SIZE_MIN_MAX; - max: PLAY_BTN_SIZE_MIN_MAX; - fixed: 1 1; - } - } - - - MC_IMAGE_PART("play_btn_bg","play_pause_btn_area",MC_MUSIC_LAGRE_BTN_BG,61,185,204,255,34,104,115,255,BIG_BTN_SIZE_MIN_MAX) - MC_IMAGE_PART_FOCUS("play_btn_ef","play_pause_btn_area",MC_MUSIC_LAGRE_BTN_EF,BIG_BTN_SIZE_MIN_MAX) - MC_IMAGE_PART("play_btn","play_pause_btn_area",MC_MUSIC_PLAY_BTN,255,255,255,255,255,255,255,255,PLAY_BTN_SIZE_MIN_MAX) - MC_IMAGE_PART("pause_btn","play_pause_btn_area",MC_MUSIC_STOP_BTN,255,255,255,255,255,255,255,255,PLAY_BTN_SIZE_MIN_MAX) - part { name: "play_btn_touch_area"; - type: RECT; - scale: 1; - mouse_events: 1; - repeat_events: 1; - description { state: "default" 0.0; - rel1 { to: "play_pause_btn_area"; } - rel2 { to: "play_pause_btn_area";} - color: 0 0 0 0; - fixed: 1 1; - } - } - MC_FOCUSED_COVER("play_pause", "play_pause_btn_area"); } - - programs { - - MC_PROGRAM_IMAGE_VISIBLE("play_btn", "show_play_btn", "hide_play_btn") - MC_PROGRAM_IMAGE_VISIBLE("pause_btn", "show_pause_btn", "hide_pause_btn") - - program { name: "play_pause_btn_area_press"; - signal: "mouse,down,1"; - source: "play_btn_touch_area"; - script{ - set_state(PART:"play_btn_bg", "pressed", 0.0); - set_state(PART:"play_btn_ef", "pressed", 0.0); - } - } - - program { name: "play_pause_btn_area_up"; - signal: "mouse,up,1"; - source: "play_btn_touch_area"; - script{ - set_state(PART:"play_btn_bg", "default", 0.0); - set_state(PART:"play_btn_ef", "default", 0.0); - } - } - - program { name: "albumart_cb"; - signal: "mouse,down,1"; - source: "albumart_image"; - script{ - emit("albumart_clicked", "edje"); - } - } - - program { name: "close_area_btn_down"; - signal: "mouse,down,1"; - source: "close_btn_touch_area"; - script{ - set_state(PART:"close_btn", "pressed", 0.0); - emit("close_btn_down", "edje"); - } - } - - program { name: "close_area_btn_up"; - signal: "mouse,up,1"; - source: "close_btn_touch_area"; - script{ - set_state(PART:"close_btn", "default", 0.0); - emit("close_btn_up", "edje"); - } - } - - program { name: "close_area_btn_clicked"; - signal: "mouse,up,1"; - source: "close_btn_touch_area"; - script{ - emit("close_btn_clicked", "edje"); - } - } - - program { name: "set_pause_icon"; - signal: "set_pause"; - source: "*"; - script{ - set_state(PART:"play_btn", "hide", 0.0); - set_state(PART:"pause_btn", "default",0.0); - set_state(PART:"play_btn_ef", "focus", 0.0); - } - } - program { name: "set_play_icon"; - signal: "set_play"; - source: "*"; - script{ - set_state(PART:"play_btn", "default", 0.0); - set_state(PART:"pause_btn", "hide",0.0); - set_state(PART:"play_btn_ef", "default", 0.0); - } - } - } } } // collection diff --git a/vp-main/res/po/en_US.po b/vp-main/res/po/en_US.po index df1516e..521da3e 100755 --- a/vp-main/res/po/en_US.po +++ b/vp-main/res/po/en_US.po @@ -507,10 +507,10 @@ msgstr "This file does not exist." msgid "IDS_VPL_OPT_DISABLE_PLAY_AUDIO_ONLY_ABB" -msgstr "Turn off Play audio only" +msgstr "Disable play audio only" msgid "IDS_VPL_OPT_ENABLE_PLAY_AUDIO_ONLY_ABB" -msgstr "Turn on Play audio only" +msgstr "Enable play audio only" msgid "IDS_VPL_SBODY_PRESS_THE_HOME_KEY_OR_THE_POWER_KEY_DURING_PLAYBACK_TO_PLAY_AUDIO_ONLY" msgstr "Press the Home key or the Power key during playback to play audio only."