Giter Site home page Giter Site logo

teocci / youtube-in-background Goto Github PK

View Code? Open in Web Editor NEW
78.0 12.0 31.0 78.96 MB

YiB is an Android app, which extracts audio from YouTube videos and plays them in background.

License: MIT License

Java 100.00%
youtube android search-videos audio playlist youtube-video

youtube-in-background's Issues

Notification's time runs endlessly and disappear after pauses the same song.

If not paused, the notification keeps on showing time either from 00:00 or else time after the song time ends and runs endlessly with no audio.

After 2 or 3 pauses to a same music makes the notification disappear, and the music is shown still playing in the app without any audio and control buttons of the player in the app doesn't work i.e. pause doesn't work. Anyways keep the great work up, thanks @teocci for fixing pause bug :)

App crashed when I use voice text at intervals

Description

When I first launched the app and searched for a video on YouTube using the voice text, the app crashed. I relaunched and searched again and I was able to search for the videos I wanted. After exiting the app for some hours and going back to search using the voice text. It crashes again before picking up. I noticed this action several times and I discovered that when ever the app is settled and visited after a while, it first crash before working well.

Expected behavior

I expected to search for videos on youtube freely at any time using the voice text without the app crashing at first initiation after exiting for a while.

Steps to reproduce

After launching the app

  • Click on the search icon at the top and click on the microphone icon.

  • Just say anything you want to search. You might note the crash if you are using it for the first time. If not, exit the app and revisit after few hours following the same steps. You will definitely note the crash.

Reproducing the behavior

https://youtu.be/S1A8neVjqBE

Device used

  • Techno spark K7
  • Android 7.0 O.S
  • App version:

Logcat

05-26 16:42:16.616 23206 23206 E AndroidRuntime: Process: com.teocci.ytinbg, PID: 23206
05-26 16:42:16.616 23206 23206 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.teocci.ytinbg.adapters.VideosAdapter.clearYouTubeVideos()' on a null object reference
05-26 16:42:16.616 23206 23206 E AndroidRuntime: at com.teocci.ytinbg.ui.fragments.SearchFragment.searchQuery(SearchFragment.java:190)
05-26 16:42:16.616 23206 23206 E AndroidRuntime: at com.teocci.ytinbg.ui.MainActivity.handleIntent(MainActivity.java:488)
05-26 16:42:16.616 23206 23206 E AndroidRuntime: at com.teocci.ytinbg.ui.MainActivity.access$300(MainActivity.java:69)
05-26 16:42:16.616 23206 23206 E AndroidRuntime: at com.teocci.ytinbg.ui.MainActivity$3.onSuggestionClick(MainActivity.java:360)
05-26 16:42:16.616 23206 23206 E AndroidRuntime: at android.support.v7.widget.SearchView.onItemClicked(SearchView.java:1387)
05-26 16:42:16.616 23206 23206 E AndroidRuntime: at android.support.v7.widget.SearchView$8.onItemClick(SearchView.java:1413)
05-26 16:42:16.616 23206 23206 E AndroidRuntime: at android.widget.AutoCompleteTextView.performCompletion(AutoCompleteTextView.java:1029)
05-26 16:42:16.616 23206 23206 E AndroidRuntime: at android.widget.AutoCompleteTextView.-wrap1(AutoCompleteTextView.java)
05-26 16:42:16.616 23206 23206 E AndroidRuntime: at android.widget.AutoCompleteTextView$DropDownItemClickListener.onItemClick(AutoCompleteTextView.java:1326)
05-26 16:42:16.616 23206 23206 E AndroidRuntime: at android.widget.AdapterView.performItemClick(AdapterView.java:315)
05-26 16:42:16.616 23206 23206 E AndroidRuntime: at android.widget.AbsListView.performItemClick(AbsListView.java:1204)
05-26 16:42:16.616 23206 23206 E AndroidRuntime: at android.widget.AbsListView$PerformClick.run(AbsListView.java:3321)
05-26 16:42:16.616 23206 23206 E AndroidRuntime: at android.widget.AbsListView$4.run(AbsListView.java:4382)
05-26 16:42:16.616 23206 23206 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:836)
05-26 16:42:16.616 23206 23206 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:103)
05-26 16:42:16.616 23206 23206 E AndroidRuntime: at android.os.Looper.loop(Looper.java:203)
05-26 16:42:16.616 23206 23206 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6251)
05-26 16:42:16.616 23206 23206 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
05-26 16:42:16.616 23206 23206 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
05-26 16:42:16.616 23206 23206 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)```

YIB app crashes when I refresh my playlist videos in version 3.1.1

Expected behavior

I expected my playlist videos to refresh without the app crashing.


Actual behavior

When I refresh 'My playlist videos' feature twice, the app crashes.


How to reproduce

  • Download, install and launch the latest version of the app
  • Swipe from the right to the left till you get to the last feature (My playlist videos).
  • Refresh (swipe your finger down the screen) the feature (twice).
  • Observe the bug.

Device: Gionee f100s
Android version: v6.0
App version: v3.1.1


Recording of the bug


PlayList Task Error

LogCat:

java.lang.IllegalStateException: Cannot execute task: the task has already been executed (a task can be executed only once)
at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:596)
at android.os.AsyncTask.execute(AsyncTask.java:551)
at com.teocci.ytinbg.youtube.YouTubePlaylistLoader.acquire(YouTubePlaylistLoader.java:87)
at com.teocci.ytinbg.ui.fragments.PlaylistFragment.searchPlaylists(PlaylistFragment.java:116)
at com.teocci.ytinbg.ui.fragments.PlaylistFragment.lambda$onCreateView$0$PlaylistFragment(PlaylistFragment.java:93)
at com.teocci.ytinbg.ui.fragments.-$$Lambda$PlaylistFragment$wGvuBTJd9fk-I63HAKgRQ0TE7dU.onRefresh(lambda)

public void acquire()
{
this.execute();
}

Add Privacy Policy and contributors guide document.

Hello, I'm Harry. I engage in creating documents for open source projects. It's part of my contribution in helping open source projects. One of the documents I engage in creating is a privacy policy. The privacy policy will give details about user information collection, use and security. I really don't know if you externally collect user information, but, if you don't, it's good to let end users know via a privacy policy.
Contributor's guidelines is also an important document that will help prospective collaborators contribute easily to your project.

I'll love to hear your thoughts on this.

Search crash

Whenever I searched a video, that app immediately crashes

Sent from my TETRA using FastHub

Sign in bug

Google account sign in doesn't work, verified with 2 different devices, still no such interface shows up. So playlists doesn't work.

https://developers.google.com/youtube/android/player/

https://developers.google.com/youtube/v3/docs/playlists/list

https://stackoverflow.com/questions/37253796/youtube-playlist-to-listview-in-android-studio

https://github.com/prof18/YoutubeParser

https://stackoverflow.com/questions/7491439/youtube-playlist-shown-in-listview?rq=1

Thanks for fixing the issues @teocci, such a dedicated developer, wishing you success in your future.

Repeat music playback

Also now song is on repeat when the song has ended and the time in the notification shows the additional time of music being played, for example:

Steps of reproduction:

  1. Play a song, for example: 3 min length
  2. After the song has ended, it's on repeat.
  3. The notification shows time of the total playback, example the same song has played twice, so the notification shows 6+ mins and it's never ending unless stopped from notification or in the app player.

I would like to suggest to add repeat toggle in the music player UI, where user can turn it on or off

google/ExoPlayer#2899

https://google.github.io/ExoPlayer/doc/reference/com/google/android/exoplayer2/Player.RepeatMode.html

https://medium.com/google-exoplayer/repeat-modes-in-exoplayer-19dd85f036d3

Pause bug

When a song is being played after a search, if paused and resumed then it starts from beginning. Same issue in notification also. Also the song is on repeat after the song ends.

0 Views

All videos show me that has 0 views.
Is it my bug or anyone else have?

During a watching video After clicking on the download button, the app crashes when I click on the back button

Project Information

Expected behavior

The application should not crash when I click on the download button while watching a video and then click on the back button

Actual behavior

During a watching video After clicking on the download button, the app crashes when I click on the back button

How to reproduce

  • Download the app

  • Play any video

  • Click on the download button while watching a video

  • And then click on the back button

  • Note the BUG

  • Browser/App version: 3.1.1

  • Operating system: 6.0

Recording Of The Bug

20190601_030904

Logcat

E/AndroidRuntime(16429): FATAL EXCEPTION: main

E/AndroidRuntime(16429): Process: com.teocci.ytinbg, PID: 16429

E/AndroidRuntime(16429): java.lang.RuntimeException: Unable to resume activity {com.teocci.ytinbg/com.teocci.ytinbg.ui.MainActivity}: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState

E/AndroidRuntime(16429): 	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3409)

E/AndroidRuntime(16429): 	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3440)

E/AndroidRuntime(16429): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1474)

E/AndroidRuntime(16429): 	at android.os.Handler.dispatchMessage(Handler.java:102)

E/AndroidRuntime(16429): 	at android.os.Looper.loop(Looper.java:135)

E/AndroidRuntime(16429): 	at android.app.ActivityThread.main(ActivityThread.java:5910)

E/AndroidRuntime(16429): 	at java.lang.reflect.Method.invoke(Native Method)

E/AndroidRuntime(16429): 	at java.lang.reflect.Method.invoke(Method.java:372)

E/AndroidRuntime(16429): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)

E/AndroidRuntime(16429): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)

E/AndroidRuntime(16429): Caused by: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState

E/AndroidRuntime(16429): 	at android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:2053)

E/AndroidRuntime(16429): 	at android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:2079)

E/AndroidRuntime(16429): 	at android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:678)

E/AndroidRuntime(16429): 	at android.support.v4.app.BackStackRecord.commit(BackStackRecord.java:632)

E/AndroidRuntime(16429): 	at com.teocci.ytinbg.ui.MainActivity.onResume(MainActivity.java:241)

E/AndroidRuntime(16429): 	at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1269)

E/AndroidRuntime(16429): 	at android.app.Activity.performResume(Activity.java:6297)

E/AndroidRuntime(16429): 	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3398)

YouTube-In-Background

showing this error when try to run the app in emulator or device
Keystore file '/home/teocci/Dropbox/YouTubeInBG/release-ytinbg.keystore' not found for signing config 'config'.

Error Extracting Audio

01-30 17:07:32.633 8846-9043/com.teocci.ytinbg:youtube W/System.err: Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available 01-30 17:07:34.026 8846-9043/com.teocci.ytinbg:youtube W/System.err: java.io.FileNotFoundException: https://s.ytimg.com/yts/jsbin/null 01-30 17:07:34.027 8846-9043/com.teocci.ytinbg:youtube W/System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:238) 01-30 17:07:34.027 8846-9043/com.teocci.ytinbg:youtube W/System.err: at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210) 01-30 17:07:34.027 8846-9043/com.teocci.ytinbg:youtube W/System.err: at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25) 01-30 17:07:34.027 8846-9043/com.teocci.ytinbg:youtube W/System.err: at at.huber.youtubeExtractor.YouTubeExtractor.decipherSignature(YouTubeExtractor.java:519) 01-30 17:07:34.027 8846-9043/com.teocci.ytinbg:youtube W/System.err: at at.huber.youtubeExtractor.YouTubeExtractor.getStreamUrls(YouTubeExtractor.java:457) 01-30 17:07:34.027 8846-9043/com.teocci.ytinbg:youtube W/System.err: at at.huber.youtubeExtractor.YouTubeExtractor.doInBackground(YouTubeExtractor.java:241) 01-30 17:07:34.027 8846-9043/com.teocci.ytinbg:youtube W/System.err: at at.huber.youtubeExtractor.YouTubeExtractor.doInBackground(YouTubeExtractor.java:36) 01-30 17:07:34.027 8846-9043/com.teocci.ytinbg:youtube W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:295) 01-30 17:07:34.027 8846-9043/com.teocci.ytinbg:youtube W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237) 01-30 17:07:34.027 8846-9043/com.teocci.ytinbg:youtube W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234) 01-30 17:07:34.027 8846-9043/com.teocci.ytinbg:youtube W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 01-30 17:07:34.027 8846-9043/com.teocci.ytinbg:youtube W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 01-30 17:07:34.027 8846-9043/com.teocci.ytinbg:youtube W/System.err: at java.lang.Thread.run(Thread.java:818)

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.