ankidroid / Anki-Android

AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
GNU General Public License v3.0
8.59k stars 2.22k forks source link

Audio file was played as video - unintuitive and unable to answer card #9023

Closed nwelb closed 7 months ago

nwelb commented 3 years ago

By DavidA: See the .zip file. This was likely a pure audio file, but interpreted as video due to an issue in the file uploader (using the mpeg extension - it seems some are treated as video).

The problem is that no video player seems to appear, and there's little indication to the user about what is happening: no controls, etc...


Reproduction Steps
Expected Result
Actual Result
Debug info

Refer to the support page if you are unsure where to get the "debug info".

AnkiDroid Version = 2.15.2

Android Version = 11

Manufacturer = samsung

Model = SM-G975F

Hardware = exynos9820

Webview User Agent = Mozilla/5.0 (Linux; Android 11; SM-G975F Build/RP1A.200720.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/90.0.4430.210 Mobile Safari/537.36

ACRA UUID = 93934026-fb70-44fa-ad43-36fe01aefd93

Scheduler = std2

Crash Reports Enabled = true

DatabaseV2 Enabled = true

Research

Enter an [x] character to confirm the points below:

[

https://user-images.githubusercontent.com/85083319/120122912-c7bfd500-c1a3-11eb-8327-2cfa9461931c.mp4

Spanish-20210531012911.zip

](url)

welcome[bot] commented 3 years ago

Hello! 👋 Thanks for logging this issue. Please remember we are all volunteers here, so some patience may be required before we can get to the issue. Also remember that the fastest way to get resolution on an issue is to propose a change directly, https://github.com/ankidroid/Anki-Android/wiki/Contributing

david-allison commented 3 years ago

@nwelb Thanks for the report!

There's not enough here to reproduce the issue. Could you post steps, or a video showcasing the problem

nwelb commented 3 years ago

Apologies. I have attached a video. Thanks :)

david-allison commented 3 years ago

I've never seen that before... impressive

First off: Download AnkiDroid 2.14.6.A to get you back to revewing. You'll get crashes if you have 2.14.6 and 2.15 open at the same time.

After that, in AnkiDroid 2.15.2, could you get a bad card, copy it to a new deck, export the deck, and upload it here.

.zip it if it won't upload due to the file format

I have access to an S10+ online via Samsung, so we should be able to get this fixed.

nwelb commented 3 years ago

Sure. Thanks very much :).

david-allison commented 3 years ago

Sure. Thanks very much :).

Awesome! Just to note: Awaiting the .zip before I, or someone else can look into this further

nwelb commented 3 years ago

Thank you. I have uploaded the zip in the main text box :)

david-allison commented 3 years ago

Next steps:

If not:

https://developer.samsung.com/remotetestlab/rtlDeviceList.action - select S10+

Upload, unzip & import the provided apkg

See if problem is reproducible on test device

david-allison commented 3 years ago

@nwelb Please follow up with me after 5 days if nobody picks this up

nwelb commented 3 years ago

Sorry I pressed export collection by mistake. I have uploaded the deck above.

david-allison commented 3 years ago

Reproducible on my Android 11

This is using our video player, rather than our Audio player

logcat

2021-05-31 01:38:01.968 27447-27447/com.ichi2.anki I/AbstractFlashcardViewer: AbstractFlashcardViewer:: Show answer button pressed
2021-05-31 01:38:01.969 27447-27447/com.ichi2.anki D/Reviewer: Fullscreen delayed hide in 100ms
2021-05-31 01:38:01.970 27447-27447/com.ichi2.anki D/AbstractFlashcardViewer: displayCardAnswer()
2021-05-31 01:38:01.971 27447-27447/com.ichi2.anki D/AbstractFlashcardViewer: correct answer = 
2021-05-31 01:38:01.971 27447-27447/com.ichi2.anki D/AbstractFlashcardViewer: user answer = 
2021-05-31 01:38:01.972 27447-27447/com.ichi2.anki D/AbstractFlashcardViewer: updateCard()
2021-05-31 01:38:01.972 27447-27447/com.ichi2.anki D/Sound: Adding Sound to side: ANSWER
2021-05-31 01:38:01.972 27447-27447/com.ichi2.anki D/Sound: expandSounds
2021-05-31 01:38:01.976 27447-27447/com.ichi2.anki D/AbstractFlashcardViewer: base url = file:///storage/emulated/0/AnkiDroidZ/collection.media/
2021-05-31 01:38:01.976 27447-27447/com.ichi2.anki D/AbstractFlashcardViewer: fillFlashcard()
2021-05-31 01:38:01.977 27447-27447/com.ichi2.anki D/AbstractFlashcardViewer: base url = file:///storage/emulated/0/AnkiDroidZ/collection.media/
2021-05-31 01:38:01.980 27447-27447/com.ichi2.anki D/Sound: playSounds ANSWER
2021-05-31 01:38:01.981 27447-27447/com.ichi2.anki D/Sound: Playing file:///storage/emulated/0/AnkiDroidZ/collection.media/ankidroid_audioclip_S01_mp38300026592280225950.mpeg has listener? true
2021-05-31 01:38:02.013 27447-27447/com.ichi2.anki D/Sound: Requesting AbstractFlashcardViewer play video - no SurfaceHolder
2021-05-31 01:38:02.014 27447-27447/com.ichi2.anki I/AbstractFlashcardViewer: Launching Video: file:///storage/emulated/0/AnkiDroidZ/collection.media/ankidroid_audioclip_S01_mp38300026592280225950.mpeg
2021-05-31 01:38:02.063 27447-27447/com.ichi2.anki I/AnkiActivity: AnkiActivity::onPause - Reviewer
2021-05-31 01:38:02.063 27447-27447/com.ichi2.anki D/AbstractFlashcardViewer: onPause()
2021-05-31 01:38:02.086 27447-27447/com.ichi2.anki I/VideoPlayer: onCreate
2021-05-31 01:38:02.093 27447-27447/com.ichi2.anki I/VideoPlayer: Video Player intent had path: file:///storage/emulated/0/AnkiDroidZ/collection.media/ankidroid_audioclip_S01_mp38300026592280225950.mpeg
2021-05-31 01:38:02.125 27447-27447/com.ichi2.anki I/VideoPlayer: surfaceCreated
2021-05-31 01:38:02.125 27447-27447/com.ichi2.anki D/Sound: Playing single sound
2021-05-31 01:38:02.126 27447-27447/com.ichi2.anki D/Sound: Playing file:///storage/emulated/0/AnkiDroidZ/collection.media/ankidroid_audioclip_S01_mp38300026592280225950.mpeg has listener? true
2021-05-31 01:38:02.142 27447-27447/com.ichi2.anki D/Sound: Creating media player for playback
2021-05-31 01:38:02.150 27447-27447/com.ichi2.anki W/MediaPlayer: Use of stream types is deprecated for operations other than volume control
2021-05-31 01:38:02.150 27447-27447/com.ichi2.anki W/MediaPlayer: See the documentation of setAudioStreamType() for what to use instead with android.media.AudioAttributes to qualify your playback use case
2021-05-31 01:38:02.152 27447-27447/com.ichi2.anki D/Sound: Requesting audio focus
2021-05-31 01:38:02.152 27447-27447/com.ichi2.anki W/AudioManager: Use of stream types is deprecated for operations other than volume control
2021-05-31 01:38:02.152 27447-27447/com.ichi2.anki W/AudioManager: See the documentation of requestAudioFocus() for what to use instead with android.media.AudioAttributes to qualify your playback use case
2021-05-31 01:38:02.193 27447-27447/com.ichi2.anki D/Sound: Starting media player
2021-05-31 01:38:02.194 27447-27447/com.ichi2.anki D/AbstractFlashcardViewer$CardViewerWebClient: Java onPageFinished triggered: data:text/html;charset=utf-8;base64,
2021-05-31 01:38:02.195 27447-27447/com.ichi2.anki D/AbstractFlashcardViewer$CardViewerWebClient: Java onPageFinished triggered: file:///storage/emulated/0/AnkiDroidZ/collection.media/__viewer__.html
2021-05-31 01:38:02.195 27447-27447/com.ichi2.anki D/AbstractFlashcardViewer$CardViewerWebClient: New URL, drawing flags, marks, and triggering JS onPageFinished: file:///storage/emulated/0/AnkiDroidZ/collection.media/__viewer__.html
2021-05-31 01:38:02.235 27447-27447/com.ichi2.anki I/AnkiActivity: AnkiActivity::onStop - Reviewer
2021-05-31 01:38:02.241 27447-27447/com.ichi2.anki D/WidgetStatus: WidgetStatus.update(): already running or not enabled
2021-05-31 01:38:02.241 27447-27447/com.ichi2.anki D/UIUtils: saveCollectionInBackground: start
2021-05-31 01:38:02.241 27447-28823/com.ichi2.anki D/CollectionTask$SaveCollection: doInBackgroundSaveCollection
2021-05-31 01:38:02.260 27447-27447/com.ichi2.anki D/UIUtils: saveCollectionInBackground: finished
2021-05-31 01:38:02.260 27447-27447/com.ichi2.anki D/CollectionTask: enabling garbage collection of mPreviousTask...
2021-05-31 01:38:02.268 27447-27447/com.ichi2.anki I/AnkiActivity: AnkiActivity::onDestroy - Reviewer
2021-05-31 01:38:02.268 27447-27447/com.ichi2.anki D/AbstractFlashcardViewer: onDestroy()
2021-05-31 01:38:10.307 27447-27447/com.ichi2.anki D/Sound$SingleSoundCompletionListener: Single Sound completed
2021-05-31 01:38:10.340 27447-27447/com.ichi2.anki I/Sound$PlayAllCompletionListener: Play all: Completed - releasing sound
2021-05-31 01:38:10.340 27447-27447/com.ichi2.anki D/Sound: Releasing sounds and abandoning audio focus
2021-05-31 01:38:10.371 27447-27447/com.ichi2.anki D/AnkiDroidApp: AnkiDroidApp::getLanguageConfig - setting locale to en_GB
2021-05-31 01:38:10.377 27447-27447/com.ichi2.anki D/Reviewer: onCreate()
2021-05-31 01:38:10.377 27447-27447/com.ichi2.anki D/AbstractFlashcardViewer: onCreate()
2021-05-31 01:38:10.408 27447-27447/com.ichi2.anki I/AnkiActivity: AnkiActivity::onCreate - Reviewer
2021-05-31 01:38:10.488 27447-27447/com.ichi2.anki D/AnkiActivity: AnkiActivity.startLoadingCollection()
2021-05-31 01:38:10.488 27447-27447/com.ichi2.anki D/AnkiActivity: Synchronously calling onCollectionLoaded
2021-05-31 01:38:10.501 27447-27447/com.ichi2.anki I/ViewGroupUtils: ViewGroupUtils::setRenderWorkaround - using default / hardware rendering
2021-05-31 01:38:10.501 27447-28823/com.ichi2.anki I/CollectionTask$GetCard: Obtaining card
2021-05-31 01:38:10.506 27447-27447/com.ichi2.anki I/AnkiActivity: AnkiActivity::onStart - Reviewer
2021-05-31 01:38:10.521 27447-28823/com.ichi2.anki D/Collection: [1622421490] SchedV2.java:getCard(): 'mData': ,  'mDid': 1622421454834,  'mDue': 1,  'mElapsedTime': 0,  'mFactor': 0,  'mFlags': 0,  'mId': 1622420922533,  'mIvl': 0,  'mLapses': 0,  'mLastIvl': 0,  'mLeft': 0,  'mMod': 1622421454,  'mNid': 1622420831817,  'mODid': 0,  'mODue': 0,  'mOrd': 0,  'mQueue': 0,  'mReps': 0,  'mType': 0,  'mUsn': -1,  'mWasNew': false
2021-05-31 01:38:10.524 27447-27447/com.ichi2.anki I/AnkiActivity: AnkiActivity::onResume - Reviewer
2021-05-31 01:38:10.524 27447-28823/com.ichi2.anki E/Threads: must be called on the main thread instead of Thread[AsyncTask #8,5,main]
2021-05-31 01:38:10.524 27447-27447/com.ichi2.anki D/UsageAnalytics: sendAnalyticsScreenView(): Reviewer
2021-05-31 01:38:10.524 27447-28823/com.ichi2.anki E/Threads: must be called on the main thread instead of Thread[AsyncTask #8,5,main]
2021-05-31 01:38:10.524 27447-28823/com.ichi2.anki D/Note: load()
2021-05-31 01:38:10.524 27447-27447/com.ichi2.anki D/UsageAnalytics: getOptIn() status: false
2021-05-31 01:38:10.526 27447-27447/com.ichi2.anki D/DialogHandler: Reading persistent message
2021-05-31 01:38:10.532 27447-28927/com.ichi2.anki D/CollectionTask: Waiting for com.ichi2.async.CollectionTask$GetCard@edc1a22 to finish before starting class com.ichi2.async.CollectionTask$Reset
2021-05-31 01:38:10.532 27447-28927/com.ichi2.anki D/CollectionTask: Finished waiting for com.ichi2.async.CollectionTask$GetCard@edc1a22 to finish. Status= RUNNING
2021-05-31 01:38:10.533 27447-28927/com.ichi2.anki I/NativeMethods: ExecuteCommand: localMinutesWest
2021-05-31 01:38:10.612 27447-27447/com.ichi2.anki D/Reviewer: Fullscreen delayed hide in 100ms
2021-05-31 01:38:10.612 27447-27447/com.ichi2.anki D/AbstractFlashcardViewer: displayCardQuestion()
2021-05-31 01:38:10.639 27447-27447/com.ichi2.anki D/AbstractFlashcardViewer: Focusable = true, Focusable in touch mode = false
2021-05-31 01:38:10.652 27447-27447/com.ichi2.anki I/ViewGroupUtils: ViewGroupUtils::setRenderWorkaround - using default / hardware rendering
2021-05-31 01:38:10.653 27447-27447/com.ichi2.anki D/AbstractFlashcardViewer: updateCard()
2021-05-31 01:38:10.654 27447-27447/com.ichi2.anki D/Sound: expandSounds
2021-05-31 01:38:10.654 27447-27447/com.ichi2.anki D/AbstractFlashcardViewer: base url = file:///storage/emulated/0/AnkiDroidZ/collection.media/
2021-05-31 01:38:10.655 27447-27447/com.ichi2.anki D/AbstractFlashcardViewer: fillFlashcard()
2021-05-31 01:38:10.655 27447-27447/com.ichi2.anki D/AbstractFlashcardViewer: base url = file:///storage/emulated/0/AnkiDroidZ/collection.media/
2021-05-31 01:38:10.664 27447-27447/com.ichi2.anki I/AbstractFlashcardViewer: AbstractFlashcardViewer:: Question successfully shown for card id 1622420922533
2021-05-31 01:38:10.669 27447-27447/com.ichi2.anki D/CollectionTask: enabling garbage collection of mPreviousTask...
2021-05-31 01:38:10.669 27447-27447/com.ichi2.anki D/CollectionTask: enabling garbage collection of mPreviousTask...
2021-05-31 01:38:10.677 27447-27447/com.ichi2.anki D/Collection: undoAvailable() undo size: 0
2021-05-31 01:38:10.708 27447-27447/com.ichi2.anki D/Reviewer: Fullscreen delayed hide in 200ms
2021-05-31 01:38:10.823 27447-27447/com.ichi2.anki D/Sound: Releasing sounds and abandoning audio focus
2021-05-31 01:38:10.888 27447-27447/com.ichi2.anki D/AbstractFlashcardViewer$CardViewerWebClient: Java onPageFinished triggered: data:text/html;charset=utf-8;base64,
2021-05-31 01:38:10.924 27447-27447/com.ichi2.anki D/AbstractFlashcardViewer$CardViewerWebClient: Java onPageFinished triggered: file:///storage/emulated/0/AnkiDroidZ/collection.media/__viewer__.html
2021-05-31 01:38:10.924 27447-27447/com.ichi2.anki D/AbstractFlashcardViewer$CardViewerWebClient: New URL, drawing flags, marks, and triggering JS onPageFinished: file:///storage/emulated/0/AnkiDroidZ/collection.media/__viewer__.html
david-allison commented 3 years ago

Main questions to follow up:

nwelb commented 3 years ago

That's interesting. You're right. I have just noticed that it had converted the mp3 file to a mpeg file.

david-allison commented 3 years ago

I've put in a fix for the main issue. AnkiDroid 2.15.3 will import your mp3s as mp3s.

You can remove the file and import it again when 2.15.3 is released to fix this, or change the filename and reference in your card to call it an mp3

As for the black screen with a video:

This is still an issue, but I'll consider it to be of lower priority: very few people use videos, and it's likely been like this for some time

nwelb commented 3 years ago

Thank you. Yes I will change the reference for now until 2.15.3 is released. Thanks very much for fixing this issue. It's a brilliant app.

github-actions[bot] commented 3 years ago

Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

github-actions[bot] commented 3 years ago

Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

SySagar commented 2 years ago

david-allison-1 I would like to work in this issue.

TanmayAgarwal123 commented 1 year ago

I would love to work on this project, can you assign me Regards, Tanmay Agarwal

dae commented 1 year ago

@david-allison still an issue?