This is a migrated thread and some comments may be shown as answers.

Live Streaming Audio Player

2 Answers 162 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Live
Top achievements
Rank 1
Live asked on 02 Oct 2016, 02:57 PM

Hi, 

     I am planing to do a app like radio 24 hours live playing songs i need a nice plugin to do this project do you have any plugin..... i have tried some of your plugin but that is not giving actual respond..... this is the code i am using for web can i convert this to natvescript app... Let me know Nativescript can help me?

<object type="application/x-shockwave-flash" id="mixstreamPlayerContent" data="http://mixstreamflashplayer.net/flash/MixStreamPlayer.swf" width="335" height="50"><param name="bgcolor" value=""><param name="wmode" value="transparent"><param name="flashvars" value="serverHost=216.224.164.193:7084/;&amp;getStats=0&amp;autoStart=1&amp;textColour=&amp;buttonColour="></object>

 

 

Thanks

 

2 Answers, 1 is accepted

Sort by
0
Nick Iliev
Telerik team
answered on 03 Oct 2016, 06:33 AM
Hello,

Thank you for your interest in NativeScript! As you know NativeScript is an open source project with large and growing community. That said I would recommend joining the community channels (join Slack here, SO and the GitHub issues) to be in touch with the latest ideas. 

At this very moment, there is no plugin developed for audio streaming expect for the Spotify plugin. This plugin was developed specifically using the Spotify API and the author is a member of the NativeScrip community. Perhaps,getting n touch with other members in the slack channel will give you ideas on how to create your own streaming plugin.
Another plugin that works with audio (but not streaming) is nativescript-sound.
Developed by the community and also open-source this can be, as well, a starting point on how to implement your own plugin.

As for you code sample from the web part - you can not implement DOM specific code in NativeScript application. The reason is because NativeScript is DOM-independent which means the technology behind it is not using the document object model and does not understand the specifics that a DOM browser uses.

However, you can use web-view in which you can provide web content so perhaps that is one valuable option.

Regards,
Nikolay Iliev
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Abdoulaye
Top achievements
Rank 1
answered on 05 May 2017, 02:08 PM

Hello Live

I have just started working on a Radio Player myself.

With NativeScript, you don't have to wait for "them" to create plugins. As far as I know, JavaScript may not even be the appropriate solution to used for this kind of task. But if you want to use Javascript at all cost, than a straight forward and super cross platform way of doing it is to use a hidden WebView that you will control from your app. The WebView can have an html5 page with the audio element that is more than able to handle remote streaming audio. But that solution can be tricky if you try to keep your audio running in the background when the app loses focus.

Another alternative is to use the Native* part of NativeScript and use Cocoapods for iOS and Gradle for Android and use an already existing, popular, robust and field tested library and control it directly from NativeScript.

I hope that helps.

Tags
General Discussion
Asked by
Live
Top achievements
Rank 1
Answers by
Nick Iliev
Telerik team
Abdoulaye
Top achievements
Rank 1
Share this question
or