I am unable to consistently play audio files from web pages on my Nexus S (Android 2.3.6). I have six audio files. They're in both mp3 and ogg formats. I have three browsers on the phone that I've experimented with: Browser 2.3.6, Dolphin HD 7.3.0, and Firefox 10.0.2.
All files play every time in Firefox. In Browser and Dolphin, some of the files play and some don't. Each time I test in Browser and Dolphin, the number of files that won't play increase, until finally none or only one plays.
Once, I used Android's Manage Applications tool to delete Browser's data and cache. This also caused the Browser process to stop. This one time, when I restarted Browser and tried to play to audio files, they all played. A subsequent attempt using this method did not restore the ability to play audio.
I also tried to play these audio files from the same web page on desktop computer browsers, Chrome and Firefox. In both cases, all audio files played every time.
Any ideas on what's causing this inconsistent audio playing behavior? Another useful answer would be, is there a way to trap the error (if there is one) Browser gets when it cannot play an audio file.
I'm more of a Java/Server-side programmer, so I'm not very knowledgable about a debug approach for this kind of problem in a mobile browser.
Related
So we've been fighting this for weeks. We are building a Unity (5.6 and 2017.2) app for Fire TV / Fire Stick devices (among others). It's primarily a media app sharing our own MBR content over HLS, served from a Wowza server. Every player we have tried results in the following behavior: Every two seconds or so there is a skip in the A/V playback, just a few ms or more. Some videos display this more than others, it seems. The audio and video remain in sync, just skipping frames regularly. The result is, in some cases, nearly unwatchable.
We've tried several media player plugins for Unity (UMP, NexPlayer, AvPro), and they all do the same. They play HLS content from external sources perfectly fine, but our own served content is nasty, even things we didn't encode ourselves. This is only for Unity/Android clients though; Roku and Apple TV play the content fine, as do players on Windows. It is just the confluence of Unity/Android (Fire OS, but also others) and our served content.
It seems like a Wowza setting problem but again, other clients play just fine from the same hosts. Has anyone run across this issue, and have recommendations for setting up the plugins or tweaking Wowza? Is there a specific plugin that you've successfully used as a video player in Unity, for Fire TV?
We're doing all the Unity-side things correctly we think. (Multithreaded GL rendering, etc.)
I am building an application using electron.js that runs a socket server on a local network.
The idea is that the socket server sends messages to connected clients to dynamically load multiple html5 videos in a browser on a smart TV.
The videos are small demonstration videos and need to autoplay and loop.
There can be up to 12 videos playing at once on one device.
The problem that I am experiencing is that I cannot get smooth playback of the videos or not all videos will play.
I have tried the following with 12 videos:
Native Smart TV browser. Result: Only plays 3 videos and playback is ok
Chormium Browser on Raspberry Pi 3. Result: Can play all 12 videos but playback is choppy. Forcing hardware acceleration crashes the browser
Chrome Browser on Quad core Android box. Result: Can only play 6 videos and playback is good
ionic cordova app on Android Box. Result: Can only play 6 videos and playback is good
react-native app on Android Box. Result: Can only play 6 videos and playback is good
My question is, what are my limitations or possible solutions?
Am I limited by hardware or is there something I can do in my application builds that may resolve the issue?
It is worth pointing out that on my desktop chrome browser, all 12 videos play without any problem but this is not an option for me because they need to run on the TV.
Edit: It is worth mentioning I am using mp4 video
I am going to answer this myself to help others if they come across the same issue.
I ended up installing ffmpeg and encoded webm video instead of mp4 and could get all 12 videos playing.
Then by reducing the bitrate, I was able to get all 12 videos playing at the same time on the mini PCs at an acceptable quality.
I have an app that was developed for iOS and Android (both are native). Both apps use the same api to download content such as images, documents, and videos. The video format is in mp4. Of course the videos play fine in iOS but some Android tablets have issues playing the videos reliably. Sometimes they play, sometimes (and usually) they don't.
Obviously this is a codec issue. I've suggested we have the user upload two videos, one for android and one for ios, but it doesn't seem to be an option at this point.
Is there a bitrate/fps setting that can be used to make video across both platforms more reliable?
I'm currently building an MP3 app for iOS and Android that plays external MP3 files. The problem is that my MP3 files are very big (usually over 100MB) each. I am using Phonegap's (3.0) Media plugin and everything works perfectly fine, except that it takes very long to initially play the file. I came to the conclusion that this is happening because Phonegap downloads the entire file before playing it. How do I tell it to start playing before the file is fully downloaded?
When the file is accessed through a regular desktop browser like Chrome, the file plays almost instantly, so I know the internet connection is not the issue here. Smaller files (around 5MB) plays almost instantly on the APP as well.
I'm trying to create a HTML5 page with embedded audio. The page has to work on a ZTE BASE Lutea smartphone (Android 2.1) with Opera Mobile 11. Audio format is MP3 but OGG would be fine, too. All files have to be stored local on the smartphones sdcard.
My problem:
While audio plays fine when loaded from a webserver, it fails when files are local. This is definitely not a source path error. The audio file is preloaded and I can alert the correct audio duration. Then, when the audio play() method is called, it throws me a MEDIA_ERR_DECODE.
This is always the same no matter if I use MP3, OGG or the original WAV file. Any idea why there is a decoding problem of local audio files?
EDIT: When I'm opening a local HTML page "file://localhost/sdcard/index.html" in Opera and the page embeds an audio "http://localhost/audio.mp3", it works. Of course I had to install a local webserver and this would be a very bad solution.
Why is the HTTP protocol needed to play an audio file, does something like a local sandbox exist on android?
EDIT: I found that the Video object is able to play local sounds without problems. Unfortunately it's useless to me because I need an invisible audio and in Opera Mobile there is no way to prevent the video from going fullscreen.
With PhoneGap, you should be able to play local audio.
Opera 12 has the same issue. If the audio is played from cache is not working.
I am using appcache.
This worked on Firefox mobile, so we used that.