Code Monkey home page Code Monkey logo

audiotrimmer's Introduction

AudioTrimmer

Audio trimming library for Android (No processing)

This library contains only the UI and logic for the trimmer and not the actual processing of the files . You can use FFmpeg or any other libraries for that. Add this as a library module in your project to use the View.

Screenshot_20210930-113440 (1)

A sample app is yet to be added but here is the basic implementation of the trimmer as a view.

Example to use with xml -

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_centerInParent="true"
    android:layout_height="wrap_content"
    xmlns:app="http://schemas.android.com/apk/res-auto">
    <com.pro.audiotrimmer.AudioTrimmerView
        android:id="@+id/audioTrimmerView"
        android:layout_width="match_parent"
        app:layout_constraintBottom_toBottomOf="parent"
        android:paddingTop="@dimen/twenty_dp"
        android:layout_height="wrap_content"
        app:atv_window_border_color="@color/bottom_tab"
        app:atv_window_border_width="1dp"
        app:atv_overlay_color="@color/overlay"
        android:background="@color/background"
        app:atv_window_bar_width="15dp"
        app:atv_window_left_bar="@drawable/handle_left"
        app:atv_window_right_bar="@drawable/handle_right"/>
</androidx.constraintlayout.widget.ConstraintLayout>

audiotrimmer's People

Contributors

pro-kargo avatar pro-softs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

audiotrimmer's Issues

Caused by: java.lang.IllegalArgumentException: The tag for layout_audio_trimmer is invalid. Received: layout/layout_audio_trim_preview_0

android.view.InflateException: Binary XML file line #9 in com.package.name.here:layout/layout_audio_trim_preview: The tag for layout_audio_trimmer is invalid. Received: layout/layout_audio_trim_preview_0
Caused by: java.lang.IllegalArgumentException: The tag for layout_audio_trimmer is invalid. Received: layout/layout_audio_trim_preview_0
at com.maker.DataBinderMapperImpl.internalGetViewDataBinding0(DataBinderMapperImpl.java:398)
at com.maker.DataBinderMapperImpl.getDataBinder(DataBinderMapperImpl.java:651)
at androidx.databinding.MergedDataBinderMapper.getDataBinder(MergedDataBinderMapper.java:79)
at androidx.databinding.DataBindingUtil.bind(DataBindingUtil.java:199)
at androidx.databinding.ViewDataBinding.bind(ViewDataBinding.java:736)
at com.maker.databinding.LayoutAudioTrimmerBinding.bind(LayoutAudioTrimmerBinding.java:93)
at com.maker.databinding.LayoutAudioTrimmerBinding.bind(LayoutAudioTrimmerBinding.java:81)
at com.maker.widgets.audiotrimmer.AudioTrimmerView.onFinishInflate(AudioTrimmerView.kt:57)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1140)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088)
at android.view.LayoutInflater.inflate(LayoutInflater.java:686)
at android.view.LayoutInflater.inflate(LayoutInflater.java:538)
at androidx.databinding.DataBindingUtil.inflate(DataBindingUtil.java:126)
at androidx.databinding.DataBindingUtil.inflate(DataBindingUtil.java:95)
at com.maker.modules.animated.editor.AnimatedEditorActivity.showPreview(AnimatedEditorActivity.kt:416)
at com.maker.modules.animated.editor.AnimatedEditorActivity.access$showPreview(AnimatedEditorActivity.kt:54)
at com.maker.modules.animated.editor.AnimatedEditorActivity$selectAudio$1.invoke(AnimatedEditorActivity.kt:94)
at com.maker.modules.animated.editor.AnimatedEditorActivity$selectAudio$1.invoke(AnimatedEditorActivity.kt:92)
at com.maker.utils.ExtensionKt.onSuccess$lambda-4(extension.kt:128)
at com.maker.utils.ExtensionKt.$r8$lambda$1tccL4sk-CXWQTLjTC-SAMDwx-Q(Unknown Source:0)
at com.maker.utils.ExtensionKt$$ExternalSyntheticLambda2.onActivityResult(Unknown Source:4)

Audio wave wave form not being updated (same height)

One the file is sent to the audio trimmer view and .show() is called, the UI does not show different aptitudes of the audio may it be .wav or .mp3 file. The view just shows the whole wave at the same height.

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.