├── .gradle
└── 2.4
│ └── taskArtifacts
│ ├── cache.properties
│ ├── cache.properties.lock
│ ├── fileHashes.bin
│ ├── fileSnapshots.bin
│ ├── outputFileStates.bin
│ └── taskArtifacts.bin
├── .idea
├── .name
├── compiler.xml
├── copyright
│ └── profiles_settings.xml
├── encodings.xml
├── gradle.xml
├── libraries
│ ├── appcompat_v7_23_1_0.xml
│ ├── cardview_v7_23_1_0.xml
│ ├── design_23_1_0.xml
│ ├── libksyplayer.xml
│ ├── libksystat.xml
│ ├── recyclerview_v7_23_1_0.xml
│ ├── support_annotations_23_1_0.xml
│ └── support_v4_23_1_0.xml
├── misc.xml
├── modules.xml
├── runConfigurations.xml
├── vcs.xml
└── workspace.xml
├── KSYMediaPlayer-Android-SDK-AS.iml
├── KSYMediaPlayer-Android-SDK-LIBRARY-AS.iml
├── README.md
├── VideoDemos.iml
├── VideoWidgetLib
├── .gitignore
├── VideoWidgetLib.iml
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── ksy
│ │ └── media
│ │ └── ApplicationTest.java
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── ksy
│ │ └── media
│ │ └── widget
│ │ ├── controller
│ │ ├── base
│ │ │ ├── IMediaPlayerBaseControl.java
│ │ │ └── MediaPlayerBaseControllerView.java
│ │ ├── live
│ │ │ ├── ILiveController.java
│ │ │ └── LiveMediaPlayerControllerView.java
│ │ ├── livereplay
│ │ │ ├── ILiveReplayController.java
│ │ │ └── LiveReplayMediaPlayerControllerView.java
│ │ ├── shortvideo
│ │ │ ├── IShortVideoController.java
│ │ │ └── ShortVideoMediaPlayerControllerView.java
│ │ ├── stream
│ │ │ ├── IStreamController.java
│ │ │ ├── StreamMediaPlayerLargeControllerView.java
│ │ │ └── StreamMediaPlayerSmallControllerView.java
│ │ └── video
│ │ │ ├── IVideoController.java
│ │ │ ├── VideoMediaPlayerLargeControllerView.java
│ │ │ └── VideoMediaPlayerSmallControllerView.java
│ │ ├── model
│ │ ├── MediaPlayMode.java
│ │ ├── MediaPlayerMovieRatio.java
│ │ └── MediaPlayerVideoQuality.java
│ │ ├── player
│ │ └── IMediaPlayerPlus.java
│ │ ├── ui
│ │ ├── base
│ │ │ ├── CenterLayout.java
│ │ │ ├── HeartAbstractPathAnimator.java
│ │ │ ├── HeartLayout.java
│ │ │ ├── HeartPathAnimator.java
│ │ │ ├── HeartView.java
│ │ │ ├── HorizontalListView.java
│ │ │ ├── LiveAnchorDialog.java
│ │ │ ├── LiveExitDialog.java
│ │ │ ├── LivePersonDialog.java
│ │ │ ├── MediaPlayerBrightSeekBar.java
│ │ │ ├── MediaPlayerBufferingView.java
│ │ │ ├── MediaPlayerControllerBrightView.java
│ │ │ ├── MediaPlayerControllerVolumeView.java
│ │ │ ├── MediaPlayerEventActionView.java
│ │ │ ├── MediaPlayerLoadingView.java
│ │ │ ├── MediaPlayerLockView.java
│ │ │ ├── MediaPlayerMovieRatioView.java
│ │ │ ├── MediaPlayerQualityPopupView.java
│ │ │ ├── MediaPlayerScreenSizePopupView.java
│ │ │ ├── MediaPlayerSeekView.java
│ │ │ ├── MediaPlayerVideoSeekBar.java
│ │ │ ├── MediaPlayerVolumeSeekBar.java
│ │ │ ├── TopLayout.java
│ │ │ └── fragment
│ │ │ │ ├── CommentItem.java
│ │ │ │ ├── CommentListAdapter.java
│ │ │ │ ├── CommentListFragment.java
│ │ │ │ ├── DetailFragment.java
│ │ │ │ ├── RecommendItem.java
│ │ │ │ ├── RecommendListAdapter.java
│ │ │ │ └── RecommendListFragment.java
│ │ ├── live
│ │ │ ├── LiveChatAdapter.java
│ │ │ ├── LiveHeadListAdapter.java
│ │ │ ├── LiveMediaPlayerEventActionView.java
│ │ │ └── LiveMediaPlayerView.java
│ │ ├── livereplay
│ │ │ ├── LiveReplayChatAdapter.java
│ │ │ ├── LiveReplayHeadListAdapter.java
│ │ │ ├── LiveReplayMediaPlayerEventActionView.java
│ │ │ └── LiveReplayMediaPlayerView.java
│ │ ├── shortvideo
│ │ │ ├── ShortMovieItem.java
│ │ │ ├── ShortVideoListAdapter.java
│ │ │ ├── ShortVideoMediaPlayerEventActionView.java
│ │ │ └── ShortVideoMediaPlayerView.java
│ │ ├── stream
│ │ │ ├── StreamMediaPlayerPagerAdapter.java
│ │ │ └── StreamMediaPlayerView.java
│ │ └── video
│ │ │ ├── VideoMediaPlayerPagerAdapter.java
│ │ │ └── VideoMediaPlayerView.java
│ │ ├── util
│ │ ├── Constants.java
│ │ ├── IOUtils.java
│ │ ├── IPowerStateListener.java
│ │ ├── MediaPlayerUtils.java
│ │ ├── NetReceiver.java
│ │ ├── NetworkUtil.java
│ │ ├── PlayConfig.java
│ │ ├── ScreenResolution.java
│ │ ├── WakeLocker.java
│ │ ├── auth
│ │ │ └── MD5Util.java
│ │ ├── drm
│ │ │ ├── AuthUtils.java
│ │ │ ├── DRMKey.java
│ │ │ ├── DRMRetrieverManager.java
│ │ │ ├── DRMRetrieverResponseHandler.java
│ │ │ └── IDRMRetriverRequest.java
│ │ └── log
│ │ │ ├── Base64.java
│ │ │ ├── Cpu.java
│ │ │ └── GzipUtil.java
│ │ └── videoview
│ │ ├── MediaPlayerTextureView.java
│ │ ├── MediaPlayerVideoView.java
│ │ └── PhoneLiveMediaPlayerTextureView.java
│ ├── jniLibs
│ ├── arm64-v8a
│ │ └── libksyplayer.so
│ ├── armeabi-v7a
│ │ └── libksyplayer.so
│ ├── armeabi
│ │ └── libksyplayer.so
│ ├── x86
│ │ └── libksyplayer.so
│ └── x86_64
│ │ └── libksyplayer.so
│ ├── libs
│ ├── libksyplayer.jar
│ └── libksystat.jar
│ └── res
│ ├── anim
│ ├── live_audience_hide.xml
│ ├── live_audience_show.xml
│ ├── pop_hidden.xml
│ └── pop_show.xml
│ ├── color
│ ├── player_controller_list_item_text_selector.xml
│ ├── player_controller_title_text_selector.xml
│ └── player_quality_text_selector.xml
│ ├── drawable-xxhdpi
│ ├── blue_ksy_fast_reverse.png
│ ├── blue_ksy_screen_shot_sucess.png
│ ├── blue_ksy_speed.png
│ ├── blue_ksy_volume_status_0.png
│ ├── blue_ksy_volume_status_1.png
│ ├── blue_ksy_volume_status_2.png
│ ├── blue_ksy_volume_status_3.png
│ ├── blue_ksy_volume_status_4.png
│ ├── blue_ksy_volume_status_5.png
│ ├── ic_send_24px.png
│ ├── live_anchor.png
│ ├── live_anchor_detail.png
│ ├── live_bottom_alpha_image.png
│ ├── live_close_image.png
│ ├── live_dialog_list_item.png
│ ├── live_extension_image.png
│ ├── live_favorite_image.png
│ ├── live_model_image.png
│ ├── live_play_image.png
│ ├── live_quiet_model_image.png
│ ├── live_replay_image.png
│ ├── live_replay_pause.png
│ ├── live_replay_play.png
│ ├── live_report_image.png
│ ├── live_share_facebook.png
│ ├── live_share_googleplus.png
│ ├── live_share_line.png
│ ├── live_share_qq.png
│ ├── live_share_twitter.png
│ ├── live_share_wechat.png
│ ├── live_share_weibo.png
│ ├── live_top_alpha_image.png
│ ├── player_controller_action_play.9.png
│ ├── player_controller_action_replay.png
│ ├── player_controller_loading_line_normal.png
│ ├── player_controller_video_progress_thumb_normal.png
│ ├── short_eye_image.png
│ ├── short_head_image_n.png
│ ├── short_head_image_p.png
│ ├── short_message_image.png
│ ├── short_navigate_before.png
│ ├── short_overflow_image.png
│ ├── short_share_image.png
│ ├── shortvideo_head_image.png
│ ├── shortvideo_list_item_image.png
│ ├── shortvideo_top_image.png
│ ├── stream_set_image.png
│ ├── video_camera_image.png
│ ├── video_change_big.png
│ ├── video_change_small.png
│ ├── video_high_quality.png
│ ├── video_img_default.png
│ ├── video_light_image.png
│ ├── video_loading_image.png
│ ├── video_lock_image.png
│ ├── video_pause_circle_image.png
│ ├── video_pause_land_image.png
│ ├── video_play_circle_image.png
│ ├── video_play_land_image.png
│ ├── video_recent_image.png
│ ├── video_relate.png
│ ├── video_save_image.png
│ ├── video_unlock_image.png
│ └── video_volume_image.png
│ ├── drawable
│ ├── blue_ksy_back.xml
│ ├── blue_ksy_bt_style.xml
│ ├── blue_ksy_bt_style_nomal.xml
│ ├── blue_ksy_bt_style_press.xml
│ ├── blue_ksy_controller_volume_gesture_selector.xml
│ ├── blue_ksy_lock_selector.xml
│ ├── blue_ksy_pause.xml
│ ├── blue_ksy_play.xml
│ ├── blue_ksy_text_style.xml
│ ├── blue_ksy_video_progress_seekbar_style_selector.xml
│ ├── blue_ksy_video_progress_seekbar_thumb_selector.xml
│ ├── dialog_bg.xml
│ ├── live_button_shape.xml
│ ├── live_chat_item_shape.xml
│ ├── live_edittext_shape.xml
│ ├── short_video_edittext_bg.xml
│ ├── stream_edittext_bg.xml
│ └── video_edittext_bg.xml
│ ├── layout
│ ├── blue_media_player_buffering_view.xml
│ ├── blue_media_player_controller_bright_view.xml
│ ├── blue_media_player_controller_large.xml
│ ├── blue_media_player_controller_large_top_view.xml
│ ├── blue_media_player_controller_live.xml
│ ├── blue_media_player_controller_live_replay.xml
│ ├── blue_media_player_controller_small.xml
│ ├── blue_media_player_controller_volume_view.xml
│ ├── blue_media_player_event_action_view.xml
│ ├── blue_media_player_loading_view.xml
│ ├── blue_media_player_quality_item_view.xml
│ ├── blue_media_player_quality_popup_view.xml
│ ├── blue_media_player_relate_videoinfo.xml
│ ├── blue_media_player_screen_size_item.xml
│ ├── blue_media_player_screen_size_popup.xml
│ ├── blue_media_player_seek_view.xml
│ ├── blue_media_player_video_ratio_view.xml
│ ├── blue_media_player_view.xml
│ ├── fragment_blank.xml
│ ├── fragment_item_grid.xml
│ ├── fragment_item_list.xml
│ ├── fragment_video_detail.xml
│ ├── fragment_video_recommend_list.xml
│ ├── live_blue_media_player_view.xml
│ ├── live_bottom.xml
│ ├── live_finish_event_action_view.xml
│ ├── live_item.xml
│ ├── live_layout_anchor_dialog.xml
│ ├── live_layout_dialog.xml
│ ├── live_layout_person_dialog.xml
│ ├── live_replay_blue_media_player_view.xml
│ ├── live_replay_bottom.xml
│ ├── live_replay_finish_event_action_view.xml
│ ├── live_replay_item.xml
│ ├── live_replay_top.xml
│ ├── live_replay_top_item.xml
│ ├── live_top.xml
│ ├── live_top_item.xml
│ ├── short_movie_head_view.xml
│ ├── short_video_blue_media_player_controller_small.xml
│ ├── short_video_blue_media_player_view.xml
│ ├── short_video_list_item_layout.xml
│ ├── short_video_media_player_event_action_view.xml
│ ├── short_video_pop_layout.xml
│ ├── stream_blue_media_player_controller_large.xml
│ ├── stream_blue_media_player_controller_large_top_view.xml
│ ├── stream_blue_media_player_controller_small.xml
│ ├── stream_blue_media_player_view.xml
│ ├── stream_small_pop.xml
│ ├── video_blue_media_player_controller_large.xml
│ ├── video_blue_media_player_controller_large_top_view.xml
│ ├── video_blue_media_player_controller_small.xml
│ ├── video_blue_media_player_view.xml
│ ├── video_comment_list_item_layout.xml
│ ├── video_pop_layout.xml
│ └── video_recomment_list_item_layout.xml
│ ├── values-large
│ └── refs.xml
│ ├── values-sw600dp
│ └── refs.xml
│ ├── values-v11
│ └── styles.xml
│ ├── values-v14
│ └── styles.xml
│ └── values
│ ├── arrays.xml
│ ├── attrs.xml
│ ├── colors.xml
│ ├── dimens.xml
│ ├── integers.xml
│ ├── player_attrs.xml
│ ├── refs.xml
│ ├── strings.xml
│ └── styles.xml
├── app
├── .gitignore
├── app.iml
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── ksy
│ │ └── media
│ │ └── demo
│ │ └── ApplicationTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── ksy
│ │ │ └── media
│ │ │ └── demo
│ │ │ ├── live
│ │ │ └── PhoneLiveActivity.java
│ │ │ ├── livereplay
│ │ │ └── PhoneLiveReplayActivity.java
│ │ │ ├── main
│ │ │ ├── DemoActivity.java
│ │ │ ├── DemoContent.java
│ │ │ ├── DemoContentViewHolder.java
│ │ │ ├── DemoListAdapter.java
│ │ │ └── DemoListItemSpaceDecoration.java
│ │ │ ├── shortvideo
│ │ │ └── ShortVideoActivity.java
│ │ │ ├── stream
│ │ │ └── StreamVideoActivity.java
│ │ │ └── video
│ │ │ └── OnlineVideoActivity.java
│ └── res
│ │ ├── drawable
│ │ └── shape_scroller_thumb.xml
│ │ ├── layout
│ │ ├── activity_main.xml
│ │ ├── activity_online_video.xml
│ │ ├── activity_phone_live.xml
│ │ ├── activity_phone_live_replay.xml
│ │ ├── activity_short_movie.xml
│ │ ├── activity_stream_replay.xml
│ │ ├── activity_stream_video.xml
│ │ ├── content_main.xml
│ │ ├── content_online_video.xml
│ │ ├── content_phone_live.xml
│ │ ├── content_phone_live_replay.xml
│ │ ├── content_short_movie.xml
│ │ ├── content_stream_replay.xml
│ │ ├── content_stream_video.xml
│ │ ├── dialog_input.xml
│ │ ├── dialog_input_live.xml
│ │ ├── livereplay_dialog_input.xml
│ │ ├── recycler_view_item_demo_list.xml
│ │ └── stream_dialog_input.xml
│ │ ├── menu
│ │ └── menu_main.xml
│ │ ├── mipmap-hdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ksy_logo.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ ├── short_navigate_before.png
│ │ └── short_overflow_image.png
│ │ ├── values-v21
│ │ └── styles.xml
│ │ ├── values-w820dp
│ │ └── dimens.xml
│ │ └── values
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── ksy
│ └── media
│ └── demo
│ └── ExampleUnitTest.java
├── build.gradle
├── build
└── intermediates
│ └── dex-cache
│ └── cache.xml
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── local.properties
└── settings.gradle
/.gradle/2.4/taskArtifacts/cache.properties:
--------------------------------------------------------------------------------
1 | #Mon Jan 04 19:33:44 CST 2016
2 |
--------------------------------------------------------------------------------
/.gradle/2.4/taskArtifacts/cache.properties.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ksvc-backup/KSYMediaPlayerKit_Android/1f841fb88aa37984d73757680c1400fe84150cf7/.gradle/2.4/taskArtifacts/cache.properties.lock
--------------------------------------------------------------------------------
/.gradle/2.4/taskArtifacts/fileHashes.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ksvc-backup/KSYMediaPlayerKit_Android/1f841fb88aa37984d73757680c1400fe84150cf7/.gradle/2.4/taskArtifacts/fileHashes.bin
--------------------------------------------------------------------------------
/.gradle/2.4/taskArtifacts/fileSnapshots.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ksvc-backup/KSYMediaPlayerKit_Android/1f841fb88aa37984d73757680c1400fe84150cf7/.gradle/2.4/taskArtifacts/fileSnapshots.bin
--------------------------------------------------------------------------------
/.gradle/2.4/taskArtifacts/outputFileStates.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ksvc-backup/KSYMediaPlayerKit_Android/1f841fb88aa37984d73757680c1400fe84150cf7/.gradle/2.4/taskArtifacts/outputFileStates.bin
--------------------------------------------------------------------------------
/.gradle/2.4/taskArtifacts/taskArtifacts.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ksvc-backup/KSYMediaPlayerKit_Android/1f841fb88aa37984d73757680c1400fe84150cf7/.gradle/2.4/taskArtifacts/taskArtifacts.bin
--------------------------------------------------------------------------------
/.idea/.name:
--------------------------------------------------------------------------------
1 | KSYMediaPlayer-Android-SDK-LIBRARY-AS
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
19 |
20 |
--------------------------------------------------------------------------------
/.idea/libraries/appcompat_v7_23_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/.idea/libraries/cardview_v7_23_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.idea/libraries/design_23_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/.idea/libraries/libksyplayer.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/libraries/libksystat.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/libraries/recyclerview_v7_23_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/.idea/libraries/support_annotations_23_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/.idea/libraries/support_v4_23_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/KSYMediaPlayer-Android-SDK-AS.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/KSYMediaPlayer-Android-SDK-LIBRARY-AS.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/VideoDemos.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/VideoWidgetLib/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/VideoWidgetLib/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 23
5 | buildToolsVersion "23.0.2"
6 |
7 | defaultConfig {
8 | minSdkVersion 14
9 | targetSdkVersion 23
10 | versionCode 1
11 | versionName "1.0"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | compile fileTree(include: ['*.jar'], dir: 'libs')
23 | compile 'com.android.support:appcompat-v7:23.1.0'
24 | compile 'com.android.support:design:23.1.0'
25 | compile 'com.android.support:cardview-v7:23.1.0'
26 | compile files('src/main/libs/libksystat.jar')
27 | compile files('src/main/libs/libksyplayer.jar')
28 | }
29 |
--------------------------------------------------------------------------------
/VideoWidgetLib/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/eflakemac/Documents/android-sdk-macosx/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript action
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.action.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/androidTest/java/com/ksy/media/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/controller/base/IMediaPlayerBaseControl.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.controller.base;
2 |
3 | public interface IMediaPlayerBaseControl {
4 |
5 | void start();
6 |
7 | void pause();
8 |
9 | int getDuration();
10 |
11 | int getCurrentPosition();
12 |
13 | void seekTo(long pos);
14 |
15 | boolean isPlaying();
16 |
17 | int getBufferPercentage();
18 |
19 | boolean canStart();
20 |
21 | boolean canPause();
22 |
23 | boolean canSeekBackward();
24 |
25 | boolean canSeekForward();
26 | }
27 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/controller/live/ILiveController.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.controller.live;
2 |
3 | import com.ksy.media.widget.controller.base.IMediaPlayerBaseControl;
4 |
5 |
6 | public interface ILiveController extends IMediaPlayerBaseControl {
7 | void onBackPress(int playMode);
8 | }
9 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/controller/livereplay/ILiveReplayController.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.controller.livereplay;
2 |
3 | import com.ksy.media.widget.controller.base.IMediaPlayerBaseControl;
4 |
5 |
6 | public interface ILiveReplayController extends IMediaPlayerBaseControl {
7 |
8 | void onBackPress(int playMode);
9 | }
10 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/controller/shortvideo/IShortVideoController.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.controller.shortvideo;
2 |
3 | import com.ksy.media.widget.controller.base.IMediaPlayerBaseControl;
4 |
5 |
6 | public interface IShortVideoController extends IMediaPlayerBaseControl {
7 |
8 | void onBackPress(int playMode);
9 |
10 | void onControllerShow(int playMode);
11 |
12 | void onControllerHide(int playMode);
13 | }
14 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/controller/stream/IStreamController.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.controller.stream;
2 |
3 | import com.ksy.media.widget.controller.base.IMediaPlayerBaseControl;
4 |
5 |
6 | public interface IStreamController extends IMediaPlayerBaseControl {
7 |
8 | int getPlayMode();
9 |
10 | void onRequestPlayMode(int requestPlayMode);
11 |
12 | void onBackPress(int playMode);
13 |
14 | void onControllerShow(int playMode);
15 |
16 | void onControllerHide(int playMode);
17 |
18 | void onRequestLockMode(boolean lockMode);
19 | }
20 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/controller/video/IVideoController.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.controller.video;
2 |
3 | import com.ksy.media.widget.controller.base.IMediaPlayerBaseControl;
4 |
5 |
6 | public interface IVideoController extends IMediaPlayerBaseControl {
7 |
8 | int getPlayMode();
9 |
10 | void onRequestPlayMode(int requestPlayMode);
11 |
12 | void onBackPress(int playMode);
13 |
14 | void onControllerShow(int playMode);
15 |
16 | void onControllerHide(int playMode);
17 |
18 | void onRequestLockMode(boolean lockMode);
19 |
20 | void onMovieRatioChange(int screenSize);
21 |
22 | void onMovieCrop();
23 | }
24 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/model/MediaPlayMode.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.model;
2 |
3 | public class MediaPlayMode {
4 | public static final int PLAY_MODE_FULLSCREEN = 0;
5 | public static final int PLAY_MODE_WINDOW = 1;
6 | }
7 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/model/MediaPlayerMovieRatio.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.model;
2 |
3 |
4 | public enum MediaPlayerMovieRatio {
5 |
6 | WIDESCREEN(MediaPlayerMovieRatio.VIDEO_MOVIE_RATIO_16_9,"16:9"), NORMAL(MediaPlayerMovieRatio.VIDEO_MOVIE_RATIO_4_3,"4:3");
7 |
8 | public static final int VIDEO_MOVIE_RATIO_16_9 = 1;
9 | public static final int VIDEO_MOVIE_RATIO_4_3 = 2;
10 |
11 | private MediaPlayerMovieRatio(int flag, String name) {
12 | this.flag = flag;
13 | this.name = name;
14 | }
15 |
16 | private int flag = VIDEO_MOVIE_RATIO_16_9;
17 | private String name;
18 |
19 | public int getFlag() {
20 | return flag;
21 | }
22 | public String getName() {
23 | return name;
24 | }
25 |
26 | public static MediaPlayerMovieRatio getQualityNameByFlag(int flag){
27 | switch (flag) {
28 | case VIDEO_MOVIE_RATIO_16_9:
29 | return WIDESCREEN;
30 | case VIDEO_MOVIE_RATIO_4_3:
31 | return NORMAL;
32 | }
33 | return null;
34 |
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/model/MediaPlayerVideoQuality.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.model;
2 |
3 | public enum MediaPlayerVideoQuality {
4 |
5 | UNKNOWN(MediaPlayerVideoQuality.VIDEO_QUALITY_UNKNOWN,"未知"),HD(MediaPlayerVideoQuality.VIDEO_QUALITY_HD,"高清"), SD(MediaPlayerVideoQuality.VIDEO_QUALITY_SD,"标清");
6 |
7 | public static final int VIDEO_QUALITY_UNKNOWN = -1;
8 | public static final int VIDEO_QUALITY_HD = 1;
9 | public static final int VIDEO_QUALITY_SD = 2;
10 |
11 | private MediaPlayerVideoQuality(int flag, String name) {
12 | this.flag = flag;
13 | this.name = name;
14 | }
15 |
16 | private int flag = VIDEO_QUALITY_UNKNOWN;
17 | private String name;
18 | public int getFlag() {
19 | return flag;
20 | }
21 | public String getName() {
22 | return name;
23 | }
24 |
25 | public static MediaPlayerVideoQuality getQualityNameByFlag(int flag){
26 | switch (flag) {
27 | case VIDEO_QUALITY_UNKNOWN:
28 | return UNKNOWN;
29 | case VIDEO_QUALITY_HD:
30 | return HD;
31 | case VIDEO_QUALITY_SD:
32 | return SD;
33 | }
34 | return null;
35 |
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/player/IMediaPlayerPlus.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.player;
2 |
3 | public interface IMediaPlayerPlus {
4 | void onVideoPreparing();
5 |
6 | void onPlay();
7 |
8 | void onPause();
9 | }
10 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/ui/base/HeartLayout.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.ui.base;
2 |
3 | import android.content.Context;
4 | import android.content.res.TypedArray;
5 | import android.util.AttributeSet;
6 | import android.widget.RelativeLayout;
7 |
8 | import com.ksy.mediaPlayer.widget.R;
9 |
10 | /**
11 | * Created by LIXIAOPENG on 2015/12/8.
12 | */
13 | public class HeartLayout extends RelativeLayout {
14 |
15 | private HeartAbstractPathAnimator mAnimator;
16 |
17 | public HeartLayout(Context context) {
18 | super(context);
19 | init(null, 0);
20 | }
21 |
22 | public HeartLayout(Context context, AttributeSet attrs) {
23 | super(context, attrs);
24 | init(attrs, 0);
25 | }
26 |
27 | public HeartLayout(Context context, AttributeSet attrs, int defStyleAttr) {
28 | super(context, attrs, defStyleAttr);
29 | init(attrs, defStyleAttr);
30 | }
31 |
32 | private void init(AttributeSet attrs, int defStyleAttr) {
33 |
34 | final TypedArray a = getContext().obtainStyledAttributes(
35 | attrs, R.styleable.HeartLayout, defStyleAttr, 0);
36 |
37 | mAnimator = new HeartPathAnimator(HeartAbstractPathAnimator.Config.fromTypeArray(a));
38 |
39 | a.recycle();
40 | }
41 |
42 | public HeartAbstractPathAnimator getAnimator() {
43 | return mAnimator;
44 | }
45 |
46 | public void setAnimator(HeartAbstractPathAnimator animator) {
47 | clearAnimation();
48 | mAnimator = animator;
49 | }
50 |
51 | public void clearAnimation() {
52 | for (int i = 0; i < getChildCount(); i++) {
53 | getChildAt(i).clearAnimation();
54 | }
55 | removeAllViews();
56 | }
57 |
58 | public void addHeart(int color) {
59 | HeartView heartView = new HeartView(getContext());
60 | heartView.setColor(color);
61 | mAnimator.start(heartView, this);
62 | }
63 |
64 | public void addHeart(int color, int heartResId, int heartBorderResId) {
65 | HeartView heartView = new HeartView(getContext());
66 | heartView.setColorAndDrawables(color, heartResId, heartBorderResId);
67 | mAnimator.start(heartView, this);
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/ui/base/LiveAnchorDialog.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.ui.base;
2 |
3 | import android.app.Dialog;
4 | import android.content.Context;
5 | import android.os.Bundle;
6 | import android.view.View;
7 | import android.widget.Button;
8 | import android.widget.ImageView;
9 | import android.widget.Toast;
10 |
11 | import com.ksy.mediaPlayer.widget.R;
12 |
13 |
14 | public class LiveAnchorDialog extends Dialog {
15 | private Context mContext;
16 | private ImageView closeImageView;
17 | private Button anchorAttentionButton;
18 |
19 | public LiveAnchorDialog(Context context) {
20 | super(context,R.style.ExitDialog);
21 | mContext=context;
22 | }
23 |
24 | public LiveAnchorDialog(Context context, int theme) {
25 | super(context, theme);
26 | mContext=context;
27 | }
28 |
29 | @Override
30 | protected void onCreate(Bundle savedInstanceState) {
31 | super.onCreate(savedInstanceState);
32 | setContentView(R.layout.live_layout_anchor_dialog);
33 |
34 | closeImageView = (ImageView) findViewById(R.id.imageLiveViewClose);
35 | closeImageView.setOnClickListener(new View.OnClickListener() {
36 | @Override
37 | public void onClick(View view) {
38 | LiveAnchorDialog.this.dismiss();
39 | }
40 | });
41 |
42 | anchorAttentionButton = (Button)findViewById(R.id.live_button);
43 | anchorAttentionButton.setOnClickListener(new View.OnClickListener() {
44 | @Override
45 | public void onClick(View view) {
46 | LiveAnchorDialog.this.dismiss();
47 | Toast.makeText(mContext, "Attention Succeed", Toast.LENGTH_SHORT).show();
48 | }
49 | });
50 |
51 | this.setCanceledOnTouchOutside(false);
52 |
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/ui/base/LiveExitDialog.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.ui.base;
2 |
3 | import android.app.Dialog;
4 | import android.content.Context;
5 | import android.os.Bundle;
6 | import android.view.View;
7 | import android.widget.Button;
8 | import android.widget.TextView;
9 |
10 | import com.ksy.mediaPlayer.widget.R;
11 |
12 |
13 | public class LiveExitDialog extends Dialog {
14 | private Context mContext;
15 | private Button mConfirm;
16 | private Button mCancel;
17 | private TextView titleTextView;
18 | String mTitle;
19 |
20 | public LiveExitDialog(Context context, String title) {
21 | super(context,R.style.ExitDialog);
22 | mContext=context;
23 | mTitle = title;
24 | }
25 |
26 | public LiveExitDialog(Context context, int theme) {
27 | super(context, theme);
28 | mContext=context;
29 | }
30 |
31 | @Override
32 | protected void onCreate(Bundle savedInstanceState) {
33 | super.onCreate(savedInstanceState);
34 | setContentView(R.layout.live_layout_dialog);
35 |
36 | this.setCanceledOnTouchOutside(false);
37 |
38 | titleTextView = (TextView) findViewById(R.id.title);
39 | titleTextView.setText(mTitle);
40 |
41 | mConfirm= (Button) findViewById(R.id.dialog_confirm);
42 | mCancel= (Button) findViewById(R.id.dialog_cancel);
43 |
44 | mConfirm.setOnClickListener(new View.OnClickListener() {
45 | @Override
46 | public void onClick(View v) {
47 | System.exit(0);
48 |
49 | }
50 | });
51 |
52 | mCancel.setOnClickListener(new View.OnClickListener() {
53 | @Override
54 | public void onClick(View v) {
55 | LiveExitDialog.this.dismiss();
56 | }
57 | });
58 | }
59 |
60 | }
61 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/ui/base/LivePersonDialog.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.ui.base;
2 |
3 | import android.app.Dialog;
4 | import android.content.Context;
5 | import android.os.Bundle;
6 | import android.view.View;
7 | import android.widget.Button;
8 | import android.widget.ImageView;
9 | import android.widget.Toast;
10 |
11 | import com.ksy.mediaPlayer.widget.R;
12 |
13 |
14 | public class LivePersonDialog extends Dialog {
15 | private Context mContext;
16 | private ImageView closeImageView;
17 | private Button personButton;
18 |
19 | public LivePersonDialog(Context context) {
20 | super(context,R.style.ExitDialog);
21 | mContext=context;
22 | }
23 |
24 | public LivePersonDialog(Context context, int theme) {
25 | super(context, theme);
26 | mContext=context;
27 | }
28 |
29 | @Override
30 | protected void onCreate(Bundle savedInstanceState) {
31 | super.onCreate(savedInstanceState);
32 | setContentView(R.layout.live_layout_person_dialog);
33 |
34 | closeImageView = (ImageView) findViewById(R.id.imageViewClose);
35 | closeImageView.setOnClickListener(new View.OnClickListener() {
36 | @Override
37 | public void onClick(View view) {
38 | LivePersonDialog.this.dismiss();
39 | }
40 | });
41 |
42 | personButton = (Button) findViewById(R.id.button);
43 | personButton.setOnClickListener(new View.OnClickListener() {
44 | @Override
45 | public void onClick(View view) {
46 | LivePersonDialog.this.dismiss();
47 | Toast.makeText(mContext, "Attention Succeed", Toast.LENGTH_SHORT).show();
48 | }
49 | });
50 |
51 | this.setCanceledOnTouchOutside(false);
52 |
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/ui/base/MediaPlayerBrightSeekBar.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.ui.base;
2 |
3 | import android.content.Context;
4 | import android.graphics.Canvas;
5 | import android.util.AttributeSet;
6 | import android.util.Log;
7 | import android.view.MotionEvent;
8 | import android.widget.SeekBar;
9 |
10 | import com.ksy.media.widget.util.Constants;
11 |
12 | /**
13 | * @Description 亮度调节进度条
14 | * @author LIXIAOPENG
15 | * @date 2015-6-3
16 | */
17 | public class MediaPlayerBrightSeekBar extends SeekBar {
18 |
19 | public interface onScreenShowListener {
20 | public void onScreenShow();
21 | }
22 |
23 | private onScreenShowListener mOnShowListener;
24 |
25 | public MediaPlayerBrightSeekBar(Context context, AttributeSet attrs,
26 | int defStyle) {
27 | super(context, attrs, defStyle);
28 | }
29 |
30 | public MediaPlayerBrightSeekBar(Context context, AttributeSet attrs) {
31 | super(context, attrs);
32 | }
33 |
34 | public MediaPlayerBrightSeekBar(Context context) {
35 | super(context);
36 | }
37 |
38 | @Override
39 | protected void onSizeChanged(int w, int h, int oldw, int oldh) {
40 | super.onSizeChanged(h, w, oldh, oldw);
41 | }
42 |
43 | @Override
44 | protected synchronized void onMeasure(int widthMeasureSpec,
45 | int heightMeasureSpec) {
46 | super.onMeasure(heightMeasureSpec, widthMeasureSpec);
47 | setMeasuredDimension(getMeasuredHeight(), getMeasuredWidth());
48 | }
49 |
50 | @Override
51 | protected synchronized void onDraw(Canvas canvas) {
52 | canvas.rotate(-90);
53 | canvas.translate(-getHeight(), 0);
54 | super.onDraw(canvas);
55 | }
56 |
57 | @Override
58 | public boolean onTouchEvent(MotionEvent event) {
59 | Log.d(Constants.LOG_TAG, "touch in bright");
60 |
61 | if (!isEnabled()) {
62 | return false;
63 | }
64 |
65 | switch (event.getAction()) {
66 | case MotionEvent.ACTION_DOWN:
67 | case MotionEvent.ACTION_MOVE:
68 | case MotionEvent.ACTION_UP:
69 | setProgress(getMax()
70 | - (int) (getMax() * event.getY() / getHeight()));
71 | if (mOnShowListener != null) {
72 | mOnShowListener.onScreenShow();
73 | }
74 | break;
75 | case MotionEvent.ACTION_CANCEL:
76 | break;
77 | }
78 |
79 | return true;
80 | }
81 |
82 | @Override
83 | public synchronized void setProgress(int progress) {
84 | super.setProgress(progress);
85 | onSizeChanged(getWidth(), getHeight(), 0, 0);
86 | }
87 |
88 | public void setOnScreenShowListener(onScreenShowListener listener) {
89 | this.mOnShowListener = listener;
90 | }
91 |
92 | }
93 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/ui/base/MediaPlayerBufferingView.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.ui.base;
2 | import com.ksy.mediaPlayer.widget.R;
3 |
4 | import android.content.Context;
5 | import android.util.AttributeSet;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.widget.ProgressBar;
9 | import android.widget.RelativeLayout;
10 | import android.widget.TextView;
11 |
12 |
13 | public class MediaPlayerBufferingView extends RelativeLayout {
14 |
15 | private ProgressBar mProgressBar;
16 | private TextView mTextView;
17 |
18 | public MediaPlayerBufferingView(Context context, AttributeSet attrs, int defStyle) {
19 | super(context, attrs, defStyle);
20 | }
21 |
22 | public MediaPlayerBufferingView(Context context, AttributeSet attrs) {
23 | super(context, attrs);
24 | }
25 |
26 | public MediaPlayerBufferingView(Context context) {
27 | super(context);
28 |
29 | LayoutInflater.from(getContext()).inflate(R.layout.blue_media_player_buffering_view, this);
30 |
31 | initViews();
32 | }
33 |
34 | private void initViews(){
35 | mProgressBar = (ProgressBar) findViewById(R.id.pb_buffering);
36 | mTextView = (TextView) findViewById(R.id.tv_buffering);
37 | }
38 |
39 | @Override
40 | protected void onFinishInflate() {
41 | super.onFinishInflate();
42 | initViews();
43 | }
44 |
45 | public void setBufferingProgress(int progress){
46 |
47 | if(progress < 0 || progress > 100){
48 | return;
49 | }
50 | mTextView.setText(progress + "%");
51 |
52 | }
53 |
54 | public void show(){
55 | if(getVisibility() != View.VISIBLE)
56 | setVisibility(View.VISIBLE);
57 | }
58 |
59 | public void hide(){
60 | if(getVisibility() == View.VISIBLE)
61 | setVisibility(View.GONE);
62 | }
63 |
64 | }
65 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/ui/base/MediaPlayerLoadingView.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.ui.base;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.widget.RelativeLayout;
8 | import android.widget.TextView;
9 |
10 | import com.ksy.mediaPlayer.widget.R;
11 |
12 |
13 | public class MediaPlayerLoadingView extends RelativeLayout {
14 |
15 | private TextView mLoadingTitleTextView;
16 |
17 | public MediaPlayerLoadingView(Context context, AttributeSet attrs, int defStyle) {
18 | super(context, attrs, defStyle);
19 | }
20 |
21 | public MediaPlayerLoadingView(Context context, AttributeSet attrs) {
22 | super(context, attrs);
23 | }
24 |
25 | public MediaPlayerLoadingView(Context context) {
26 | super(context);
27 | LayoutInflater.from(getContext()).inflate(R.layout.blue_media_player_loading_view, this);
28 |
29 | initViews();
30 | }
31 |
32 | private void initViews(){
33 | mLoadingTitleTextView = (TextView) findViewById(R.id.loading_title_text_view);
34 | }
35 |
36 | @Override
37 | protected void onFinishInflate() {
38 | super.onFinishInflate();
39 | initViews();
40 | }
41 |
42 | public void setLoadingTitle(String loadingTitle){
43 | if(loadingTitle == null) loadingTitle = "";
44 | mLoadingTitleTextView.setText(loadingTitle);
45 | }
46 |
47 | public void setLoadingTip(String loadingTip){
48 |
49 | if(loadingTip == null) loadingTip = "";
50 |
51 | // mLoadingTipTextView.setText(loadingTip);
52 |
53 | }
54 |
55 | public void show(){
56 | if(getVisibility() != View.VISIBLE)
57 | setVisibility(View.VISIBLE);
58 | }
59 |
60 | public void hide(){
61 | if(getVisibility() == View.VISIBLE)
62 | setVisibility(View.INVISIBLE);
63 | }
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/ui/base/MediaPlayerVideoSeekBar.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.ui.base;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.view.MotionEvent;
6 | import android.widget.SeekBar;
7 |
8 | public class MediaPlayerVideoSeekBar extends SeekBar {
9 |
10 | public MediaPlayerVideoSeekBar(Context context, AttributeSet attrs, int defStyle) {
11 | super(context, attrs, defStyle);
12 | }
13 |
14 | public MediaPlayerVideoSeekBar(Context context, AttributeSet attrs) {
15 | super(context, attrs);
16 | }
17 |
18 | public MediaPlayerVideoSeekBar(Context context) {
19 | super(context);
20 | }
21 |
22 | @Override
23 | public boolean onTouchEvent(MotionEvent event) {
24 | return super.onTouchEvent(event);
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/ui/base/MediaPlayerVolumeSeekBar.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.ui.base;
2 |
3 | import android.content.Context;
4 | import android.graphics.Canvas;
5 | import android.util.AttributeSet;
6 | import android.util.Log;
7 | import android.view.MotionEvent;
8 | import android.widget.SeekBar;
9 |
10 | import com.ksy.media.widget.util.Constants;
11 |
12 | public class MediaPlayerVolumeSeekBar extends SeekBar {
13 |
14 | public interface onScreenShowListener {
15 | public void onScreenShow();
16 | }
17 |
18 | private onScreenShowListener mOnShowListener;
19 |
20 | public MediaPlayerVolumeSeekBar(Context context, AttributeSet attrs,
21 | int defStyle) {
22 | super(context, attrs, defStyle);
23 | }
24 |
25 | public MediaPlayerVolumeSeekBar(Context context, AttributeSet attrs) {
26 | super(context, attrs);
27 | }
28 |
29 | public MediaPlayerVolumeSeekBar(Context context) {
30 | super(context);
31 | }
32 |
33 | @Override
34 | protected void onSizeChanged(int w, int h, int oldw, int oldh) {
35 | super.onSizeChanged(h, w, oldh, oldw);
36 | }
37 |
38 | @Override
39 | protected synchronized void onMeasure(int widthMeasureSpec,
40 | int heightMeasureSpec) {
41 | super.onMeasure(heightMeasureSpec, widthMeasureSpec);
42 | setMeasuredDimension(getMeasuredHeight(), getMeasuredWidth());
43 | }
44 |
45 | @Override
46 | protected synchronized void onDraw(Canvas canvas) {
47 | canvas.rotate(-90);
48 | canvas.translate(-getHeight(), 0);
49 | super.onDraw(canvas);
50 | }
51 |
52 | @Override
53 | public boolean onTouchEvent(MotionEvent event) {
54 | Log.d(Constants.LOG_TAG, "touch in Volume");
55 |
56 | if (!isEnabled()) {
57 | return false;
58 | }
59 |
60 | switch (event.getAction()) {
61 | case MotionEvent.ACTION_DOWN:
62 | case MotionEvent.ACTION_MOVE:
63 | case MotionEvent.ACTION_UP:
64 | setProgress(getMax()
65 | - (int) (getMax() * event.getY() / getHeight()));
66 | if (mOnShowListener != null) {
67 | mOnShowListener.onScreenShow();
68 | }
69 | break;
70 | case MotionEvent.ACTION_CANCEL:
71 | break;
72 | }
73 |
74 | return true;
75 | }
76 |
77 | @Override
78 | public synchronized void setProgress(int progress) {
79 | super.setProgress(progress);
80 | onSizeChanged(getWidth(), getHeight(), 0, 0);
81 | }
82 |
83 | public void setOnScreenShowListener(onScreenShowListener listener) {
84 | this.mOnShowListener = listener;
85 | }
86 |
87 | }
88 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/ui/base/TopLayout.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.ui.base;
2 |
3 | import android.app.Activity;
4 | import android.content.Context;
5 | import android.graphics.Rect;
6 | import android.util.AttributeSet;
7 | import android.util.DisplayMetrics;
8 | import android.util.Log;
9 | import android.view.ViewGroup;
10 | import android.widget.RelativeLayout;
11 |
12 | import com.ksy.media.widget.util.Constants;
13 |
14 | public class TopLayout extends RelativeLayout {
15 |
16 | private final Context mContext;
17 | private DisplayMetrics displayMetrics;
18 |
19 | public TopLayout(Context context, AttributeSet attrs) {
20 | super(context, attrs);
21 | this.mContext = context;
22 | displayMetrics = getResources().getDisplayMetrics();
23 | }
24 |
25 | @Override
26 | protected void onSizeChanged(int w, int h, int oldw, int oldh) {
27 | Log.d(Constants.LOG_TAG, "TopLayout---top parent width = " + w + ",top parent height = " + h
28 | + "oldwidth = " + oldw + ",oldheight = " + oldh);
29 | }
30 |
31 | private void setWidthAndHeight(int oldw, int oldh) {
32 | ViewGroup.LayoutParams lp = getLayoutParams();
33 | lp.width = oldw;
34 | lp.height = oldh;
35 | setLayoutParams(lp);
36 | }
37 |
38 | @Override
39 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
40 | super.onMeasure(MeasureSpec.makeMeasureSpec(displayMetrics.widthPixels, MeasureSpec.AT_MOST), MeasureSpec.makeMeasureSpec((int) FixKeyBoardDistance(displayMetrics.heightPixels), MeasureSpec.AT_MOST));
41 | }
42 |
43 | private float FixKeyBoardDistance(int defaultDistance) {
44 | Rect frame = new Rect();
45 | ((Activity) mContext).getWindow().getDecorView().getWindowVisibleDisplayFrame(frame);
46 | int statusBarHeight = frame.top;
47 | float keyboardDistance = ((float) defaultDistance - (float) statusBarHeight);
48 | return keyboardDistance;
49 | }
50 |
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/ui/base/fragment/CommentItem.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.ui.base.fragment;
2 |
3 | /**
4 | * Created by eflakemac on 15/12/9.
5 | */
6 | public class CommentItem {
7 | public String user;
8 | public String comment;
9 | public String time;
10 |
11 | public void setUser(String user) {
12 | this.user = user;
13 | }
14 |
15 | public void setComment(String comment) {
16 | this.comment = comment;
17 | }
18 |
19 | public void setTime(String time) {
20 | this.time = time;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/ui/base/fragment/CommentListAdapter.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.ui.base.fragment;
2 |
3 | import android.content.Context;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.BaseAdapter;
8 | import android.widget.ImageView;
9 | import android.widget.TextView;
10 |
11 | import com.ksy.mediaPlayer.widget.R;
12 |
13 | import java.util.ArrayList;
14 |
15 | /**
16 | * Created by eflakemac on 15/12/9.
17 | */
18 | public class CommentListAdapter extends BaseAdapter {
19 |
20 | private final ArrayList items;
21 | private final Context context;
22 |
23 | public CommentListAdapter(Context context, ArrayList items) {
24 | this.context = context;
25 | this.items = items;
26 | }
27 |
28 | @Override
29 | public int getCount() {
30 | return items.size();
31 | }
32 |
33 | @Override
34 | public CommentItem getItem(int position) {
35 | return items.get(position);
36 | }
37 |
38 | @Override
39 | public long getItemId(int position) {
40 | return position;
41 | }
42 |
43 | @Override
44 | public View getView(int position, View convertView, ViewGroup parent) {
45 | ViewHolder holder;
46 | if (convertView == null) {
47 | holder = new ViewHolder();
48 | convertView = LayoutInflater.from(context).inflate(R.layout.video_comment_list_item_layout, null);
49 | holder.user_tv = (TextView) convertView.findViewById(R.id.user_tv);
50 | holder.comment_tv = (TextView) convertView.findViewById(R.id.comment_tv);
51 | holder.time_tv = (TextView) convertView.findViewById(R.id.time_tv);
52 | holder.headImg = (ImageView) convertView.findViewById(R.id.icon_img);
53 | convertView.setTag(holder);
54 | } else {
55 | holder = (ViewHolder) convertView.getTag();
56 | }
57 | holder.comment_tv.setText(getItem(position).comment);
58 | holder.time_tv.setText(getItem(position).time);
59 | holder.user_tv.setText(getItem(position).user);
60 | return convertView;
61 | }
62 |
63 | static class ViewHolder {
64 | public TextView user_tv;
65 | public TextView time_tv;
66 | public TextView comment_tv;
67 | public ImageView headImg;
68 |
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/ui/base/fragment/DetailFragment.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.ui.base.fragment;
2 |
3 |
4 | import android.os.Bundle;
5 | import android.support.v4.app.Fragment;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.Toast;
10 |
11 | import com.ksy.mediaPlayer.widget.R;
12 |
13 | public class DetailFragment extends Fragment implements View.OnClickListener {
14 | private static final String ARG_PARAM1 = "param1";
15 | private static final String ARG_PARAM2 = "param2";
16 |
17 | private String mParam1;
18 | private String mParam2;
19 | private View follow_btn;
20 |
21 |
22 | public DetailFragment() {
23 | // Required empty public constructor
24 | }
25 |
26 | public static Fragment newInstance(String param1, String param2) {
27 | DetailFragment fragment = new DetailFragment();
28 | Bundle args = new Bundle();
29 | args.putString(ARG_PARAM1, param1);
30 | args.putString(ARG_PARAM2, param2);
31 | fragment.setArguments(args);
32 | return fragment;
33 | }
34 |
35 | @Override
36 | public void onCreate(Bundle savedInstanceState) {
37 | super.onCreate(savedInstanceState);
38 | if (getArguments() != null) {
39 | mParam1 = getArguments().getString(ARG_PARAM1);
40 | mParam2 = getArguments().getString(ARG_PARAM2);
41 | }
42 | }
43 |
44 | @Override
45 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
46 | Bundle savedInstanceState) {
47 | return inflater.inflate(R.layout.fragment_video_detail, container, false);
48 | }
49 |
50 | @Override
51 | public void onViewCreated(View view, Bundle savedInstanceState) {
52 | follow_btn = view.findViewById(R.id.follow_btn);
53 | follow_btn.setOnClickListener(this);
54 | }
55 |
56 | @Override
57 | public void onClick(View v) {
58 | Toast.makeText(getActivity(), "follow", Toast.LENGTH_SHORT).show();
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/ui/base/fragment/RecommendItem.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.ui.base.fragment;
2 |
3 | /**
4 | * Created by eflakemac on 15/12/9.
5 | */
6 | public class RecommendItem {
7 | public String title;
8 | public String watch;
9 | public String time;
10 | public String content;
11 |
12 | public void setTitle(String title) {
13 | this.title = title;
14 | }
15 |
16 | public void setWatch(String watch) {
17 | this.watch = watch;
18 | }
19 |
20 | public void setContent(String content) {
21 | this.content = content;
22 | }
23 |
24 | public void setTime(String time) {
25 | this.time = time;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/ui/base/fragment/RecommendListAdapter.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.ui.base.fragment;
2 |
3 | import android.content.Context;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.BaseAdapter;
8 | import android.widget.ImageView;
9 | import android.widget.TextView;
10 |
11 | import com.ksy.mediaPlayer.widget.R;
12 |
13 | import java.util.ArrayList;
14 |
15 | /**
16 | * Created by eflakemac on 15/12/9.
17 | */
18 | public class RecommendListAdapter extends BaseAdapter {
19 |
20 | private final ArrayList items;
21 | private final Context context;
22 |
23 | public RecommendListAdapter(Context context, ArrayList items) {
24 | this.context = context;
25 | this.items = items;
26 | }
27 |
28 | @Override
29 | public int getCount() {
30 | return items.size();
31 | }
32 |
33 | @Override
34 | public RecommendItem getItem(int position) {
35 | return items.get(position);
36 | }
37 |
38 | @Override
39 | public long getItemId(int position) {
40 | return position;
41 | }
42 |
43 | @Override
44 | public View getView(int position, View convertView, ViewGroup parent) {
45 | ViewHolder holder;
46 | if (convertView == null) {
47 | holder = new ViewHolder();
48 | convertView = LayoutInflater.from(context).inflate(R.layout.video_recomment_list_item_layout, null);
49 | holder.title_tv = (TextView) convertView.findViewById(R.id.title_tv);
50 | holder.watch_tv = (TextView) convertView.findViewById(R.id.watch_tv);
51 | holder.time_tv = (TextView) convertView.findViewById(R.id.time_tv);
52 | holder.content_tv = (TextView) convertView.findViewById(R.id.content_tv);
53 | holder.headImg = (ImageView) convertView.findViewById(R.id.icon_img);
54 | convertView.setTag(holder);
55 | } else {
56 | holder = (ViewHolder) convertView.getTag();
57 | }
58 | holder.title_tv.setText(getItem(position).title);
59 | holder.time_tv.setText(getItem(position).time);
60 | holder.watch_tv.setText(getItem(position).watch);
61 | holder.content_tv.setText(getItem(position).content);
62 | return convertView;
63 | }
64 |
65 | static class ViewHolder {
66 | public TextView title_tv;
67 | public TextView time_tv;
68 | public TextView watch_tv;
69 | public TextView content_tv;
70 | public ImageView headImg;
71 |
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/VideoWidgetLib/src/main/java/com/ksy/media/widget/ui/live/LiveChatAdapter.java:
--------------------------------------------------------------------------------
1 | package com.ksy.media.widget.ui.live;
2 |
3 | import java.util.List;
4 | import java.util.Map;
5 | import android.content.Context;
6 | import android.util.Log;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 | import android.widget.BaseAdapter;
11 | import android.widget.ImageView;
12 | import android.widget.TextView;
13 |
14 | import com.ksy.mediaPlayer.widget.R;
15 |
16 | public class LiveChatAdapter extends BaseAdapter {
17 |
18 | private LayoutInflater mInflater = null;
19 | private List