I've been using Flutter for about 4 months now, but I do not have any experience in Javascript. I want to use the Soundcloud HTTP API and build an app with it. But I'm stuck with using JS in Flutter. I'm trying to make an user-interactive app that requires these features,
Search music on Soundcloud. => The user gets to choose a song on Soundcloud.
Post the selected music on a feed. => Then the selected song gets posted on the feed page as a music player-like Widget.
Let other users play the music when it shows up on their feed. => The music player then can be seen by others with additional description and etc.
To wrap up, I'm trying to make a Soundcloud clone that can actually use Soundcloud source using Flutter but I do not know what to do since Soundcloud only provides API for Ruby, Python, and JS.
For example, I don't know how to implement the following JS code, an example code in the api document, which creates an embedded Soundcloud player.
<script src=".3.2.js"></script>
<script>
SC.initialize({
client_id: 'YOUR_CLIENT_ID'
});
var track_url = '';
SC.oEmbed(track_url, { auto_play: true }).then(function(oEmbed) {
console.log('oEmbed response: ', oEmbed);
});
</script>
I found out that using HTML and JS in Flutter web is possible, but I'm not sure if it works on mobile platforms also.
I hope to get some feedbacks from the experts in JS and Dart. Thank you.
I've been using Flutter for about 4 months now, but I do not have any experience in Javascript. I want to use the Soundcloud HTTP API and build an app with it. But I'm stuck with using JS in Flutter. I'm trying to make an user-interactive app that requires these features,
Search music on Soundcloud. => The user gets to choose a song on Soundcloud.
Post the selected music on a feed. => Then the selected song gets posted on the feed page as a music player-like Widget.
Let other users play the music when it shows up on their feed. => The music player then can be seen by others with additional description and etc.
To wrap up, I'm trying to make a Soundcloud clone that can actually use Soundcloud source using Flutter but I do not know what to do since Soundcloud only provides API for Ruby, Python, and JS.
For example, I don't know how to implement the following JS code, an example code in the api document, which creates an embedded Soundcloud player.
<script src="https://connect.soundcloud./sdk/sdk-3.3.2.js"></script>
<script>
SC.initialize({
client_id: 'YOUR_CLIENT_ID'
});
var track_url = 'https://soundcloud./forss/flickermood';
SC.oEmbed(track_url, { auto_play: true }).then(function(oEmbed) {
console.log('oEmbed response: ', oEmbed);
});
</script>
I found out that using HTML and JS in Flutter web is possible, but I'm not sure if it works on mobile platforms also.
I hope to get some feedbacks from the experts in JS and Dart. Thank you.
Share Improve this question asked Sep 11, 2020 at 6:06 JohntopiaJohntopia 3531 gold badge6 silver badges17 bronze badges 2- 1 For that, you would have to use webview – CoderUni Commented Sep 11, 2020 at 6:10
- Thank you everyone for your answers. But I was hoping to get some examples on how I can implement this with some sample code... My issue was that I couldn't get the idea of how this can be implemented in code... – Johntopia Commented Sep 11, 2020 at 7:12
2 Answers
Reset to default 3You can use flutter_js. You can try it once.
You can use Flutter JS plugin, but it is remended to use dart for flutter, I hope this link helps https://www.filledstacks./post/create-and-deploy-a-flutter-web-app/
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744993731a4605059.html
评论列表(0条)