Git Product home page Git Product logo

medialibrary's Introduction

MediaLibrary

简介

MediaLibrary是一个媒体工具库

使用说明

一. 库依赖

在你project对应的buid.gradle中添加如下代码:

	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

在你要使用的module对应的buid.gradle中添加如下代码(以0.0.1版本为例):

	dependencies {
	        implementation 'com.github.ShaoqiangPei:MediaLibrary:0.0.1'
	}

在你项目的自定义Application类中初始化本库:

  //初始化mediaLibrary
  MediaConfig.getInstance().init(this)
          .setDebug(true);//是否开启本库内部log打印(默认false,不开启)

二. 主要功能类

SpeechHelper ———— 语音合成工具类,主要用于将文字转语音
Player ———— 音乐播放工具类(mediaplayer)
VideoHelper ———— 视频播放工具类(结合视频控件VideoView使用)
SplitMediaFile ———— 视频文件分离帮助类(可以从视频文件中分离出音频和无声视频)

三. Log开关及查看Log

3.1 开启/关闭 本库内部log打印

为了方便大家在调试期间查找问题,本库提供库内部Log日志的开关。

//设置本库内部Log打印开关
MediaConfig.getInstance().setDebug(true);//是否开启本库内部log打印(默认false,不开启)

一般此设置结合本库的初始化,一起放到你项目中自定义的Application类中一起进行。

3.2 查看本库内部log打印

在开启本库内部log打印的情况下,你可以将你logcat的tag设置为media,用以查看本库内部log打印日志。
本库内部日志 tag=“media”,log打印级别多为 i。

medialibrary's People

Contributors

shaoqiangpei avatar

Stargazers

freeze avatar 潮州 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.