apache / apache/cordova-plugin-media

Can't get icecast streams to work on iOS

Open
#256 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
391
Forks
762
PR merge metrics
No merged PRs in 30d

Description

# Bug Report

## Problem

Not playing icecast streams. We have 3 icecast streams for our radio stations and none of them work.

### What is expected to happen?

To play the icecast stream.

### What does actually happen?

Logs whats below but plays nothing.

Log From iPad
2019-09-30 13:28:41.442874-0500 AFR[777:681160] Play url: https://mediaserver3.afa.net:8443/talk.mp3
2019-09-30 13:28:41.444745-0500 AFR[777:681160] Will use resource 'https://mediaserver3.afa.net:8443/talk.mp3' from the Internet.
2019-09-30 13:28:41.456505-0500 AFR[777:681160] THREAD WARNING: ['Media'] took '11.751953' ms. Plugin should use a background thread.
2019-09-30 13:28:41.468467-0500 AFR[777:681378] Playing audio sample 'https://mediaserver3.afa.net:8443/talk.mp3'
2019-09-30 13:28:42.399515-0500 AFR[777:681378] Duration is infifnite, setting it to -1
2019-09-30 13:28:42.399815-0500 AFR[777:681378] Playing stream with AVPlayer & default rate
2019-09-30 13:28:42.413091-0500 AFR[777:681160] media status: 2

Log from simulator
2019-09-30 13:13:05.300506-0500 AFR[41459:10012960] Play url: https://mediaserver3.afa.net:8443/music.mp3
2019-09-30 13:13:05.305044-0500 AFR[41459:10012960] Will use resource 'https://mediaserver3.afa.net:8443/music.mp3' from the Internet.
2019-09-30 13:13:05.308447-0500 AFR[41459:10013235] Playing audio sample 'https://mediaserver3.afa.net:8443/music.mp3'
2019-09-30 13:13:05.368662-0500 AFR[41459:10013268] [] nw_endpoint_flow_copy_multipath_subflow_counts Called on non-Multipath connection
2019-09-30 13:13:05.672912-0500 AFR[41459:10013235] Duration is infifnite, setting it to -1
2019-09-30 13:13:05.673044-0500 AFR[41459:10013235] Playing stream with AVPlayer & default rate
2019-09-30 13:13:05.676718-0500 AFR[41459:10013236] [] nw_endpoint_flow_copy_multipath_subflow_counts Called on non-Multipath connection
2019-09-30 13:13:05.677978-0500 AFR[41459:10014900] [] nw_endpoint_flow_copy_multipath_subflow_counts Called on non-Multipath connection
2019-09-30 13:13:05.680213-0500 AFR[41459:10014928] AudioObjectRemovePropertyListener: no object with given ID 0
2019-09-30 13:13:05.680337-0500 AFR[41459:10014928] AudioObjectRemovePropertyListener: no object with given ID 0
2019-09-30 13:13:05.680435-0500 AFR[41459:10014928] AudioObjectRemovePropertyListener: no object with given ID 0
2019-09-30 13:13:05.681402-0500 AFR[41459:10014928] AudioObjectRemovePropertyListener: no object with given ID 0
2019-09-30 13:13:05.681507-0500 AFR[41459:10014928] AudioObjectRemovePropertyListener: no object with given ID 0
2019-09-30 13:13:05.681628-0500 AFR[41459:10014928] AudioObjectRemovePropertyListener: no object with given ID 0
2019-09-30 13:13:05.686190-0500 AFR[41459:10012960] media status: 2
2019-09-30 13:13:05.697282-0500 AFR[41459:10013236] [] nw_endpoint_flow_copy_multipath_subflow_counts Called on non-Multipath connection
2019-09-30 13:13:07.256206-0500 AFR[41459:10015020] HALC_ProxyIOContext::IOWorkLoop: failed to send the final message to the server, Error: 0x10000003

## Information

It works when we use a podcast URL but not when we use one of our icecast URLs.
Here is one of our icecast URLs https://mediaserver3.afa.net:8443/music.mp3
I have also tried it as http and mp4
http://mediaserver3.afa.net:8000/music.mp3
https://mediaserver3.afa.net:8443/music.mp4

### Command or Code

this.player = this.media.create(icecastUrl);
this.player.play();

### Environment, Platform, Device

Tried on iPad Air 2(iOS 13.1.1), iPhone 6(iOS 12.4.1) and iPhone 11 Sim (13.0.0)

### Version information

Cordova CLI: 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms: iOS(5.0.1)
Cordova Plugins:
cordova-plugin-appavailability 0.4.2 "AppAvailability"
cordova-plugin-background-download 0.0.2 "Background Download"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-dialogs 2.0.1 "Notification"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-firebase-config 1.2.1 "cordova-plugin-firebase-config"
cordova-plugin-google-analytics 1.8.6 "Google Universal Analytics Plugin"
cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 3.1.2 "cordova-plugin-ionic-webview"
cordova-plugin-media 5.0.3 "Media"
cordova-plugin-network-information 2.0.1 "Network Information"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-x-socialsharing 5.4.4 "SocialSharing"
cordova-plugin-x-toast 2.7.2 "Toast"
cordova-sqlite-storage 3.2.0 "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version"
es6-promise-plugin 4.2.2 "Promise"
nl.x-services.plugins.backgroundaudio 1.0.1 "BackgroundAudio"
onesignal-cordova-plugin 2.4.6 "OneSignal Push Notifications"

Ionic Framework: ionic/angular 4.4.0
Ionic CLI: 4.12.0

OS: MacOS 10.14.6
Xcode: 11

## Checklist

- [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

Contributor guide

Open the contributing guide

Research direction

Start at the Media plugin's iOS AVPlayer handling, using the reported this.player = this.media.create(icecastUrl) entry point and the supplied Icecast URL. Reproduce on the listed iOS devices or simulator and compare it with a working podcast URL; done means the Icecast stream plays successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, javascript, objective-c
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.