bikubi opened a new issue #324:
URL: https://github.com/apache/cordova-plugin-media/issues/324


   # Bug Report
   
   ## Problem
   
   ### What is expected to happen?
   
   `new Media('http://example.com/finite.mp3');` plays a sound from the 
internet,
   `new Media('http://example.com/infinite-radio-live.mp3');` should play a 
live streaming sound.
   
   ### What does actually happen?
   
   I see a status update to 2 (`MEDIA_RUNNING`), but there is no sound.
   
   ## Information
   <!-- Include all relevant information that might help understand and 
reproduce the problem -->
   
   I've tried different radio stations (servers), protocols (http(s)) and 
formats (mp3, aac) to no avail. 
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   
   I have made a Minimal Reproduction Repo, originally in the probably 
unrelated issue #242 (OP mentions Android):
   https://github.com/bikubi/cordova-plugin-media-mwe
   
   I have since found the issue and a possible fix: 
[player.automaticallyWaitsToMinimizeStalling](https://developer.apple.com/documentation/avfoundation/avplayer/1643482-automaticallywaitstominimizestal)
 has to be `true` -- which makes sense with live streaming ("let it buffer").  
   I have implemented it as a proof of concept: 
https://github.com/bikubi/cordova-plugin-media/commit/591a7772b38e51f5832cb0582a5248caae207587
   ...and have my MRR use it [in branch 
`hotfix`](https://github.com/bikubi/cordova-plugin-media-mwe/tree/hotfix).  
   I'd fashion a PR, but am not sure where to put my fix (and how, this was my 
first line of ObjectiveC (?)), especially how to apply it only when the url is 
a live stream. There's no way to tell by the URL, so I guess it would have to 
be an extra parameter.
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you 
experiencing the issue? -->
   
   * iOS 15.1 on iPad
   * 12.3.1 on an iPhone SE
   * 15.0 in an iPhone 13 emulator.
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   
   cordova 10.0.0  
   cordova-ios 6.2.0  
   cordova-plugin-file 6.0.2  
   cordova-plugin-whitelist 1.3.5  
   XCode 13.1 on macOS 11.6
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to