├── .gitignore
├── KsyunPlayerDemo
├── .gitignore
├── .idea
│ ├── compiler.xml
│ ├── copyright
│ │ └── profiles_settings.xml
│ ├── gradle.xml
│ ├── modules.xml
│ └── runConfigurations.xml
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── libs
│ │ ├── arm64-v8a
│ │ │ └── libBugly.so
│ │ ├── armeabi-v7a
│ │ │ └── libBugly.so
│ │ └── bugly_crashreport_upgrade-1.3.1.aar
│ ├── proguard-rules.pro
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── ksyun
│ │ │ └── player
│ │ │ └── demo
│ │ │ ├── ChooseActivity.java
│ │ │ ├── PlayerApplication.java
│ │ │ └── SplashActivity.java
│ │ └── res
│ │ ├── drawable
│ │ ├── change_to_oldversion.png
│ │ ├── live.png
│ │ ├── splash_background.png
│ │ ├── to_old_version.xml
│ │ └── vod.png
│ │ ├── layout
│ │ ├── activity_choose.xml
│ │ └── activity_splash.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── newplayerdemo
│ ├── .gitignore
│ ├── build.gradle
│ ├── libs
│ │ ├── fastjson-1.1.33.jar
│ │ └── zxing.jar
│ ├── proguard-rules.pro
│ └── src
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── ksyun
│ │ │ │ └── player
│ │ │ │ └── now
│ │ │ │ ├── activity
│ │ │ │ ├── CaptureNewActivity.java
│ │ │ │ ├── LiveDisplayActivity.java
│ │ │ │ ├── LiveMainActivity.java
│ │ │ │ ├── SettingNewActivity.java
│ │ │ │ ├── VodDisplayActivity.java
│ │ │ │ └── VodMainActivity.java
│ │ │ │ ├── adapter
│ │ │ │ ├── LiveMainAdapter.java
│ │ │ │ ├── VodDiaplayAdapter.java
│ │ │ │ └── VodMainAdapter.java
│ │ │ │ ├── bean
│ │ │ │ ├── LiveBean.java
│ │ │ │ ├── QosBean.java
│ │ │ │ └── VodBean.java
│ │ │ │ ├── model
│ │ │ │ ├── FloatingPlayer.java
│ │ │ │ └── NetState.java
│ │ │ │ ├── utils
│ │ │ │ ├── AbstractPathAnimator.java
│ │ │ │ ├── CpuInfo.java
│ │ │ │ ├── Dialog.java
│ │ │ │ ├── Display.java
│ │ │ │ ├── Ids.java
│ │ │ │ ├── MyRequest.java
│ │ │ │ ├── NetStateUtil.java
│ │ │ │ ├── PathAnimator.java
│ │ │ │ ├── PixelUtils.java
│ │ │ │ ├── QosInfoThread.java
│ │ │ │ ├── Setting.java
│ │ │ │ ├── Strings.java
│ │ │ │ └── Urls.java
│ │ │ │ ├── view
│ │ │ │ ├── DisplayProgressBar.java
│ │ │ │ ├── FloatWindowView.java
│ │ │ │ ├── HeartLayout.java
│ │ │ │ ├── HeartView.java
│ │ │ │ ├── RecordingProgressBar.java
│ │ │ │ ├── VerticalSeekBar.java
│ │ │ │ └── VideoLoadMoreListView.java
│ │ │ │ └── zxing
│ │ │ │ ├── camera
│ │ │ │ ├── AutoFocusCallback.java
│ │ │ │ ├── CameraConfigurationManager.java
│ │ │ │ ├── CameraManager.java
│ │ │ │ ├── FlashlightManager.java
│ │ │ │ ├── PlanarYUVLuminanceSource.java
│ │ │ │ └── PreviewCallback.java
│ │ │ │ ├── decoding
│ │ │ │ ├── CaptureActivityHandler.java
│ │ │ │ ├── DecodeFormatManager.java
│ │ │ │ ├── DecodeHandler.java
│ │ │ │ ├── DecodeThread.java
│ │ │ │ ├── FinishListener.java
│ │ │ │ ├── InactivityTimer.java
│ │ │ │ └── Intents.java
│ │ │ │ ├── encoding
│ │ │ │ └── EncodingHandler.java
│ │ │ │ └── view
│ │ │ │ ├── ViewfinderResultPointCallback.java
│ │ │ │ └── ViewfinderView.java
│ │ └── res
│ │ │ ├── drawable-xxhdpi
│ │ │ ├── btn_like2_h.png
│ │ │ ├── heart.png
│ │ │ ├── heart0.png
│ │ │ ├── heart1.png
│ │ │ ├── heart10.png
│ │ │ ├── heart11.png
│ │ │ ├── heart2.png
│ │ │ ├── heart3.png
│ │ │ ├── heart4.png
│ │ │ ├── heart5.png
│ │ │ ├── heart6.png
│ │ │ ├── heart7.png
│ │ │ ├── heart8.png
│ │ │ ├── heart9.png
│ │ │ ├── icon_like_png.png
│ │ │ ├── icon_like_pressed.png
│ │ │ └── icon_red_hearts.png
│ │ │ ├── drawable
│ │ │ ├── config.png
│ │ │ ├── dialog_bg.xml
│ │ │ ├── full_screen.png
│ │ │ ├── icon_like.xml
│ │ │ ├── list_select_bg.xml
│ │ │ ├── next.png
│ │ │ ├── panel_bg.xml
│ │ │ ├── player_seekbar.xml
│ │ │ ├── player_seekbar_selector.xml
│ │ │ ├── player_seekbar_thumb.xml
│ │ │ ├── po_seekbar.xml
│ │ │ ├── point.xml
│ │ │ ├── progress_anim.xml
│ │ │ ├── progress_bar.xml
│ │ │ ├── radio_button.xml
│ │ │ ├── text_color.xml
│ │ │ ├── thumb.xml
│ │ │ └── zxing.png
│ │ │ ├── layout
│ │ │ ├── activity_live_display_landscape.xml
│ │ │ ├── activity_live_display_portrait.xml
│ │ │ ├── activity_live_main.xml
│ │ │ ├── activity_setting_new.xml
│ │ │ ├── activity_vod_display.xml
│ │ │ ├── activity_vod_main.xml
│ │ │ ├── camera_new.xml
│ │ │ ├── floating_player_window.xml
│ │ │ ├── footer_view.xml
│ │ │ ├── header_view.xml
│ │ │ ├── item_vod_display.xml
│ │ │ ├── item_vod_main.xml
│ │ │ ├── item_vod_main_header.xml
│ │ │ └── ly_periscope.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── cover.png
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── back.png
│ │ │ ├── brightness.png
│ │ │ ├── cap_pause.png
│ │ │ ├── checked.png
│ │ │ ├── close.png
│ │ │ ├── close_floating_window.png
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_round.png
│ │ │ ├── like.png
│ │ │ ├── loading_1.png
│ │ │ ├── loading_10.png
│ │ │ ├── loading_11.png
│ │ │ ├── loading_12.png
│ │ │ ├── loading_2.png
│ │ │ ├── loading_3.png
│ │ │ ├── loading_4.png
│ │ │ ├── loading_5.png
│ │ │ ├── loading_6.png
│ │ │ ├── loading_7.png
│ │ │ ├── loading_8.png
│ │ │ ├── loading_9.png
│ │ │ ├── logo.png
│ │ │ ├── mirror.png
│ │ │ ├── more.png
│ │ │ ├── next.png
│ │ │ ├── novolumn.png
│ │ │ ├── open.png
│ │ │ ├── rotation.png
│ │ │ ├── screen_cap.png
│ │ │ ├── screen_shot.png
│ │ │ ├── start.png
│ │ │ ├── stop_full_screen.png
│ │ │ ├── stop_not_full_screen.png
│ │ │ ├── unchecked.png
│ │ │ ├── volumn.png
│ │ │ └── volumn1.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── raw
│ │ │ ├── beep.ogg
│ │ │ └── realm_properties
│ │ │ ├── values-v19
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ ├── attrs.xml
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ ├── ids.xml
│ │ │ ├── integers.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── ksyun
│ │ └── player
│ │ └── now
│ │ └── ExampleUnitTest.java
├── oldplayerdemo
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── ksyun
│ │ │ └── player
│ │ │ └── old
│ │ │ └── ApplicationTest.java
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── ksyun
│ │ │ │ └── player
│ │ │ │ └── old
│ │ │ │ ├── model
│ │ │ │ ├── KSYFloatingPlayer.java
│ │ │ │ ├── MyVideoThumbLoader.java
│ │ │ │ ├── NetDbAdapter.java
│ │ │ │ ├── NetState.java
│ │ │ │ ├── NetbaseHelper.java
│ │ │ │ └── Strings.java
│ │ │ │ ├── ui
│ │ │ │ ├── activity
│ │ │ │ │ ├── CaptureActivity.java
│ │ │ │ │ ├── HistoryActivity.java
│ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ ├── NetMediaActivty.java
│ │ │ │ │ ├── SettingActivity.java
│ │ │ │ │ └── player
│ │ │ │ │ │ ├── FloatingPlayingActivity.java
│ │ │ │ │ │ ├── FloatingVideoActivity.java
│ │ │ │ │ │ ├── MediaPlayerActivity.java
│ │ │ │ │ │ ├── TextureVideoActivity.java
│ │ │ │ │ │ └── TextureVodActivity.java
│ │ │ │ ├── fragment
│ │ │ │ │ ├── LocalFragment.java
│ │ │ │ │ ├── StreamInfoFragment.java
│ │ │ │ │ └── SubtitleExplorerFragment.java
│ │ │ │ ├── others
│ │ │ │ │ ├── JieVideoListViewAdapter.java
│ │ │ │ │ └── StreamInfoAdapter.java
│ │ │ │ └── view
│ │ │ │ │ ├── KSYFloatingWindowView.java
│ │ │ │ │ └── LoadMoreListView.java
│ │ │ │ ├── util
│ │ │ │ ├── Cpu.java
│ │ │ │ ├── Extensions.java
│ │ │ │ ├── LoadedImage.java
│ │ │ │ ├── NetStateUtil.java
│ │ │ │ ├── ProgressTextView.java
│ │ │ │ ├── QosObject.java
│ │ │ │ ├── QosThread.java
│ │ │ │ ├── RawResourceReader.java
│ │ │ │ ├── Settings.java
│ │ │ │ ├── VerticalSeekBar.java
│ │ │ │ └── Video.java
│ │ │ │ └── zxing
│ │ │ │ ├── camera
│ │ │ │ ├── AutoFocusCallback.java
│ │ │ │ ├── CameraConfigurationManager.java
│ │ │ │ ├── CameraManager.java
│ │ │ │ ├── FlashlightManager.java
│ │ │ │ ├── PlanarYUVLuminanceSource.java
│ │ │ │ └── PreviewCallback.java
│ │ │ │ ├── decoding
│ │ │ │ ├── CaptureActivityHandler.java
│ │ │ │ ├── DecodeFormatManager.java
│ │ │ │ ├── DecodeHandler.java
│ │ │ │ ├── DecodeThread.java
│ │ │ │ ├── FinishListener.java
│ │ │ │ ├── InactivityTimer.java
│ │ │ │ └── Intents.java
│ │ │ │ ├── encoding
│ │ │ │ └── EncodingHandler.java
│ │ │ │ └── view
│ │ │ │ ├── ViewfinderResultPointCallback.java
│ │ │ │ └── ViewfinderView.java
│ │ ├── libs
│ │ │ └── zxing.jar
│ │ └── res
│ │ │ ├── anim
│ │ │ ├── slide_in_bottom.xml
│ │ │ ├── slide_in_top.xml
│ │ │ ├── slide_left_in.xml
│ │ │ ├── slide_left_out.xml
│ │ │ ├── slide_out_bottom.xml
│ │ │ ├── slide_out_top.xml
│ │ │ ├── slide_right_in.xml
│ │ │ ├── slide_right_out.xml
│ │ │ └── slide_stand.xml
│ │ │ ├── drawable
│ │ │ ├── file.png
│ │ │ ├── ksy_floating_back.png
│ │ │ ├── ksy_floating_btn.png
│ │ │ ├── ksy_floating_close.png
│ │ │ ├── ksy_pause_btn.png
│ │ │ ├── ksy_playing_btn.png
│ │ │ ├── live_reload.png
│ │ │ ├── mirror.png
│ │ │ ├── player_panel_background.xml
│ │ │ ├── player_seekbar.xml
│ │ │ ├── player_seekbar_selector.xml
│ │ │ ├── player_seekbar_thumb.xml
│ │ │ ├── reload.png
│ │ │ ├── rotate.png
│ │ │ ├── scale.png
│ │ │ ├── scale_fit.png
│ │ │ ├── screen.png
│ │ │ ├── video_image.png
│ │ │ └── voice.png
│ │ │ ├── layout
│ │ │ ├── activity_floating.xml
│ │ │ ├── activity_floating_playing.xml
│ │ │ ├── activity_history.xml
│ │ │ ├── activity_main.xml
│ │ │ ├── activity_media_player.xml
│ │ │ ├── activity_net.xml
│ │ │ ├── activity_setting.xml
│ │ │ ├── activity_vod.xml
│ │ │ ├── camera.xml
│ │ │ ├── floating_window.xml
│ │ │ ├── fragment_local.xml
│ │ │ ├── fragment_stream_info.xml
│ │ │ ├── fragment_subtitle_explorer.xml
│ │ │ ├── list_local.xml
│ │ │ ├── listview_footer_view.xml
│ │ │ ├── media_actionbar.xml
│ │ │ ├── net_actionbar.xml
│ │ │ ├── stream_info_item.xml
│ │ │ └── texture_player.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── raw
│ │ │ ├── beep.ogg
│ │ │ └── realm_properties
│ │ │ ├── values-w820dp
│ │ │ └── dimens.xml
│ │ │ └── values
│ │ │ ├── attr.xml
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ ├── ids.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── ksyun
│ │ └── player
│ │ └── old
│ │ └── ExampleUnitTest.java
├── playerlib
│ ├── .gitignore
│ ├── build.gradle
│ ├── libs
│ │ ├── arm64-v8a
│ │ │ └── libksyplayer.so
│ │ ├── armeabi-v7a
│ │ │ └── libksyplayer.so
│ │ ├── libksyplayer.jar
│ │ └── libksystat.jar
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── demo
│ │ │ └── playerlib
│ │ │ └── ApplicationTest.java
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ └── res
│ │ │ └── values
│ │ │ └── strings.xml
│ │ └── test
│ │ └── java
│ │ └── demo
│ │ └── playerlib
│ │ └── ExampleUnitTest.java
└── settings.gradle
├── LICENSE
├── README.md
├── docs
├── assets
│ ├── customizations.css
│ ├── customizations.js
│ ├── doclava-developer-core.css
│ ├── doclava-developer-docs.css
│ ├── doclava-developer-docs.js
│ ├── doclava-developer-reference.js
│ ├── images
│ │ ├── bg_fade.jpg
│ │ ├── bg_logo.png
│ │ ├── body-gradient-tab.png
│ │ ├── body-gradient.png
│ │ ├── grad-rule-qv.png
│ │ ├── hr_gray_main.jpg
│ │ ├── hr_gray_side.jpg
│ │ ├── left_off.jpg
│ │ ├── left_on.jpg
│ │ ├── preliminary.png
│ │ ├── resizable-e.gif
│ │ ├── resizable-e2.gif
│ │ ├── resizable-eg.gif
│ │ ├── resizable-s.gif
│ │ ├── resizable-s2.gif
│ │ ├── resizable-sg.gif
│ │ ├── right_off.jpg
│ │ ├── right_on.jpg
│ │ ├── sidenav-rule.png
│ │ ├── spacer.gif
│ │ ├── triangle-closed-small.png
│ │ ├── triangle-closed.png
│ │ ├── triangle-opened-small.png
│ │ └── triangle-opened.png
│ ├── jquery-history.js
│ ├── jquery-resizable.min.js
│ ├── navtree_data.js
│ ├── prettify.js
│ ├── search_autocomplete.js
│ ├── style.css
│ └── triangle-none.gif
├── index.html
└── reference
│ ├── classes.html
│ ├── com
│ └── ksyun
│ │ └── media
│ │ └── player
│ │ ├── IMediaController.MediaPlayerControl.html
│ │ ├── IMediaController.html
│ │ ├── IMediaPlayer.OnBufferingUpdateListener.html
│ │ ├── IMediaPlayer.OnCompletionListener.html
│ │ ├── IMediaPlayer.OnErrorListener.html
│ │ ├── IMediaPlayer.OnInfoListener.html
│ │ ├── IMediaPlayer.OnLogEventListener.html
│ │ ├── IMediaPlayer.OnMessageListener.html
│ │ ├── IMediaPlayer.OnPreparedListener.html
│ │ ├── IMediaPlayer.OnSeekCompleteListener.html
│ │ ├── IMediaPlayer.OnTimedTextListener.html
│ │ ├── IMediaPlayer.OnVideoSizeChangedListener.html
│ │ ├── IMediaPlayer.html
│ │ ├── KSYHardwareDecodeWhiteList.html
│ │ ├── KSYLibraryManager.html
│ │ ├── KSYMediaMeta.KSYStreamMeta.html
│ │ ├── KSYMediaMeta.html
│ │ ├── KSYMediaPlayer.Builder.html
│ │ ├── KSYMediaPlayer.KSYDecodeMode.html
│ │ ├── KSYMediaPlayer.KSYDeinterlaceMode.html
│ │ ├── KSYMediaPlayer.KSYReloadMode.html
│ │ ├── KSYMediaPlayer.OnAudioPCMListener.html
│ │ ├── KSYMediaPlayer.OnVideoRawDataListener.html
│ │ ├── KSYMediaPlayer.OnVideoTextureListener.html
│ │ ├── KSYMediaPlayer.html
│ │ ├── KSYMediaRecorder.html
│ │ ├── KSYNetworkDetector.KSYDetectorPacketType.html
│ │ ├── KSYNetworkDetector.OnNetworkDetectionEventListener.html
│ │ ├── KSYNetworkDetector.html
│ │ ├── KSYTextureView.html
│ │ ├── KSYVideoView.html
│ │ ├── MediaInfo.html
│ │ ├── annotations
│ │ ├── AccessedByNative.html
│ │ └── CalledByNative.html
│ │ ├── detector
│ │ ├── KSYNetworkTrackerConfig.html
│ │ ├── KSYTrackerRouterInfo.html
│ │ ├── package-descr.html
│ │ └── package-summary.html
│ │ ├── misc
│ │ ├── AndroidTrackInfo.html
│ │ ├── KSYListSourceMgr.html
│ │ ├── KSYProbeMediaInfo.KSYAudioCodecType.html
│ │ ├── KSYProbeMediaInfo.KSYAudioSampleFormat.html
│ │ ├── KSYProbeMediaInfo.KSYMediaFormat.html
│ │ ├── KSYProbeMediaInfo.KSYProbeMediaData.html
│ │ ├── KSYProbeMediaInfo.KSYVideoCodecType.html
│ │ ├── KSYProbeMediaInfo.html
│ │ ├── KSYQosInfo.html
│ │ ├── KSYTrackInfo.html
│ │ ├── package-descr.html
│ │ └── package-summary.html
│ │ ├── package-descr.html
│ │ ├── package-summary.html
│ │ └── recorder
│ │ ├── AudioRecorderConfig.html
│ │ ├── VideoRecorderConfig.html
│ │ ├── package-descr.html
│ │ └── package-summary.html
│ ├── current.xml
│ ├── hierarchy.html
│ ├── index.html
│ ├── lists.js
│ ├── package-list
│ └── packages.html
├── libs_live
├── arm64-v8a
│ └── libksyplayer.so
├── armeabi-v7a
│ └── libksyplayer.so
├── armeabi
│ └── libksyplayer.so
├── libksyplayer.jar
├── libksystat.jar
├── x86
│ └── libksyplayer.so
└── x86_64
│ └── libksyplayer.so
├── libs_vod
├── arm64-v8a
│ └── libksyplayer.so
├── armeabi-v7a
│ └── libksyplayer.so
├── armeabi
│ └── libksyplayer.so
├── libksyplayer.jar
├── libksystat.jar
├── x86
│ └── libksyplayer.so
└── x86_64
│ └── libksyplayer.so
└── src
├── KSYTextureView.java
├── KSYVideoView.java
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by https://www.gitignore.io/api/android
2 | .DS_Store
3 | ### Android ###
4 | # Built application files
5 | *.ap_
6 | .idea/
7 |
8 | # Files for the Dalvik VM
9 | *.dex
10 |
11 | # Java class files
12 | *.class
13 |
14 | # Generated files
15 | bin/
16 | gen/
17 |
18 | # Gradle files
19 | .gradle/
20 | build/
21 |
22 | # Local configuration file (sdk path, etc)
23 | local.properties
24 |
25 | # Proguard folder generated by Eclipse
26 | proguard/
27 |
28 | # Log Files
29 | *.log
30 |
31 | # Android Studio Navigation editor temp files
32 | .navigation/
33 |
34 | # Android Studio captures folder
35 | captures/
36 |
37 | ### Android Patch ###
38 | gen-external-apklibs
39 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/.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 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
20 |
21 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | apply plugin: 'android-apt'
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "25.0.0"
6 |
7 | defaultConfig {
8 | applicationId "com.ksyun.player.demo"
9 | minSdkVersion 16
10 | targetSdkVersion 22
11 | versionCode 223
12 | versionName "2.2.3"
13 |
14 | ndk {
15 | abiFilters 'armeabi-v7a', 'arm64-v8a'
16 | }
17 |
18 | }
19 | buildTypes {
20 | release {
21 | minifyEnabled false
22 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
23 | }
24 | }
25 | sourceSets.main {
26 | jniLibs.srcDirs 'libs'
27 | jni.srcDirs = [] // This prevents the auto generation of Android.mk
28 | manifest.srcFile 'src/main/AndroidManifest.xml'
29 | }
30 | }
31 | repositories {
32 | flatDir {
33 | dirs 'libs'
34 | }
35 | }
36 |
37 | dependencies {
38 | compile fileTree(dir: 'libs', include: ['*.jar'])
39 | compile fileTree(include: ['*.jar'], dir: 'libs')
40 | compile fileTree(include: '*/so', dir: 'libs/armeabi-v7a')
41 | compile fileTree(include: '*/so', dir: 'libs/arm64-v8a')
42 | compile(name:'bugly_crashreport_upgrade-1.3.1', ext:'aar')
43 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
44 | exclude group: 'com.android.support', module: 'support-annotations'
45 | })
46 | compile project(':oldplayerdemo')
47 | compile project(':newplayerdemo')
48 | compile project(':playerlib')
49 |
50 | compile 'com.android.support:appcompat-v7:25.3.1'
51 | compile 'com.android.support:design:25.3.1'
52 | compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
53 | testCompile 'junit:junit:4.12'
54 | compile 'com.github.mzule.activityrouter:activityrouter:1.2.2'
55 | apt 'com.github.mzule.activityrouter:compiler:1.1.7'
56 | }
57 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/libs/arm64-v8a/libBugly.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ksvc/KSYMediaPlayer_Android/2a90ecdfe78cb9315a01e3a528c76658807a4819/KsyunPlayerDemo/app/libs/arm64-v8a/libBugly.so
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/libs/armeabi-v7a/libBugly.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ksvc/KSYMediaPlayer_Android/2a90ecdfe78cb9315a01e3a528c76658807a4819/KsyunPlayerDemo/app/libs/armeabi-v7a/libBugly.so
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/libs/bugly_crashreport_upgrade-1.3.1.aar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ksvc/KSYMediaPlayer_Android/2a90ecdfe78cb9315a01e3a528c76658807a4819/KsyunPlayerDemo/app/libs/bugly_crashreport_upgrade-1.3.1.aar
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/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/zhangyunlong/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 interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
16 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/src/main/java/com/ksyun/player/demo/PlayerApplication.java:
--------------------------------------------------------------------------------
1 | package com.ksyun.player.demo;
2 |
3 | import android.app.Application;
4 |
5 | import com.ksyun.media.player.KSYHardwareDecodeWhiteList;
6 | import com.tencent.bugly.Bugly;
7 |
8 | /**
9 | * Created by admin on 17/6/21.
10 | */
11 |
12 | public class PlayerApplication extends Application{
13 | @Override
14 | public void onCreate() {
15 | super.onCreate();
16 |
17 | Bugly.init(getApplicationContext(), "fa7327d922", true);
18 | Bugly.setAppChannel(getApplicationContext(), "public");
19 |
20 | // 初始化金山云的Android硬解白名单功能, 此功能需与金山云服务器通信,建议尽早调用
21 | // 若不想使用该功能,请勿调用此接口
22 | KSYHardwareDecodeWhiteList.getInstance().init(this);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/src/main/java/com/ksyun/player/demo/SplashActivity.java:
--------------------------------------------------------------------------------
1 | package com.ksyun.player.demo;
2 |
3 | import android.content.Intent;
4 | import android.content.pm.PackageInfo;
5 | import android.content.pm.PackageManager;
6 | import android.os.Build;
7 | import android.os.Bundle;
8 | import android.support.v7.app.AppCompatActivity;
9 | import android.view.View;
10 | import android.view.WindowManager;
11 | import android.widget.Button;
12 | import android.widget.TextView;
13 |
14 | import com.github.mzule.activityrouter.annotation.Module;
15 | import com.github.mzule.activityrouter.annotation.Modules;
16 |
17 | import java.util.Timer;
18 | import java.util.TimerTask;
19 |
20 |
21 |
22 | @Modules({"app", "oldplayerdemo", "newplayerdemo"})
23 | @Module("app")
24 | public class SplashActivity extends AppCompatActivity {
25 |
26 | private Button button;
27 | private TextView textView;
28 | private Timer timer;
29 | private TimerTask timerTask;
30 | @Override
31 | protected void onCreate(Bundle savedInstanceState) {
32 | super.onCreate(savedInstanceState);
33 | setContentView(R.layout.activity_splash);
34 | if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.KITKAT){
35 | this.getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
36 | }
37 | button=(Button)findViewById(R.id.button);
38 | button.setOnClickListener(new View.OnClickListener() {
39 | @Override
40 | public void onClick(View view) {
41 | jumpToNext();
42 |
43 | }
44 | });
45 | textView=(TextView)findViewById(R.id.sdk_version);
46 | String version=getVersion();
47 | if(!version.equals("error")){
48 | textView.setText("SDK V"+version+"版本");
49 | }
50 | setTimer();
51 | }
52 | private void setTimer(){
53 | timerTask=new MyTimerTask();
54 | timer=new Timer();
55 | timer.schedule(timerTask,3000);
56 | }
57 | private void jumpToNext(){
58 | Intent intent=new Intent(SplashActivity.this, ChooseActivity.class);
59 | startActivity(intent);
60 | timer.cancel();
61 | finish();
62 | }
63 | private String getVersion(){
64 | try {
65 | PackageManager manager=getPackageManager();
66 | PackageInfo packageInfo=manager.getPackageInfo(getPackageName(),0);
67 | String version=packageInfo.versionName;
68 | return version;
69 | } catch (PackageManager.NameNotFoundException e) {
70 | e.printStackTrace();
71 | return "error";
72 | }
73 |
74 | }
75 | private class MyTimerTask extends TimerTask
76 | {
77 | @Override
78 | public void run() {
79 | jumpToNext();
80 | }
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/src/main/res/drawable/change_to_oldversion.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ksvc/KSYMediaPlayer_Android/2a90ecdfe78cb9315a01e3a528c76658807a4819/KsyunPlayerDemo/app/src/main/res/drawable/change_to_oldversion.png
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/src/main/res/drawable/live.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ksvc/KSYMediaPlayer_Android/2a90ecdfe78cb9315a01e3a528c76658807a4819/KsyunPlayerDemo/app/src/main/res/drawable/live.png
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/src/main/res/drawable/splash_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ksvc/KSYMediaPlayer_Android/2a90ecdfe78cb9315a01e3a528c76658807a4819/KsyunPlayerDemo/app/src/main/res/drawable/splash_background.png
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/src/main/res/drawable/to_old_version.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/src/main/res/drawable/vod.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ksvc/KSYMediaPlayer_Android/2a90ecdfe78cb9315a01e3a528c76658807a4819/KsyunPlayerDemo/app/src/main/res/drawable/vod.png
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/src/main/res/layout/activity_splash.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
16 |
24 |
34 |
43 |
51 |
52 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ksvc/KSYMediaPlayer_Android/2a90ecdfe78cb9315a01e3a528c76658807a4819/KsyunPlayerDemo/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ksvc/KSYMediaPlayer_Android/2a90ecdfe78cb9315a01e3a528c76658807a4819/KsyunPlayerDemo/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ksvc/KSYMediaPlayer_Android/2a90ecdfe78cb9315a01e3a528c76658807a4819/KsyunPlayerDemo/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ksvc/KSYMediaPlayer_Android/2a90ecdfe78cb9315a01e3a528c76658807a4819/KsyunPlayerDemo/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ksvc/KSYMediaPlayer_Android/2a90ecdfe78cb9315a01e3a528c76658807a4819/KsyunPlayerDemo/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ksvc/KSYMediaPlayer_Android/2a90ecdfe78cb9315a01e3a528c76658807a4819/KsyunPlayerDemo/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ksvc/KSYMediaPlayer_Android/2a90ecdfe78cb9315a01e3a528c76658807a4819/KsyunPlayerDemo/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ksvc/KSYMediaPlayer_Android/2a90ecdfe78cb9315a01e3a528c76658807a4819/KsyunPlayerDemo/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ksvc/KSYMediaPlayer_Android/2a90ecdfe78cb9315a01e3a528c76658807a4819/KsyunPlayerDemo/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ksvc/KSYMediaPlayer_Android/2a90ecdfe78cb9315a01e3a528c76658807a4819/KsyunPlayerDemo/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 | #FFFFFF
7 | #000000
8 | #ff2e4e
9 | #18181d
10 |
11 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | 金山视频云播放SDK
3 | 北京金山云网络技术有限公司
4 | 开启播放器
5 | 提供更专业可靠的直点播服务
6 | 切回旧版
7 | 点播
8 | 直播
9 |
10 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.3.3'
9 | classpath 'com.neenbedankt.gradle.plugins:android-apt:1.7'
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 | android.useDeprecatedNdk=true
--------------------------------------------------------------------------------
/KsyunPlayerDemo/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ksvc/KSYMediaPlayer_Android/2a90ecdfe78cb9315a01e3a528c76658807a4819/KsyunPlayerDemo/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/KsyunPlayerDemo/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Mar 08 11:39:20 CST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
7 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/newplayerdemo/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/newplayerdemo/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'android-apt'
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "25.0.0"
6 |
7 | defaultConfig {
8 | minSdkVersion 16
9 | targetSdkVersion 22
10 | versionCode 203
11 | versionName "2.0.3"
12 |
13 | //testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
14 | ndk {
15 | abiFilters 'armeabi-v7a', 'arm64-v8a'
16 | }
17 | }
18 | buildTypes {
19 | release {
20 | minifyEnabled false
21 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
22 | }
23 | }
24 | sourceSets.main {
25 | jniLibs.srcDirs 'libs'
26 | jni.srcDirs = [] // This prevents the auto generation of Android.mk
27 | manifest.srcFile 'src/main/AndroidManifest.xml'
28 | }
29 | }
30 | repositories {
31 | flatDir {
32 | dirs 'libs'
33 | }
34 | }
35 |
36 | dependencies {
37 | compile fileTree(include: ['*.jar'], dir: 'libs')
38 | compile files('libs/zxing.jar')
39 | compile project(':playerlib')
40 | compile files('libs/fastjson-1.1.33.jar')
41 | compile 'com.github.bumptech.glide:glide:3.7.0'
42 | compile 'com.squareup.okhttp3:okhttp:3.8.1'
43 | compile 'com.android.support:recyclerview-v7:25.3.1'
44 | compile 'com.android.support:appcompat-v7:25.3.1'
45 | compile 'com.github.mzule.activityrouter:activityrouter:1.2.2'
46 | compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
47 | testCompile 'junit:junit:4.12'
48 | apt 'com.github.mzule.activityrouter:compiler:1.1.7'
49 | }
50 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/newplayerdemo/libs/fastjson-1.1.33.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ksvc/KSYMediaPlayer_Android/2a90ecdfe78cb9315a01e3a528c76658807a4819/KsyunPlayerDemo/newplayerdemo/libs/fastjson-1.1.33.jar
--------------------------------------------------------------------------------
/KsyunPlayerDemo/newplayerdemo/libs/zxing.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ksvc/KSYMediaPlayer_Android/2a90ecdfe78cb9315a01e3a528c76658807a4819/KsyunPlayerDemo/newplayerdemo/libs/zxing.jar
--------------------------------------------------------------------------------
/KsyunPlayerDemo/newplayerdemo/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/zhangyunlong/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 interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/newplayerdemo/src/main/java/com/ksyun/player/now/adapter/VodDiaplayAdapter.java:
--------------------------------------------------------------------------------
1 | package com.ksyun.player.now.adapter;
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.bumptech.glide.Glide;
12 | import com.ksyun.player.now.R;
13 | import com.ksyun.player.now.bean.VodBean;
14 |
15 | import java.util.List;
16 |
17 | /**
18 | * Created by zhangyunlong on 2017/8/4.
19 | */
20 |
21 | public class VodDiaplayAdapter extends BaseAdapter {
22 | private Context context;
23 | private List videoList;
24 | public VodDiaplayAdapter(Context context,List videoList){
25 | this.context=context;
26 | this.videoList=videoList;
27 | }
28 | @Override
29 | public int getCount() {
30 | return videoList.size();
31 | }
32 |
33 | @Override
34 | public Object getItem(int i) {
35 | return videoList.get(i);
36 | }
37 |
38 | @Override
39 | public long getItemId(int i) {
40 | return i;
41 | }
42 |
43 | @Override
44 | public View getView(int i, View view, ViewGroup viewGroup) {
45 | ViewHolder holder;
46 | if(view==null){
47 | view= LayoutInflater.from(context).inflate(R.layout.item_vod_display,viewGroup,false);
48 | holder=new ViewHolder();
49 | holder.imageView=(ImageView)view.findViewById(R.id.imageView);
50 | holder.textView=(TextView)view.findViewById(R.id.textView);
51 | view.setTag(holder);
52 | }else{
53 | holder=(ViewHolder)view.getTag();
54 | }
55 | holder.textView.setText(videoList.get(i).getVideoTitle());
56 | Glide.with(context)
57 | .load(videoList.get(i).getCoverURL().get(1))
58 | .error(R.mipmap.cover)
59 | .into(holder.imageView);
60 | return view;
61 | }
62 |
63 | class ViewHolder
64 | {
65 | TextView textView;
66 | ImageView imageView;
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/newplayerdemo/src/main/java/com/ksyun/player/now/bean/QosBean.java:
--------------------------------------------------------------------------------
1 | package com.ksyun.player.now.bean;
2 |
3 | /**
4 | * Created by zhangyunlong on 2017/8/9.
5 | */
6 |
7 | public class QosBean {
8 | public QosBean(){}
9 |
10 | public String cpuUsage;
11 | public int pss;
12 | public int vss;
13 | }
14 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/newplayerdemo/src/main/java/com/ksyun/player/now/model/FloatingPlayer.java:
--------------------------------------------------------------------------------
1 | package com.ksyun.player.now.model;
2 |
3 | import android.content.Context;
4 |
5 | import com.ksyun.media.player.KSYTextureView;
6 |
7 | public class FloatingPlayer {
8 | private KSYTextureView mKsyTextureView;
9 | private static FloatingPlayer _instance;
10 |
11 | private FloatingPlayer() {}
12 |
13 | public static FloatingPlayer getInstance() {
14 | if (_instance == null) {
15 | synchronized (FloatingPlayer.class) {
16 | if (_instance == null)
17 | _instance = new FloatingPlayer();
18 | }
19 | }
20 |
21 | return _instance;
22 | }
23 |
24 | public void init(final Context context) {
25 | if (mKsyTextureView != null) {
26 | mKsyTextureView.release();
27 | mKsyTextureView = null;
28 | }
29 | mKsyTextureView=new KSYTextureView(context);
30 | }
31 | public KSYTextureView getKSYTextureView() {
32 | return mKsyTextureView;
33 | }
34 |
35 | public void destroy() {
36 | if (mKsyTextureView != null)
37 | mKsyTextureView.release();
38 |
39 | mKsyTextureView = null;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/newplayerdemo/src/main/java/com/ksyun/player/now/model/NetState.java:
--------------------------------------------------------------------------------
1 | package com.ksyun.player.now.model;
2 |
3 | import android.content.Context;
4 | import android.net.ConnectivityManager;
5 | import android.net.NetworkInfo;
6 |
7 | /**
8 | * Created by liubohua on 2017/1/6.
9 | */
10 | public class NetState {
11 |
12 | public static final int NETWORK_NONE = 997;
13 |
14 | public static final int NETWORK_WIFI = NETWORK_NONE + 1;
15 |
16 | public static final int NETWORK_MOBILE = NETWORK_WIFI + 1;
17 |
18 | public static int getNetWorkState(Context context) {
19 |
20 | ConnectivityManager connMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
21 |
22 | NetworkInfo wifiNetworkInfo = connMgr.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
23 |
24 | NetworkInfo dataNetworkInfo = connMgr.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
25 | if (wifiNetworkInfo != null && wifiNetworkInfo.isConnected()) {
26 | return NETWORK_WIFI;
27 | }
28 | if (dataNetworkInfo != null && dataNetworkInfo.isConnected()) {
29 | return NETWORK_MOBILE;
30 | }
31 | return NETWORK_NONE;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/newplayerdemo/src/main/java/com/ksyun/player/now/utils/Dialog.java:
--------------------------------------------------------------------------------
1 | package com.ksyun.player.now.utils;
2 |
3 | import android.graphics.drawable.AnimationDrawable;
4 | import android.view.View;
5 |
6 |
7 | public class Dialog {
8 | private static AnimationDrawable animationDrawable;
9 | private static View view;
10 |
11 | public static void init(View view1) {
12 | view = view1;
13 | animationDrawable = (AnimationDrawable) view.getBackground();
14 | }
15 |
16 | public static void show() {
17 | if (view.getVisibility() == View.GONE) {
18 | view.setVisibility(View.VISIBLE);
19 | }
20 | if(!animationDrawable.isRunning()){
21 | animationDrawable.start();
22 | }
23 | }
24 |
25 | public static void dismiss() {
26 | if (animationDrawable.isRunning()) {
27 | animationDrawable.stop();
28 | }
29 | if (view.getVisibility() == View.VISIBLE) {
30 | view.setVisibility(View.GONE);
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/newplayerdemo/src/main/java/com/ksyun/player/now/utils/Display.java:
--------------------------------------------------------------------------------
1 | package com.ksyun.player.now.utils;
2 |
3 | import android.app.Activity;
4 | import android.provider.Settings;
5 | import android.util.Log;
6 | import android.view.WindowManager;
7 |
8 | /**
9 | * 控制亮度显示
10 | */
11 |
12 | public class Display {
13 | private static float startLight,currentLight;
14 | public static void setLight(Activity context, float brightness, WindowManager.LayoutParams params){
15 | params.screenBrightness=brightness;
16 | context.getWindow().setAttributes(params);
17 | }
18 | public static float changeLight(Activity context,float total,float brightness, WindowManager.LayoutParams params){
19 | currentLight=startLight+(brightness/((total/2)));
20 | if(currentLight<0){
21 | currentLight=0f;
22 | }
23 | if(currentLight>1){
24 | currentLight=1.0f;
25 | }
26 | Log.i("light",""+currentLight);
27 | params.screenBrightness=currentLight;
28 | context.getWindow().setAttributes(params);
29 | return currentLight;
30 | }
31 | public static float getCurrentLight(){
32 | startLight=currentLight;
33 | return currentLight;
34 | }
35 | public static float getSystemBrightness(Activity context) {
36 | int systemBrightness = 0;
37 | try {
38 | systemBrightness = Settings.System.getInt(context.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS);
39 | } catch (Settings.SettingNotFoundException e) {
40 | e.printStackTrace();
41 | }
42 | startLight=((float)systemBrightness)/255.0f;
43 | Log.i("start",""+startLight+","+systemBrightness);
44 | return systemBrightness;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/newplayerdemo/src/main/java/com/ksyun/player/now/utils/Ids.java:
--------------------------------------------------------------------------------
1 | package com.ksyun.player.now.utils;
2 |
3 |
4 | public class Ids {
5 | public static int playingId;
6 |
7 | public static String PLAY_URL = "playUrl";
8 |
9 | public static String PLAY_ID = "playingId";
10 |
11 | public static String VIDEO_LIST = "videoList";
12 | }
13 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/newplayerdemo/src/main/java/com/ksyun/player/now/utils/MyRequest.java:
--------------------------------------------------------------------------------
1 | package com.ksyun.player.now.utils;
2 |
3 | import java.util.concurrent.TimeUnit;
4 |
5 | import okhttp3.Call;
6 | import okhttp3.Callback;
7 | import okhttp3.OkHttpClient;
8 | import okhttp3.Request;
9 |
10 |
11 | public class MyRequest {
12 | private static OkHttpClient client;
13 |
14 | public synchronized static OkHttpClient init() {
15 | if (client == null) {
16 | client = new OkHttpClient.Builder()
17 | .connectTimeout(5000, TimeUnit.SECONDS)
18 | .readTimeout(5000, TimeUnit.SECONDS)
19 | .writeTimeout(5000, TimeUnit.SECONDS)
20 | .build();
21 | }
22 | return client;
23 | }
24 |
25 |
26 | public static void doGet(String url, Callback callback) {
27 | Request request = new Request.Builder()
28 | .url(url)
29 | .build();
30 | Call call = client.newCall(request);
31 | call.enqueue(callback);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/newplayerdemo/src/main/java/com/ksyun/player/now/utils/NetStateUtil.java:
--------------------------------------------------------------------------------
1 | package com.ksyun.player.now.utils;
2 |
3 | import android.content.BroadcastReceiver;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.content.IntentFilter;
7 | import android.net.ConnectivityManager;
8 |
9 | import com.ksyun.player.now.model.NetState;
10 |
11 | public class NetStateUtil {
12 |
13 | private static NetStateBroadcastReceiver netStateBroadcastReceiver;
14 |
15 | public static void registerNetState(Context context, NetChangeListener netChangeListener) {
16 | if (netStateBroadcastReceiver == null) {
17 | netStateBroadcastReceiver = new NetStateBroadcastReceiver();
18 | }
19 | netStateBroadcastReceiver.addListener(netChangeListener);
20 | IntentFilter filter = new IntentFilter();
21 | filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
22 | context.registerReceiver(netStateBroadcastReceiver, filter);
23 | }
24 |
25 | public static void unregisterNetState(Context context) {
26 | context.unregisterReceiver(netStateBroadcastReceiver);
27 | }
28 |
29 |
30 | public static class NetStateBroadcastReceiver extends BroadcastReceiver {
31 | private NetChangeListener netChangeListener;
32 |
33 | @Override
34 | public void onReceive(Context context, Intent intent) {
35 | if (intent.getAction().equals(ConnectivityManager.CONNECTIVITY_ACTION)) {
36 | int netWorkState = NetState.getNetWorkState(context);
37 | if(netChangeListener!=null){
38 | netChangeListener.onNetStateChange(netWorkState);
39 | }
40 | }
41 | }
42 |
43 | public void addListener(NetChangeListener netChangeListener) {
44 | this.netChangeListener = netChangeListener;
45 | }
46 | }
47 |
48 | public interface NetChangeListener {
49 | void onNetStateChange(int netWorkState);
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/newplayerdemo/src/main/java/com/ksyun/player/now/utils/PixelUtils.java:
--------------------------------------------------------------------------------
1 | package com.ksyun.player.now.utils;
2 |
3 | import android.content.Context;
4 |
5 |
6 | public class PixelUtils {
7 | /**
8 | * 根据手机的分辨率从 dp 的单位 转成为 px(像素)
9 | */
10 | public static int dip2px(Context context, float dpValue) {
11 | final float scale = context.getResources().getDisplayMetrics().density;
12 | return (int) (dpValue * scale + 0.5f);
13 | }
14 |
15 | /**
16 | * 根据手机的分辨率从 px(像素) 的单位 转成为 dp
17 | */
18 | public static int px2dip(Context context, float pxValue) {
19 | final float scale = context.getResources().getDisplayMetrics().density;
20 | return (int) (pxValue / scale + 0.5f);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/newplayerdemo/src/main/java/com/ksyun/player/now/utils/QosInfoThread.java:
--------------------------------------------------------------------------------
1 | package com.ksyun.player.now.utils;
2 |
3 | import android.content.Context;
4 | import android.os.Debug;
5 | import android.os.Handler;
6 |
7 | import com.ksyun.player.now.activity.VodDisplayActivity;
8 | import com.ksyun.player.now.bean.QosBean;
9 |
10 | import java.util.concurrent.TimeUnit;
11 |
12 |
13 | public class QosInfoThread extends Thread {
14 | private Context mContext;
15 | private Handler mHandler;
16 | private CpuInfo mCpuStats;
17 | private Debug.MemoryInfo mi;
18 | private QosBean mQosObject;
19 | private String mPackageName;
20 |
21 | private boolean mRunning;
22 | private boolean mPausing;
23 |
24 | public QosInfoThread(Context context, Handler handler) {
25 | mHandler = handler;
26 | mCpuStats = new CpuInfo();
27 | mi = new Debug.MemoryInfo();
28 | mRunning = true;
29 | mQosObject = new QosBean();
30 | if(context != null)
31 | mPackageName = context.getPackageName();
32 | }
33 |
34 | @Override
35 | public void run() {
36 | while(mRunning) {
37 |
38 | while (mPausing && mRunning) {
39 | try {
40 | TimeUnit.MILLISECONDS.sleep(300);
41 | } catch (InterruptedException e) {
42 | e.printStackTrace();
43 | }
44 | }
45 |
46 | mCpuStats.parseTopResults(mPackageName);
47 |
48 | Debug.getMemoryInfo(mi);
49 |
50 | if(mHandler != null) {
51 | mQosObject.cpuUsage = mCpuStats.getProcessCpuUsage();
52 | mQosObject.pss = mi.getTotalPss();
53 | mQosObject.vss = mi.getTotalPrivateDirty();
54 | mHandler.obtainMessage(VodDisplayActivity.UPDATE_QOSMESS, mQosObject).sendToTarget();
55 | }
56 | try {
57 | TimeUnit.MILLISECONDS.sleep(1000);
58 | } catch (InterruptedException e) {
59 | e.printStackTrace();
60 | }
61 | }
62 | }
63 |
64 | public void stopThread() {
65 | mRunning = false;
66 | }
67 |
68 | public void resume2() {
69 | mPausing = false;
70 | }
71 |
72 | public void pause() {
73 | mPausing = true;
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/newplayerdemo/src/main/java/com/ksyun/player/now/utils/Setting.java:
--------------------------------------------------------------------------------
1 | package com.ksyun.player.now.utils;
2 |
3 | public class Setting {
4 | public static final String USEHARD="useharddecode";
5 | public static final String USESOFT="usesoftdecode";
6 | public static final String DEBUGON="debugon";
7 | public static final String DEBUGOFF="debugoff";
8 | public static final String CLARITY_SUPER="clarity_super";
9 | public static final String CLARITY_HIGH="clarity_high";
10 | public static final String CLARITY_NORMAL="clarity_normal";
11 | }
12 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/newplayerdemo/src/main/java/com/ksyun/player/now/utils/Urls.java:
--------------------------------------------------------------------------------
1 | package com.ksyun.player.now.utils;
2 |
3 | /**
4 | * 播放地址配置文件
5 | * LIVE:直播
6 | * VOD:点播
7 | */
8 |
9 | public class Urls {
10 | public static final String LIVE="http://appdemo.download.ks-cdn.com:8882/api/GetLiveUrl/2017-01-01?Option=1";
11 | public static final String VOD="http://appdemo.download.ks-cdn.com:8882/api/GetLiveUrl/2017-01-01?Option=2";
12 | }
13 |
--------------------------------------------------------------------------------
/KsyunPlayerDemo/newplayerdemo/src/main/java/com/ksyun/player/now/view/DisplayProgressBar.java:
--------------------------------------------------------------------------------
1 | package com.ksyun.player.now.view;
2 |
3 | import android.content.Context;
4 | import android.graphics.Canvas;
5 | import android.graphics.Paint;
6 | import android.util.AttributeSet;
7 | import android.view.MotionEvent;
8 | import android.view.View;
9 |
10 | import com.ksyun.player.now.R;
11 |
12 | /**
13 | * 音量和亮度调节的进度条
14 | */
15 |
16 | public class DisplayProgressBar extends View {
17 | private int total,progress;
18 | private int width,height;
19 | public DisplayProgressBar(Context context) {
20 | super(context);
21 | }
22 |
23 | public DisplayProgressBar(Context context, AttributeSet attrs) {
24 | super(context, attrs);
25 | }
26 |
27 | public DisplayProgressBar(Context context, AttributeSet attrs, int defStyleAttr) {
28 | super(context, attrs, defStyleAttr);
29 | }
30 |
31 | @Override
32 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
33 | super.onMeasure(widthMeasureSpec, heightMeasureSpec);
34 | width=getMeasuredWidth();
35 | height=getMeasuredHeight();
36 | }
37 |
38 | @Override
39 | protected void onDraw(Canvas canvas) {
40 | super.onDraw(canvas);
41 | Paint paint=new Paint();
42 | paint.setColor(getResources().getColor(R.color.content_background));
43 | canvas.drawRect(0,0,width,height,paint);
44 | paint.setColor(getResources().getColor(R.color.white));
45 | float bar_width=(float) width/(16*16)*15;
46 | float total_width=(float)width/16;
47 |
48 | for(int i=0;i